{"id":15129891,"url":"https://github.com/alpayabdullayev/basic-reservation-system","last_synced_at":"2026-01-19T07:11:24.292Z","repository":{"id":255647046,"uuid":"852741334","full_name":"alpayabdullayev/Basic-Reservation-System","owner":"alpayabdullayev","description":"API for managing venue bookings and user reservations. Features include user authentication, role-based admin control for venue management, and secure reservation handling. Built with Express.js, it ensures request validation and JWT-based authentication.","archived":false,"fork":false,"pushed_at":"2024-09-06T20:58:47.000Z","size":184,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T17:14:02.030Z","etag":null,"topics":["bcrypt","docker","docker-compose","express","jest-test","jwt-authentication","logger","nodejs","redis-cache","winston-logger"],"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/alpayabdullayev.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-09-05T10:45:10.000Z","updated_at":"2024-09-06T20:58:50.000Z","dependencies_parsed_at":"2024-09-06T14:26:16.600Z","dependency_job_id":"164f9ff7-c71f-4ba2-b209-25593ed6d613","html_url":"https://github.com/alpayabdullayev/Basic-Reservation-System","commit_stats":null,"previous_names":["alpayabdullayev/basic-reservation-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpayabdullayev%2FBasic-Reservation-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpayabdullayev%2FBasic-Reservation-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpayabdullayev%2FBasic-Reservation-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpayabdullayev%2FBasic-Reservation-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpayabdullayev","download_url":"https://codeload.github.com/alpayabdullayev/Basic-Reservation-System/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386946,"owners_count":20930741,"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","docker","docker-compose","express","jest-test","jwt-authentication","logger","nodejs","redis-cache","winston-logger"],"created_at":"2024-09-26T02:22:39.216Z","updated_at":"2026-01-19T07:11:24.279Z","avatar_url":"https://github.com/alpayabdullayev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reservation System API documentation\n\n## Table of Contents\n\n- [Title](#title)\n- [Description](#description)\n- [Installation](#installation)\n- [Usage](#usage)\n\n## Description\n\nThis repository contains the source code for a Reservation System API. It has dedicated routes for managing venues, users, and authentication using JWT. Users can authenticate, browse available venues, and make reservations. The API handles all types of HTTP requests and performs CRUD operations on the database asynchronously, responding with JSON and the relevant status codes.\n\n## Installation\n\nReservation system project using Node.js, Express, and MongoDB. VS Code's integrated terminal serves as a good CLI to run the necessary commands and manage the project.\"\n\n    1. Clone the project\n    2. You need rename the file '.env.EXAMPLE' to simply '.env'.\n    3. Add your MongoDB URI to the CONNECTION_URL section in the .env file.\n    4. npm install\n    5. npm run start\n    6. Finally we are ready to begin, so enter 'npm run start'\n\n## Usage\n\nLink to project: https://github.com/alpayabdullayev/Basic-ReservationSystem\n\nOnce you've entered 'npm run start' and see a message stating that the server is listening, you're ready to test the API. The easiest way to do this is by using Insomnia or Postman. For this demonstration, I'll be using Insomnia, which allows easy toggling between request types and collections. The API provides routes for venues, users, and JWT-based authentication, enabling users to make reservations. All requests and responses are in JSON format. When you're done running the server, use 'Ctrl + C' to stop it. Below is a brief overview of the routes and what the API expects and returns.\n\n### /api/auth\n\n## Auth Routes\n\n| Method | Path                  | Purpose                                            |\n| ------ | --------------------- | -------------------------------------------------- |\n| POST   | /auth/register        | Register a new user                                |\n| POST   | /auth/login           | Login a user and return JWT                        |\n| GET    | /auth/verify-email    | Verify user's email after registration             |\n| POST   | /auth/forgot-password | Send password reset instructions to user's email   |\n| POST   | /auth/reset-password  | Reset the user's password using the token provided |\n| POST   | /auth/logout          | Logout the user and invalidate the current session |\n\nPOST request creates a new user with the request body:\n\n    {\n        \"username\" : \"example\",\n        \"email\" : \"example@gmail.com\",\n        \"password\" : \"examplesecure\"\n    }\n\n### /api/auth/login\n\n    {\n        \"email\" : \"example@gmail.com\",\n        \"password\" : \"examplesecure\"\n    }\n\n### /api/venues\n\n## Venue Routes\n\n| Method | Path | Purpose                            |\n| ------ | ---- | ---------------------------------- |\n| POST   | /    | Create a new venue                 |\n| PUT    | /:id | Update details of a specific venue |\n| GET    | /    | Get a list of all venues           |\n| GET    | /:id | Get details about a specific venue |\n| DELETE | /:id | Delete a specific venue            |\n\nGET request returns all venues\n\nPOST request creates a new venues with the request body:\n\n    {\n    \"name\" : \"example\",\n    \"location\" : \"example\",\n    \"capacity\" : 100,\n    \"description\" : \"example\"\n    }\n\n### /api/venues/:id\n\nGET request returns the one venue by its id\n\nPUT request updates a venue by its id with a new name with the request body:\n\n        {\n            \"name\" : \"Update example\",\n            \"location\" : \"Update example\",\n            \"capacity\" : 100,\n            \"description\" : \"Update example\"\n        }\n\nDELETE request will delete a venue with that id\n\n### /api/reservations\n\n## Booking Routes\n\n| Method | Path       | Purpose                                  \n| ------ | ---------- | ----------------------------------------         | \n| POST   | /          | Create a new reservations                        | \n| GET    | /          | Get all reservationss for the authenticated user |\n| DELETE | /:id       | Delete a specific reservations                   |\n\nGET request returns all reservations\n\nPOST request creates a new reservations with the request body:\n\n    {\n        \"venueId\" : \"venue_id\",\n        \"date\" : \"2023-09-01\",\n        \"time\" : \"18:00\",\n        \"numberOfPeople\" : 4\n    }   \n\n\n## Docker and Redis Setup\n\n## Prerequisites\n\n- [Docker](#docker)\n- [Docker Compose](#dockerCompose)\n\nThis project is Dockerized and includes Redis for session management and caching. To run the application in a containerized environment with Redis support, follow the steps below:\n\n    1. Ensure Docker and Docker Compose are installed on your system.\n    2. Build and start the application with Docker: =\u003e docker-compose up --build\n    3. To stop the application, run =\u003e docker-compose down\n    4. npm install\n    5. npm run start\n    6. Finally we are ready to begin, so enter 'npm run start'\n\n\n## Docker Compose File\n\nHere's a summary of the services defined in the docker-compose.yml file:\n\n```yaml\nversion: '3.8'\n\nservices:\n  app:\n    container_name: express-app\n    build:\n      context: .\n      dockerfile: Dockerfile\n    ports:\n      - \"8080:8080\"\n    environment:\n      - NODE_ENV=development\n      - CONNECTION_URL=${CONNECTION_URL}\n      - REDIS_URL=redis://redis-server:6379\n      - ACCESS_SECRET_TOKEN=${ACCESS_SECRET_TOKEN}\n      - REFRESH_SECRET_TOKEN=${REFRESH_SECRET_TOKEN}\n      - RESET_PASSWORD_SECRET=${RESET_PASSWORD_SECRET}\n      - EMAIL=${EMAIL}\n      - PASS=${PASS}\n      - CLIENT_URL=${CLIENT_URL}\n    volumes:\n      - .:/app\n      - /app/node_modules\n    depends_on:\n      - redis\n\n  redis:\n    image: \"redis:alpine\"\n    container_name: redis-server\n    ports:\n      - \"6379:6379\"\n\nnetworks:\n  app-network:\n    driver: bridge","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpayabdullayev%2Fbasic-reservation-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpayabdullayev%2Fbasic-reservation-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpayabdullayev%2Fbasic-reservation-system/lists"}