Skip to content

Commit b7d7645

Browse files
authored
Create CONTRIBUTING.md
1 parent 614e8fa commit b7d7645

File tree

1 file changed

+160
-0
lines changed

1 file changed

+160
-0
lines changed

CONTRIBUTING.md

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Contributing to ANDRO
2+
3+
Thank you for your interest in contributing to ANDRO! This document provides guidelines and instructions for contributing to this project.
4+
5+
## 📌 Table of Contents
6+
- [Project Structure](#project-structure)
7+
- [Branch Structure](#branch-structure)
8+
- [Development Setup](#development-setup)
9+
- [Contribution Workflow](#contribution-workflow)
10+
- [Code Style Guidelines](#code-style-guidelines)
11+
- [Pull Request Process](#pull-request-process)
12+
- [Testing](#testing)
13+
- [Documentation](#documentation)
14+
- [Contact](#contact)
15+
16+
## 🏗️ Project Structure
17+
18+
ANDRO consists of the following main components:
19+
20+
- **Web Panel**: The administrative interface built with Express.js and EJS
21+
- **Android Client**: The code that runs on target Android devices
22+
- **Server**: The backend that manages connections and data
23+
24+
Key directories:
25+
- `/assets`: Contains all web UI components (views, stylesheets, scripts)
26+
- `/includes`: Server-side logic and utilities
27+
- `/app`: Android client application files and build tools
28+
- `/clientData`: Client database files (JSON)
29+
30+
## 🌿 Branch Structure
31+
32+
The project uses the following branch structure:
33+
34+
- `main`: The stable production branch. All final, tested changes go here.
35+
- `WebPanel`: Development branch for the web interface. **This is the primary branch for UI contributions.**
36+
- `website`: Branch specifically for the project's marketing website. Work on landing pages goes here.
37+
- `dev`: General development branch for server-side and backend features.
38+
39+
**Important**: Changes merged to `WebPanel` are automatically merged to `main` after review and testing. Do not create pull requests directly to `main`.
40+
41+
## 💻 Development Setup
42+
43+
1. **Prerequisites**:
44+
- Node.js (v14 or newer)
45+
- npm (v6 or newer)
46+
- Java JDK (for APK building)
47+
48+
2. **Installation**:
49+
```bash
50+
# Clone the repository
51+
git clone https://github.com/AryanVBW/ANDRO.git
52+
cd ANDRO
53+
54+
# Install dependencies
55+
npm install
56+
57+
# For development with auto-reload
58+
npm install --save-dev nodemon debug
59+
```
60+
61+
3. **Run the development server**:
62+
```bash
63+
DEBUG=andro:* npm run dev
64+
```
65+
66+
4. **Environment setup**:
67+
Make sure you have the correct settings in `includes/const.js` for your environment.
68+
69+
## 🛠️ Contribution Workflow
70+
71+
### For Web Panel Contributions:
72+
73+
1. **Always branch from `WebPanel`**:
74+
```bash
75+
git checkout WebPanel
76+
git pull origin WebPanel
77+
git checkout -b feature/your-feature-name
78+
```
79+
80+
2. **Make your changes**:
81+
- Focus on modifying files in `/assets/views` for UI components
82+
- Use the existing CSS classes and variables in `/assets/webpublic/css/custom.css`
83+
- Keep JavaScript modular in `/assets/webpublic/js/main.js`
84+
85+
3. **Test thoroughly** before submitting a pull request.
86+
87+
4. **Create a pull request to the `WebPanel` branch** (not to `main`).
88+
89+
### For Website Contributions:
90+
91+
1. **Always branch from `website`**:
92+
```bash
93+
git checkout website
94+
git pull origin website
95+
git checkout -b website/feature-name
96+
```
97+
98+
2. **Create a pull request to the `website` branch** when your changes are complete.
99+
100+
## 🎨 Code Style Guidelines
101+
102+
### JavaScript:
103+
- Use ES6+ features when appropriate
104+
- Maintain consistent indentation (2 spaces)
105+
- Use camelCase for variables and functions
106+
- Use PascalCase for classes
107+
108+
### CSS:
109+
- Follow the existing variable system for theming
110+
- Group related styles together
111+
- Use comments to separate sections
112+
113+
### EJS Templates:
114+
- Use correct indentation for nested elements
115+
- Keep logic minimal in templates
116+
- Use partials for reusable components
117+
- Use the `<%- include('partials/component.ejs') %>` syntax for includes
118+
119+
## 📝 Pull Request Process
120+
121+
1. **Create a descriptive pull request title** that summarizes your changes.
122+
2. **Fill out the PR template** with details about your changes.
123+
3. **Link any related issues** using keywords (e.g., "Fixes #123").
124+
4. **Wait for code review** from maintainers.
125+
5. **Make requested changes** if any are suggested during review.
126+
6. **Once approved**, your PR will be merged into the appropriate branch.
127+
128+
## 🧪 Testing
129+
130+
Before submitting your PR, ensure:
131+
132+
1. The application runs without errors
133+
2. Your feature works as expected
134+
3. You haven't broken existing features
135+
4. The UI is responsive on mobile devices
136+
137+
## 📚 Documentation
138+
139+
- Add comments to complex code sections
140+
- Update README or relevant documentation if your changes require it
141+
- Document any new features or API changes
142+
143+
## 📱 Website Branch Specifics
144+
145+
The `website` branch contains the landing page and marketing materials:
146+
147+
- Changes to this branch don't affect the core application
148+
- Focus on responsive design and clear communication
149+
- Use the same styling variables when possible for consistency
150+
151+
## 📞 Contact
152+
153+
If you have questions about contributing, join our community channels:
154+
155+
- GitHub Issues: For bug reports and feature requests
156+
- Discord: [Join our server](https://discord.gg/your-invite-link)
157+
158+
---
159+
160+
Thank you for contributing to ANDRO! Your efforts help make this project better for everyone.

0 commit comments

Comments
 (0)