{"id":22492283,"url":"https://github.com/sandeepguptax2003/gurucool-assignment","last_synced_at":"2026-04-19T19:34:20.913Z","repository":{"id":252081383,"uuid":"839369039","full_name":"sandeepguptax2003/Gurucool-Assignment","owner":"sandeepguptax2003","description":"Quiz Application Backend is a backend application built using Node.js, Express.js, and MongoDB. It provides a RESTful API for creating, managing, and participating in timed quizzes.","archived":false,"fork":false,"pushed_at":"2024-08-09T06:32:42.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T20:32:24.366Z","etag":null,"topics":["mongodb","node-cron","nodejs"],"latest_commit_sha":null,"homepage":"https://gurucool-assignment-zobq.onrender.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandeepguptax2003.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-07T13:21:46.000Z","updated_at":"2024-09-05T05:04:23.000Z","dependencies_parsed_at":"2025-03-27T20:30:32.052Z","dependency_job_id":"ee354998-36f7-4f9f-a8d5-35e37500116f","html_url":"https://github.com/sandeepguptax2003/Gurucool-Assignment","commit_stats":null,"previous_names":["sandeepguptax2003/gurucool-assignment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sandeepguptax2003/Gurucool-Assignment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepguptax2003%2FGurucool-Assignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepguptax2003%2FGurucool-Assignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepguptax2003%2FGurucool-Assignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepguptax2003%2FGurucool-Assignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandeepguptax2003","download_url":"https://codeload.github.com/sandeepguptax2003/Gurucool-Assignment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepguptax2003%2FGurucool-Assignment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32020697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","node-cron","nodejs"],"created_at":"2024-12-06T18:16:57.721Z","updated_at":"2026-04-19T19:34:20.887Z","avatar_url":"https://github.com/sandeepguptax2003.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quiz Application Backend\n\nQuiz Application Backend is a backend application built using Node.js, Express.js, and MongoDB. It provides a RESTful API for creating, managing, and participating in timed quizzes.\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [API Endpoints](#api-endpoints)\n- [Authentication](#authentication)\n- [Quiz Management](#quiz-management)\n- [Technologies Used](#technologies-used)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- Users can create timed quizzes with questions, options, and correct answers.\n- The application automatically manages the status of quizzes (inactive, active, finished).\n- Users can retrieve the currently active quiz.\n- Users can retrieve the result of a quiz after 5 minutes of the quiz's end time.\n- Users can retrieve a list of all quizzes (including inactive and finished).\n- Secure access to the API endpoints using JWT-based authentication.\n- Rate limiting to prevent abuse of the API.\n\n## Technologies Used\n- Node.js: A JavaScript runtime environment for server-side development.\n- Express.js: A web application framework for Node.js, used for building the RESTful API.\n- MongoDB: A NoSQL database, used for storing quiz and user data.\n- Mongoose: An Object Document Mapping (ODM) library, used for interacting with MongoDB.\n- Bcryptjs: A library for hashing passwords.\n- JsonWebToken (JWT): A library for generating and verifying JSON Web Tokens for authentication.\n- Express Rate Limit: A middleware that limits repeated requests to public APIs and endpoints.\n- Node Cron: A library for scheduling tasks (used for updating quiz statuses).\n\n## API Endpoints\n# Authentication\n- POST /api/auth/register: Register a new user.\n- POST /api/auth/login: Login and receive a JWT token.\n# Quiz Management\n- POST /api/quizzes: Create a new quiz.\n- GET /api/quizzes/active: Retrieve the currently active quiz.\n- GET /api/quizzes/:id/result: Retrieve the result of a quiz.\n- GET /api/quizzes/all: Retrieve a list of all quizzes.\n- For detailed information about the request and response formats, please refer to the API Documentation:\n\n## Installation\n\n1. Clone the repository:\n   git clone \n\n2. Change into the project directory:\ncd Gurucool-Assignment\nInstall the dependencies:\nnpm install\n\n3. Set up the environment variables:\nCreate a .env file in the root directory.\nAdd the following variables:\nenv\nPORT=3800\nMONGODB_URI=your-mongodb-url\nJWT_SECRET=your_jwt_secret_here\n\n4. Start the server:\nnodemon server.js\nThe server will start running on the specified port (default is 3800)\n\n## Contributing\nContributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeepguptax2003%2Fgurucool-assignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandeepguptax2003%2Fgurucool-assignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeepguptax2003%2Fgurucool-assignment/lists"}