|
| 1 | +# Contributing to urBackend |
| 2 | + |
| 3 | +Thank you for your interest in contributing to urBackend! We welcome contributions to help make this "Backend-as-a-Service" platform even better. |
| 4 | + |
| 5 | +Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved. |
| 6 | + |
| 7 | +## 🚀 Getting Started |
| 8 | + |
| 9 | +### 1. Fork and Clone |
| 10 | +Fork the repository to your GitHub account and then clone it locally: |
| 11 | + |
| 12 | +```bash |
| 13 | +git clone https://github.com/YOUR_USERNAME/urBackend.git |
| 14 | +cd urBackend |
| 15 | +``` |
| 16 | + |
| 17 | +### 2. Project Structure |
| 18 | +The repository is organized into two main directories: |
| 19 | +- **`backend/`**: Node.js & Express application handling the API, database, and authentication. |
| 20 | +- **`frontend/`**: React.js (Vite) application for the user dashboard. |
| 21 | + |
| 22 | +### 3. Setup and Installation |
| 23 | + |
| 24 | +#### Backend |
| 25 | +1. Navigate to the backend directory: `cd backend` |
| 26 | +2. Install dependencies: `npm install` |
| 27 | +3. Create a `.env` file (refer to `README.md` for required variables). |
| 28 | +4. Start the server: |
| 29 | + ```bash |
| 30 | + npm start |
| 31 | + ``` |
| 32 | + |
| 33 | +#### Frontend |
| 34 | +1. Navigate to the frontend directory: `cd frontend` |
| 35 | +2. Install dependencies: `npm install` |
| 36 | +3. Start the development server: |
| 37 | + ```bash |
| 38 | + npm run dev |
| 39 | + ``` |
| 40 | + |
| 41 | +## 🛠️ Development Workflow |
| 42 | + |
| 43 | +1. **Create a Branch**: Always create a new branch for your work. Use descriptive names like `feature/new-login-ui` or `fix/database-connection`. |
| 44 | + ```bash |
| 45 | + git checkout -b feature/your-feature-name |
| 46 | + ``` |
| 47 | + |
| 48 | +2. **Make Changes**: Implement your feature or fix. |
| 49 | + |
| 50 | +3. **Test Your Changes**: |
| 51 | + - **Backend**: Run tests using Jest. |
| 52 | + ```bash |
| 53 | + cd backend |
| 54 | + npm test |
| 55 | + ``` |
| 56 | + - **Frontend**: Ensure there are no linting errors. |
| 57 | + ```bash |
| 58 | + cd frontend |
| 59 | + npm run lint |
| 60 | + ``` |
| 61 | + |
| 62 | +4. **Commit**: Use clear and concise commit messages. |
| 63 | + ```bash |
| 64 | + git commit -m "Add feature X" |
| 65 | + ``` |
| 66 | + |
| 67 | +5. **Push**: Push your branch to your forked repository. |
| 68 | + ```bash |
| 69 | + git push origin feature/your-feature-name |
| 70 | + ``` |
| 71 | + |
| 72 | +## 📬 Submitting a Pull Request (PR) |
| 73 | + |
| 74 | +1. Go to the original repository and click "Compare & pull request". |
| 75 | +2. Provide a clear title and description of your changes. |
| 76 | +3. Link any related issues (e.g., "Fixes #123"). |
| 77 | +4. Wait for review and address any feedback. |
| 78 | + |
| 79 | +## 🐛 Reporting Bugs & Feature Requests |
| 80 | + |
| 81 | +- **Bugs**: If you find a bug, please create an issue describing the problem, steps to reproduce, and expected behavior. |
| 82 | +- **Features**: If you have an idea for a new feature, feel free to open an issue to discuss it before starting implementation. |
| 83 | + |
| 84 | +## 🤝 Code of Conduct |
| 85 | + |
| 86 | +Please be respectful and considerate of others. We aim to create a welcoming and inclusive environment for all contributors. |
| 87 | + |
| 88 | +--- |
| 89 | +Happy Coding! 🚀 |
0 commit comments