Skip to content

Commit

Permalink
Merge pull request #53 from a-n-u-vanguri/main
Browse files Browse the repository at this point in the history
FIXES #42 UPDATE contribution.md
  • Loading branch information
PranavBarthwal authored Oct 29, 2024
2 parents 8393814 + 2a3065a commit 6337f0d
Showing 1 changed file with 159 additions and 39 deletions.
198 changes: 159 additions & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,193 @@
# Contributing to Backend Generator CLI
<h1 align="center">Contribute to backend-generator-cli⚡ </h1>
<h3 align="center">Welcome to our open-source project! 😍<br> We appreciate your interest in contributing.😊 <br>This guide will help you get started with the project and make your first contribution.</h3>

Thank you for your interest in contributing to the Backend Generator CLI! We welcome contributions from everyone and appreciate your help in improving the project. Please follow the guidelines below to ensure a smooth contribution process.
# Project Structure 📂

## How to Contribute
```bash

backend-generator-cli/
├── .github/ # GitHub-related files
│ ├── ISSUE_TEMPLATE/ # Issue templates
│ │ ├── bug_report.md # Bug report template
│ │ ├── custom.md # Custom issue template
│ │ └── feature_request.md # Feature request template
│ └── workflows/ # CI/CD workflows
│ └── publish.yml # Publish workflow
├── snippets/ # Code snippets
│ └── snippetdependencies.js # Snippet dependencies
├── src/ # Source code
│ ├── controllers/ # Controller files
│ ├── db/ # Database related files
│ ├── middlewares/ # Middleware functions
│ ├── models/ # Database models
│ ├── routes/ # API routes
│ └── utils/ # Utility functions
├── app.js # Main application file
├── constants.js # Constants file
├── index.js # Entry point
├── .env.sample # Sample environment variables
├── .gitignore # Git ignore file
├── .prettierignore # Prettier ignore file
├── .prettierrc # Prettier configuration
├── package.json # NPM package file
├── package-lock.json # NPM lock file
├── README.md # Main README file
└── CONTRIBUTING.md # Contribution guidelines

### 1. Reporting Issues
If you encounter any issues or bugs, please open an issue on our [GitHub Issues](https://github.com/yourusername/backend-generator-cli/issues) page. Provide a clear description of the problem and steps to reproduce it.
```

### 2. Feature Requests
We love hearing your ideas! If you have a feature request, please create a new issue and describe the feature you would like to see, including its potential benefits.

### 3. Contributing Code
# :zap: First Pull Request ✨

If you'd like to contribute code, please follow these steps:
1. **Star this repository**
Click on the top right corner marked as **Stars** at last.

#### Fork the Repository
2. **Fork this repository**
Click on the top right corner marked as **Fork** at second last.

1. Click the "Fork" button in the upper right corner of the repository.
3. **Clone the forked repository**

2. Clone your forked repository to your local machine:
```bash
git clone https://github.com/yourusername/backend-generator-cli.git
git clone https://github.com/<your-github-username>/backend-generator-cli.git
```

### Create a New Branch
1. **Create a new branch for your feature or bug fix:**

4. **Navigate to the project directory**

```bash
git checkout -b my-feature-branch
cd backend-generator-cli
```

**Make Your Changes**
5. **Create a new branch**

1. **Make the necessary changes to the codebase.**
2. **Ensure your code follows the project's coding style and conventions.**
3. **Add tests for any new features or changes to existing functionality.**
```bash
git checkout -b <your_branch_name>
```

### Commit Your Changes
6. **To make changes**

1. **Stage your changes:**
```bash
git add .
```

2. *Commit your changes with a descriptive message:*
7. **Now to commit**

```bash
git commit -m "Add feature: [brief description]"
git commit -m "add comment according to your changes or addition of features inside this"
```

### Push to Your Fork
8. **Push your local commits to the remote repository**

*Push your changes to your forked repository:*
```bash
git push origin my-feature-branch
git push -u origin <your_branch_name>
```

## Create a Pull Request
1. *Go to the original repository and click on "Pull Requests."*
2. *Click "New Pull Request."*
3. *Select your branch and provide a description of your changes.*
4. *Click "Create Pull Request."*
9. **Create a Pull Request**

10. **Congratulations! 🎉 you've made your contribution**

<br>

# :zap: Alternatively contribute using GitHub Desktop 🖥️

1. **Open GitHub Desktop:**
Launch GitHub Desktop and log in to your GitHub account if you haven't already.

