Documentation
Contributing Guide

๐Ÿ“ Contributing Guide

If you want to do more than report an issue or suggest an enhancement, you can contribute to the project by:

  • cloning the repository (repo)
  • making your changes
  • opening a pull request

Cloning the Repository (repo)

1. Fork the repo

Click the fork button at the top right of the page to create a copy of this repo in your account.

After successfully forking the repo, you will be directed to your repo copy.

2. Clone the forked repo

On your forked repo, click the green button that says Code. It will open a dropdown menu. Copy the link in the input with the label HTTPS or GitHub CLI depending on your preferred cloning mode.

For HTTPS, open up your terminal and run the following command:

git clone <your-clone-link>
# or
git clone https://github.com/<your-username>/<project-name>.git

Replace <your-username> with your GitHub username.

You can also clone the repo using the GitHub CLI. To do this, run the following command:

gh repo clone <your-username>/<project-name>

3. Set up the project

To set up the project, navigate into the project directory and open up the project in your preferred code editor.

cd <project-name>
code . # Opens up the project in VSCode

Install the dependencies (Web/React-Native Projects).

npm install
# or
yarn 
# or
pnpm install

Install the dependencies (Flutter Projects).

Using pub

flutter pub get

Install the dependencies (Python Projects).

Using pip

pip install -r requirements.txt

Making your Changes

1. Create a new branch

Create a new branch from the main branch. Your branch name should be descriptive of the changes you are making. E.g., docs-updating-the-readme-file. Some ideas to get you started:

  • For Feature Updates: feat-<brief 2-4 words-Description>-<ISSUE_NO>
  • For Bug Fixes: fix-<brief 2-4 words-Description>-<ISSUE_NO>
  • For Documentation: docs-<brief 2-4 words-Description>-<ISSUE_NO>

To create a new branch, use the following command:

git checkout -b <your-branch-name>

2. Run the project

  • Web Projects

    npm start
    # or
    yarn start
    # or
    pnpm start
  • React-Native projects

    # For expo
    npx expo start
    # For iOS
    npx react-native run-ios
    # For Android
    npx react-native run-android
  • Flutter Projects

    flutter run
  • Python Projects

    python your_script.py

3. Make your changes

You are to make only one contribution per pull request. It makes it easier to review and merge. If you have multiple bug fixes or features, create separate pull requests for each.

4. Commit your changes

Your commit message should give a concise idea of the issue you are solving. It should follow the conventional commits (opens in a new tab) specification, as this helps us generate the project changelog automatically. A traditional structure of commit looks like so:

<type>(optional scope): <description>

To commit your changes, run the following command:

git add .
git commit -m "<your_commit_message>"

Eg:

git commit -m "feat: add support for Next.js"

5. Clean up your code and push changes

Here is an example of a web project using pnpm as package manager

After committing your changes, run the following command before pushing your local commits to the remote repository and ensure that all tests pass and there are no linting errors.

pnpm cleanup
pnpm lint
pnpm test

Once all tests and linting pass, push your local commits to your remote repository.

git push origin your-branch-name

Opening a Pull Request(PR)

1. Create a new Pull Request (PR) (opens in a new tab)

Go to the Project Repository and click the compare & pull request button or go to the Pull Request Page and click on the New pull request button. It will take you to the Open a pull request page.

Note: Make sure your PR points to the main branch, not any other one.

โœจ We suggest you to follow Pull-Request Template for creating a pull request.

2. Wait for review

๐ŸŽ‰ Congratulations! You've made your pull request! A maintainer will review and merge your code or request changes. If changes are requested, make them and push them to your branch. Your pull request will automatically track the changes on your branch and update.