{"id":22401807,"url":"https://github.com/sujoncoder/ticket_management","last_synced_at":"2025-03-27T00:27:05.005Z","repository":{"id":265068387,"uuid":"894916270","full_name":"sujoncoder/Ticket_Management","owner":"sujoncoder","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-28T16:40:00.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T06:14:34.888Z","etag":null,"topics":["bcrypt","express","jwt-token","mongodb","mongoose","nodejs"],"latest_commit_sha":null,"homepage":"","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/sujoncoder.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-11-27T08:30:51.000Z","updated_at":"2024-11-28T16:40:04.000Z","dependencies_parsed_at":"2024-11-28T08:35:26.018Z","dependency_job_id":null,"html_url":"https://github.com/sujoncoder/Ticket_Management","commit_stats":null,"previous_names":["sujoncoder/sujoncoder-ticket_management","sujoncoder/ticket_management"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sujoncoder%2FTicket_Management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sujoncoder%2FTicket_Management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sujoncoder%2FTicket_Management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sujoncoder%2FTicket_Management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sujoncoder","download_url":"https://codeload.github.com/sujoncoder/Ticket_Management/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245758211,"owners_count":20667492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bcrypt","express","jwt-token","mongodb","mongoose","nodejs"],"created_at":"2024-12-05T09:08:52.140Z","updated_at":"2025-03-27T00:27:04.987Z","avatar_url":"https://github.com/sujoncoder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ticket Management System\n\n## Overview\nThe **Ticket Management System** is a backend system designed for managing bus tickets, allowing users to purchase tickets for specific buses at designated time slots. The system includes authentication, role-based management (Admin and User), and ticket purchasing functionalities.\n\nThis system is built using **Node.js**, **Express.js**, and **MongoDB** with **Mongoose** for the database. The project follows a modular design pattern to ensure scalability and maintainability.\n\n## Features\n\n- **User Authentication**: \n  - User registration, login, and logout with JWT-based authentication.\n  - Password hashing for secure storage.\n\n- **Admin Functionalities**:\n  - Add, update, and delete bus information.\n  - Upload, update, and delete tickets for buses with prices and time slots.\n\n- **User Functionalities**:\n  - View available buses and tickets.\n  - Purchase tickets for a specific bus at a given time slot.\n\n- **Role-based Access Control**:\n  - Admins can manage buses and tickets.\n  - Users can view buses, tickets, and purchase tickets.\n\n## Technologies\n\n- **Backend**: Node.js, Express.js\n- **Database**: MongoDB with Mongoose\n- **Authentication**: JWT (JSON Web Tokens)\n- **Password Hashing**: bcryptjs\n- **Error Handling**: http-errors\n\n## Project Structure\n\n\n## API Endpoints\n\n### **Authentication APIs**\n- **POST /auth/register**: User registration\n- **POST /auth/login**: User login\n- **POST /auth/logout**: User logout\n\n### **Admin APIs**\n- **POST /admin/bus**: Add a new bus\n- **PUT /admin/bus/:id**: Update bus information\n- **DELETE /admin/bus/:id**: Delete a bus\n- **POST /admin/ticket**: Upload a new ticket for a bus\n- **PUT /admin/ticket/:id**: Update ticket information\n- **DELETE /admin/ticket/:id**: Delete a ticket\n\n### **User APIs**\n- **GET /buses**: View all available buses\n- **GET /tickets**: View available tickets for specific buses\n- **POST /tickets/purchase**: Purchase a ticket for a specific bus and time\n\n\nPostman API doc link: https://documenter.getpostman.com/view/29092897/2sAYBXBWYj\n\nER Diagram link:   https://drive.google.com/file/d/1AdJOXrajtJ-CyRWbLtOG2IzAsxDtnBjc/view\n\n## Happy Codding 👩‍💻 \u003c/\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsujoncoder%2Fticket_management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsujoncoder%2Fticket_management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsujoncoder%2Fticket_management/lists"}