|
| 1 | +# Contributing to Node API Postgres |
| 2 | + |
| 3 | +Thank you for considering contributing to this project! We welcome all kinds of contributions, whether it's bug reports, feature suggestions, or code improvements. Please follow the guidelines below to make the contribution process smooth and effective. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +1. **Fork the Repository**: Start by forking the repository to your GitHub account. |
| 8 | +2. **Clone the Fork**: Clone the repository to your local machine. |
| 9 | + ```bash |
| 10 | + git clone https://github.com/your-username/node-api-postgres.git |
| 11 | + ``` |
| 12 | +3. **Set Upstream**: Set the original repository as the upstream remote. |
| 13 | + ```bash |
| 14 | + git remote add upstream https://github.com/JawherKl/node-api-postgres.git |
| 15 | + ``` |
| 16 | + |
| 17 | +## Contribution Guidelines |
| 18 | + |
| 19 | +### Reporting Issues |
| 20 | + |
| 21 | +If you encounter a bug or have a feature request, please [open an issue](https://github.com/JawherKl/node-api-postgres/issues) with the following details: |
| 22 | +- A clear and descriptive title |
| 23 | +- Steps to reproduce the issue (if applicable) |
| 24 | +- Expected behavior |
| 25 | +- Actual behavior |
| 26 | +- Any relevant screenshots or error messages |
| 27 | + |
| 28 | +### Submitting Pull Requests |
| 29 | + |
| 30 | +1. **Branch from `main`**: Always create a new branch from the `main` branch for your work. |
| 31 | + ```bash |
| 32 | + git checkout -b feature/id-or-bugfix-name |
| 33 | + ``` |
| 34 | +2. **Write Clean Code**: Follow the existing code style and add comments where necessary. |
| 35 | +3. **Run Tests**: Ensure all existing tests pass and add new tests if applicable. |
| 36 | + ```bash |
| 37 | + npm test |
| 38 | + ``` |
| 39 | +4. **Commit Messages**: Write meaningful and descriptive commit messages. |
| 40 | + ```bash |
| 41 | + git commit -m "Add feature X or fix issue Y" |
| 42 | + ``` |
| 43 | +5. **Push Changes**: Push your branch to your fork. |
| 44 | + ```bash |
| 45 | + git push origin feature/id-or-bugfix-name |
| 46 | + ``` |
| 47 | +6. **Create a Pull Request**: Submit a pull request to the `main` branch of the original repository. Provide a detailed description of your changes and reference any relevant issues. |
| 48 | + |
| 49 | +### Code of Conduct |
| 50 | + |
| 51 | +Please note that this project adheres to a [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. |
| 52 | + |
| 53 | +## Development Setup |
| 54 | + |
| 55 | +1. **Install Dependencies**: |
| 56 | + ```bash |
| 57 | + npm install |
| 58 | + ``` |
| 59 | +2. **Configure Environment**: |
| 60 | + Create a `.env` file in the root directory and configure the required environment variables. Refer to `.env.example` for guidance. |
| 61 | +3. **Run the Application**: |
| 62 | + ```bash |
| 63 | + npm start |
| 64 | + ``` |
| 65 | +4. **Run Tests**: |
| 66 | + ```bash |
| 67 | + npm test |
| 68 | + ``` |
| 69 | + |
| 70 | +## Suggestions and Feedback |
| 71 | + |
| 72 | +We are open to suggestions and feedback! Feel free to start a discussion in the [Discussions](https://github.com/JawherKl/node-api-postgres/discussions) tab. |
| 73 | + |
| 74 | +Thank you for your contributions! Together, we can make this project better. |
| 75 | + |
0 commit comments