Skip to content

A microservice for handling comments and replies to each comment from a source

License

Notifications You must be signed in to change notification settings

piouson/comment-microapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comments Microservice

Build Status Coverage Status Issues Forks MIT License

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

Ensure that your local machine has all the required software, listed below, before setting up your local environment.

Requirements

Setup Local Environment

You will first need to setup your local environment and ensure that all configuration files are correctly configured.

  1. Fork the repo.
  2. Clone your forked repo to you local environment.
  3. In your terminal, run npm install.
  4. In your terminal, run cp .env.example .env.
  5. In your terminal, run npm run startDev.

Linting Your Code

  1. Run npm run lint:fix to fix all fixable errors in source code and format with prettier
  2. Run npm run lint to find errors that still remain in your code syntax/format
  3. Ensure you fix any remaining linting errors displayed. Run npm run test:ci to ensure your code matches the test

Testing Your Code

  1. Run npm run test to ensure your code passes all tests

Contributing Your Code

Are you willing to contribute to this project? You can contribute in many areas but primarily in the following areas

  1. Implementing endpoints and controllers
  2. Writing unit tests for endpoints and controllers.
  3. Documentation
  4. Creating middleware and their consumables
  5. Fixing/pointing out bugs
  6. We could use a boost in our code coverage, so any tests to cover untested fucntions is highly welcome

Endpoint Documentation

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.

Utility Functions

To facilitate consistent code, a few Utility Functions have been provided and you should use them to send your responses to maintain consistent implementation.

Before Submitting Pull Request

  • 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 or resolve #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.

Schema Design

  • Organization Model
  • Admin Model
  • Application Model
  • Comments Model
  • Replies Model
  • Users Model

Please see the complete Schema Design Document.

License

MIT License

Copyright (c) 2020, Team Justice League. All rights reserved.

About

A microservice for handling comments and replies to each comment from a source

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages

  • JavaScript 99.6%
  • Other 0.4%