https://github.com/ChiggyJain/PythonVirtualWorkSpaceRoomBookingSystem
- Backend Framework: FastAPI (Python)
- Database: MySQL 8
- Containerization: Docker & Docker Compose
- ORM / DB Layer: Raw SQL Queries (via Singleton DB Connection)
- Environment Management:
.envfiles - API Documentation: Auto-generated by FastAPI (Swagger UI)
| 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. |
| 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. |
- sudo systemctl stop mysql
- mkdir PythonProject
- cd PythonProject
- git clone https://github.com/ChiggyJain/PythonVirtualWorkSpaceRoomBookingSystem.git
- cd PythonVirtualWorkSpaceRoomBookingSystem
- 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