2. **Clone the Repository:**
- If you haven't cloned the repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
- Choose the repository from the list of repositories on GitHub and clone it to your local machine.

3. **Switch to the Correct Branch:**
- Ensure you are on the branch that you want to submit a pull request for.
- If you need to switch branches, you can do so by clicking on the "Current Branch" dropdown menu and selecting the desired branch.

4. **Make Changes:**
Make your changes to the code or files in the repository using your preferred code editor.

5. **Commit Changes:**
- In GitHub Desktop, you'll see a list of the files you've changed. Check the box next to each file you want to include in the commit.
- Enter a summary and description for your changes in the "Summary" and "Description" fields, respectively. Click the "Commit to <branch-name>" button to commit your changes to the local branch.

6. **Push Changes to GitHub:**
After committing your changes, click the "Push origin" button in the top right corner of GitHub Desktop to push your changes to your forked repository on GitHub.

7. **Create a Pull Request:**
- Go to the GitHub website and navigate to your fork of the repository.
- You should see a button to "Compare & pull request" between your fork and the original repository. Click on it.

8. **Review and Submit:**
- On the pull request page, review your changes and add any additional information, such as a title and description, that you want to include with your pull request.
- Once you're satisfied, click the "Create pull request" button to submit your pull request.

9. **Wait for Review:**
Your pull request will now be available for review by the project maintainers. They may provide feedback or ask for changes before merging your pull request into the main branch of the repository.

<br>


# :zap: Good Coding Practices 🧑‍💻

1. **Follow the Project's Code Style**

- Maintain consistency with the existing code style (indentation, spacing, comments).
- Use meaningful and descriptive names for variables, functions, and classes.
- Keep functions short and focused on a single task.
- Avoid hardcoding values; instead, use constants or configuration files when possible.

2. **Write Clear and Concise Comments**

- Use comments to explain why you did something, not just what you did.
- Avoid unnecessary comments that state the obvious.
- Document complex logic and functions with brief explanations to help others understand your thought -process.

3. **Keep Code DRY (Don't Repeat Yourself)**

- Avoid duplicating code. Reuse functions, methods, and components whenever possible.
- If you find yourself copying and pasting code, consider creating a new function or component.

4. **Write Tests**

- Write unit tests for your functions and components.
- Ensure your tests cover both expected outcomes and edge cases.
- Run tests locally before making a pull request to make sure your changes don’t introduce new bugs.

5. **Code Reviews and Feedback**

- Be open to receiving constructive feedback from other contributors.
- Conduct code reviews for others and provide meaningful suggestions to improve the code.
- Always refactor your code based on feedback to meet the project's standards.

<br>

# :zap: Pull Request Process 🚀

When submitting a pull request, please adhere to the following:

1. **Self-review your code** before submission.
2. Include a detailed description of the functionality you’ve added or modified.
3. Comment your code, especially in complex sections, to aid understanding.
4. Add relevant screenshots to assist in the review process.
5. Submit your PR using the provided template and hang tight; we'll review it as soon as possible! 🚀

<br>

# :zap: Issue Report Process 📌

To report an issue, follow these steps:
1. Navigate to the project's issues section :- [Issues](https://github.com/PranavBarthwal/backend-generator-cli/issues)
2. Provide a clear and concise description of the issue.
3. **Avoid spamming** to claim an issue. Patience is key!
4. Wait until someone looks into your report.
5. Begin working on the issue only after you have been assigned to it. 🚀

<br>


## Code of Conduct
## :zap: Note from Admin ❗

Please adhere to our [Code of Conduct]() when contributing to ensure a welcoming environment for all contributors.
- We welcome contributions from everyone. However, please avoid spamming the repository with irrelevant issues & pull requests. We reserve the right to mark PRs as invalid if they are not relevant.

## Getting Started
To get started with the project, please refer to the [README.md](https://github.com/PranavBarthwal/backend-generator-cli/blob/main/README.md) for setup instructions and usage guidelines.
<div align="center">
<img src="https://media.giphy.com/media/LnQjpWaON8nhr21vNW/giphy.gif" width="60"> <em><b>I love connecting with different people</b> so if you want to say <b>hi, I'll be happy to meet you more!</b> :)</em>
</div>

## Thank You!

We appreciate your contributions and support in making Backend Generator CLI better! If you have any questions, feel free to reach out to the maintainers.

0 comments on commit 6337f0d

Please sign in to comment.