Giter Site home page Giter Site logo

kushal7201 / grepit-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opencodeiiita/grepit-backend

0.0 0.0 0.0 233 KB

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

Home Page: https://grep-it-api.onrender.com/

License: MIT License

JavaScript 65.86% HTML 34.14%

grepit-backend's Introduction

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
    โ”‚ย ย  โ”œโ”€โ”€ questions.controllers.js
    โ”‚ย ย  โ”œโ”€โ”€ room.controllers.js
    โ”‚ย ย  โ””โ”€โ”€ userAuth.controllers.js
    โ”œโ”€โ”€ middlewares
    โ”‚ย ย  โ””โ”€โ”€ userAuth.middleware.js
    โ”œโ”€โ”€ routes
    โ”‚ย ย  โ”œโ”€โ”€ index.routes.js
    โ”‚ย ย  โ””โ”€โ”€ v1
    โ”‚ย ย      โ”œโ”€โ”€ questions.routes.js
    โ”‚ย ย      โ”œโ”€โ”€ room.routes.js
    โ”‚ย ย      โ”œโ”€โ”€ userAuth.routes.js
    โ”‚ย ย      โ””โ”€โ”€ v1-main.js
    โ””โ”€โ”€ utils
        โ””โ”€โ”€ responseCodes.js

8 directories, 19 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.

grepit-backend's People

Contributors

vatsalbhuva11 avatar criticic avatar wadadparker avatar apoorv012 avatar bhupesh98 avatar dikshantk2004 avatar jarviss77 avatar thedivineaurora avatar rnavaneeth992 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.