Skip to content

Understanding code base

Aavishkar Mishra edited this page Jun 8, 2021 · 4 revisions

Manthan

Root folder containing all the files.

server.js : Entry point for server app.
config : Database configurations.
middleware : Contains required middlewares .
models : Contains mongoose schemas.
routes/api : Contains all the express routes and APIs
client : React app for client site(frontend).

public : Contains index.html and other static files.
src : Contains source files for react app.

actions : Contains all the required redux actions.
img : Contains all the images required.
reducers : Contains all the required reducers.
utils : Contains all the utility functions.
components : Contains all the components.

auth : Contains Login and Register views.
classroom : Contains classroom view and required files.
dashboard : Contains dashboard view and required files.
layout : Contains global components (as Navbar,Not Found etc ).
routes : Routes for react app.
scores : Contains Scores view and required files.
tests : Contains Tests view and required files.

Development Practices

Whenever working on a new feature/hotfix/refactor, the first step is to make sure a corresponding issue exists. We then take this issue number and affix it to the branch name which we will use for development.

Submitting Pull Requests

Once you've finished making your changes, submit a pull request (PR) to get your code into Manthan. Please take the time to check whether someone has already raised the issue you are solving. Thank you for your contributions!

Follow these rules when creating a PR:

  1. Follow the pull request template: It's easier for a maintainer to reject a PR than it is for them to fill it out for you.
  2. Make PRs self-contained: They should clearly describe what changes have taken place. A reviewer should (for the most part) be able to complete a review without having to look at other issues.
  3. Resolve all code review (CR) comments: Treat comments as a todo list. Most PRs will require some edits before getting merged, so don't get discouraged if you have to make some changes!
  4. Reply when resolving CR comments: When resolving a comment, reply with either "DONE" or "WON'T FIX because ...". A reviewer will unresolve a comment if they feel it's necessary.