Skip to content

sandygudie/quiz-api

Repository files navigation

Yellow Black Playful Lamp Bulb Idea Company Logo-svg

Description

An open source RESTFUL API quiz questions for popular programming languages. It consists of Multiple Choice Questions(MCQs) in various areas including: HTML, CSS, JavaScript, NextJs etc.

Resources

Technology/Tools

Project Folder Structure

.husky
node_modules/
documentation/
src/
   --config
     --config.js
     --logger.js
   --controllers/
     --auth.js
     --quiz.js
     --contributor.js
   --routes/
     --auth.js
     --quiz.js
     --contributor.js
     --index.js
     --user.js
   --models/
     --quiz.js
     --user.js
     --contributor.js
   --middlewares/
     --error-handler.js
     --token
   --db/
     --db.js
   --utils/
     --sendEmail
        --templates
          --index.ejs
        --emailhandler.js
     --responseHandler.js
   app.js
   server.js
.env-example
package.json

Environment Setup

  • Make sure you have nodejs v14.17.5 installed by running the following command below. You can install nodejs from here if you don't have it.
  • To check node version
    node --version
    
  • Clone the respository to your local machine using the command
    git clone https://github.com/sandygudie/quiz-api.git
    
  • Navigate to the project folder.
  • And open the project with your code editor (VScode recommended)

Start the server

  • Install the package dependencies by running the following command in the terminal yarn install
  • Create a .env in the project folder, get variables from the .env.example file sample and ensure to add the values(e.g MONGODB_URI)
  • To start the server locally, run the command yarn run dev

Run Documentation

  • Navigate to the documentation folder. cd documentation
  • Install Packages yarn install
  • To start documentation locally, run the command yarn start

Formatting for the project

  • We're using eslint for js linting, and prettier for code formatting.
  • Please make it a point to install eslint and prettier plugins on vscode to aid in your coding process.
  • Run the command to fix all auto-fixable formatting errors in the whole project based on eslint rules
    yarn run lint
    
  • Run the command to check and fix file formatting with prettier
    yarn run format
    
  • Also Linting has been set up for staged commits in the project.

Deployment on Render

  • Application is on auto deploy from Github to Render.

CONTRIBUTING WORKFLOW

  • You can contribute to adding questions for the project login
  • If you like the project, leave your star.
  • If you would like to complain/suggest/contribute to this project, feel free to open a issue 💟