This is a microservice that allows user to create comments, edit comments and also flags comment. Users can also reply comments, flag reply and also upvote and downvote comments and replies. Also, origin of these comments are tracked.
For quick navigation:
- How it Works
- Getting Started
- Linting Your Code
- Testing Your Code
- Contributing Your Code
- Endpoints Documentation
- Schema Design
Ensure that your local machine has all the required software, listed below, before setting up your local environment.
You will first need to setup your local environment and ensure that all configuration files are correctly configured.
- Fork the repo.
- Clone your forked repo to you local environment.
- In your terminal, run
npm install
. - In your terminal, run
cp .env.example .env
. - In your terminal, run
npm run startDev
.
- Run
npm run lint:fix
to fix all fixable errors in source code and format with prettier - Run
npm run lint
to find errors that still remain in your code syntax/format - Ensure you fix any remaining linting errors displayed. Run npm run test:ci to ensure your code matches the test
- Run
npm run test
to ensure your code passes all tests
Are you willing to contribute to this project? You can contribute in many areas but primarily in the following areas
- Implementing endpoints and controllers
- Writing unit tests for endpoints and controllers.
- Documentation
- Creating middleware and their consumables
- Fixing/pointing out bugs
- We could use a boost in our code coverage, so any tests to cover untested fucntions is highly welcome
All responses must follow the format specified in the online swagger documentation. This should be your first go to as this will be the live server with the most trustworthy documentation.
To facilitate consistent code, a few Utility Functions have been provided and you should use them to send your responses to maintain consistent implementation.
-
Always lint and test your code as stated above
-
Make use of the PR template and edit the placeholders with relevant information. PR descriptions must reference the issue number being fixed, e.g
fix #12
orresolve #25
. -
Before pushing your commits, ensure your local/forked repo is synced with the latest updates from the original repo to avoid merge conflicts. You can safely do this with a fast-forwards merge.
git remote add upstream https://github.com/microapidev/comment-microapi.git
git fetch upstream
git merge upstream/develop
git commit
git push origin <branch-name>
For more information on the contributing guidelines and implementation details, please see the contributing documentation.
- Organization Model
- Admin Model
- Application Model
- Comments Model
- Replies Model
- Users Model
Please see the complete Schema Design Document.
Copyright (c) 2020, Team Justice League. All rights reserved.