Skip to content

How To Contribute

Rohit Sarkar edited this page Aug 26, 2019 · 5 revisions

Hello Newcomer, here are some tips to help you get started contributing to this project.

Get to know the project

Here's what you can do to know more about the project:

  • Read Documentation available on GitHub Wiki and README;
  • You can join us on Slack, to see or participate in the project's discussion;
  • You can browse the code on GitHub or even on your workspace after cloning it.

Contributing to our Documentation

Documentation is very important for any open source project and we welcome all contributions to our Documentation. If you are new to the community this is an amazing way to get to know more about the project and help the community at the same time!

Setting Up

  1. Fork the frontend and backend projects into your profile;
  2. Clone the projects into your workspace on your computer;
  3. Setup remotes to keep your master branch in sync with the cribbl repository (upstream);
  4. Create a Firebase Project from your google account;
  5. Move to the backend directory
    • Install dependencies: npm i
    • Create the environment file cp .env.example .env
    • Set the environment variables in the .env file
    • Run node setup.js to initialize dummy data in your Firebase DB. Check database tab in your Firebase Project console to check whether or not nodes were created.
    • Start backend locally: npm start
  6. Move to the frontend directory
    • Install dependencies: npm i
    • Create the environment file cp .env.example .env
    • Set the environment variables in the .env file
    • Start frontend locally: npm start
  7. Go to localhost:3000/ and the homepage of the portal should be visible. You can login with a dummy id that we have created for you before hand. (Remember setup.js ? It created some dummy users too!) Login with id as [email protected] and password as Password@1234.

Choose a working item

  1. Check the available issues (that anyone can contribute to) or first timers only issues (just for first time contributors in this project);
  2. Choose one issue you want to work on;
  3. Ask maintainers, on the issue's comment section, if you can work on it;
  4. Once you get their approval you can start working on it!

Start Working

Once you have the frontend and backend running locally, you can start working on the issues.

  1. Create a specific branch based from master branch for your specific feature;
  2. Start coding;
  3. Make sure you follow this Commit Message Style Guide;
  4. Once you finish working on your issue, submit a Pull Request (PR) (following the template provided);
  5. If the reviewers request changes on your PR, make the changes (this can be a back and forth process where you make changes according to reviewers feedback);
  6. Make sure when you finish your changes you squash your commits into a single commit;
  7. Once the reviewers approve your PR, they can merge and your code will finally be part of the main repository!