Skip to content

ChiggyJain/PythonVirtualWorkSpaceRoomBookingSystem

Repository files navigation

🧩 Virtual Workspace Room Booking System

📘 GitHub Repository

https://github.com/ChiggyJain/PythonVirtualWorkSpaceRoomBookingSystem


🛠️ Tech Stack

  • Backend Framework: FastAPI (Python)
  • Database: MySQL 8
  • Containerization: Docker & Docker Compose
  • ORM / DB Layer: Raw SQL Queries (via Singleton DB Connection)
  • Environment Management: .env files
  • API Documentation: Auto-generated by FastAPI (Swagger UI)

📂 Project Directory Structure

Path Description
/api/v1/ Contains endpoint routes, schemas, and database query files.
/core/mysql_db.py Implements the Singleton MySQL connection logic used throughout the app.
/db/dump_data.sql Initializes the VIRTUAL_WORKSPACE database with sample data.
/utils/utils.py Contains utility functions used across different modules.
/.gitignore Specifies files and folders to be ignored during Git commits.
/docker-compose_production_machine.yaml Docker Compose file for building and running the production containers (MySQL, FastAPI App).
/Dockerfile_production_machine Dockerfile used to build the app image for production.
/requirements.txt Lists all the Python dependencies required for this project.

⚙️ API Endpoints Overview

Endpoint Method Description
/api/v1/login/ POST Login into the system and get an access token.
/api/v1/teams/ GET Retrieve all teams with their members count.
/api/v1/rooms/available GET Check available rooms for booking by room type and date-time slot.
/api/v1/bookings/ POST Create a new room booking for a team or individual user.
/api/v1/cancel/ POST Cancel an existing room booking.
/api/v1/booking/ GET Fetch all booked and cancelled room booking details.

Please follow below given steps to execute this project


Step 1 — Stop local MySQL service

  • sudo systemctl stop mysql


Step 2 — Clone the Repository



Step3: Creating environment file

  • Create .env file into this PythonVirtualWorkSpaceRoomBookingSystem and copy data from this PythonVirtualWorkSpaceRoomBookingSystem/file: env_local_machine.txt


Step4 - Build and Run Docker Containers into this directory: PythonVirtualWorkSpaceRoomBookingSystem

  • docker compose -f docker-compose_production_machine.yaml down -v
  • docker compose -f docker-compose_production_machine.yaml build --no-cache
  • docker compose -f docker-compose_production_machine.yaml up


Step5 - Access API Documentation


About

Virtual Workspace Room Booking System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages