coderatiiita / GrepIt-Backend

Quiz-hosting application to create quizzes, extensively utilising websockets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GrepIt-Backend

A quiz-hosting application, where a user can create a quiz-room, allowing multiple others to join the room. The questions can be set manually for that room, and the one with the most right answers win the top-spot on the leaderboard!

πŸ“š Table Of Contents

πŸš€ How It Works:-

  • The creator has the option to create multiple MCQ type questions.
  • Other users can join the room entering the code.
  • Once the creator starts the quiz, each question will be displayed one-by-one, each having a timer and points awarded based on how fast one answers.
  • At the end of the quiz, you will be able to view a leaderboard. The creator can now restart the quiz (having the option to reset the questions).
  • Features can be implemented to archive the room and the leaderboard.

⚑ Tech Stack:

  • Nodejs (v20.5.0)
  • ExpressJS
  • MySQL

πŸ“¦ Dependencies:

You need npm/yarn installed in your local machine in order to run this app.

πŸ› οΈ How To Setup

  • Make sure your machine is having internet connection.
  • Fork the repository.
  • Open shell (which ever your OS support) on your PC.
  • Change drive to the location where you want your project to be copied.
  • Clone it to your local setup by using command git clone <forked-repo-link>.
  • Once cloned, Run the following command in the root directory of the project npm install.
  • Make sure you have required enviornment variables saved in the .env file in the root of the project. A file .env.example is attached for reference.
  • After the process is completed, run the command npm start or npm run dev.
  • The backend will be live on localhost:4000.
  npm install
  npm start

Reference Links:

πŸ–₯️ Express.js

πŸ—ƒοΈ MySQL with Prisma ORM

API Documentation

Kindly refer to this file API_ENDPOINTS for easier understanding. Update the API_ENDPOINTS.md file as you write/complete a controller function.

πŸ“ Directory Structure:

.
β”œβ”€β”€ API_ENDPOINTS.md
β”œβ”€β”€ app.js
β”œβ”€β”€ CONTRIBUTORS.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package.json
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ prisma
β”‚   └── schema.prisma
β”œβ”€β”€ README.md
└── src
    β”œβ”€β”€ config
    β”‚   └── db.config.js
    β”œβ”€β”€ controllers
    β”‚   └── userAuth.controllers.js
    β”œβ”€β”€ middlewares
    β”‚   └── userAuth.middleware.js
    β”œβ”€β”€ models
    β”‚   └── user.model.js
    └── routes
        └── v1
            └── userAuth.routes.js

8 directories, 13 files

Note

While adding new files make sure to have an entry here. It will be helpful to new contributors.

πŸ‘† Claim an issue:

Comment on the issue. In case of no activity on the issue even after 2 days, the issue will be reassigned. If you have difficulty approaching the issue, feel free to ask on our discord channel.

  • It is also requested to make your entry in CONTRIBUTORS markdown file before submitting the PR.

πŸ’» Communication:

Whether you are working on a new feature or facing a doubt please feel free to ask us on our discord channel. We will be happy to help you out.

πŸ›‘οΈ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“‹ Contribution Guidelines:

Please help us follow the best practice to make it easy for the reviewer as well as the contributor. We want to focus on the code quality more than on managing pull request ethics.

  • People before code: If any of the following rules are violated, the pull-requests will be rejected. This is to create an easy and joyful onboarding process for new programmers and first-time contributors.

  • Avoid commiting after opening pull request and name the commit as something meaningful, it is highly recommened to follow.

  • Reference the issue numbers in the commit message if it resolves an open issue. Follow the pattern provided here.

  • Provide relevant screenshot/short video for easier review.

  • Pull Request older than 3 days with no response from the contributor shall be marked closed.

  • Avoid duplicate PRs, if need please comment on the older PR with the PR number of the follow-up (new PR) and close the obsolete PR yourself.

  • Be polite: Be polite to other community members.

🀝 Mentors

  1. Bhupesh Dewangan
    Opencode Bot Developer
    The YT demonstrator guy ;-;
    githubID: bhupesh98
    discordID: bhupesh6726 (aka Bhupesh)

  2. Vatsal Bhuva
    Opencode Portal Developer
    Most active mod on Discord (ig?)
    githubID: VatsalBhuva11
    discordID: vb11x (aka vatsal)

πŸ’ͺ Thanks To All Contributors

All the contributor's github profile image will be displayed here, pick up the best one real quick.

About

Quiz-hosting application to create quizzes, extensively utilising websockets.

License:MIT License


Languages

Language:JavaScript 100.0%