# victoriousvijay/meeting-room-booking-system architecture

> Architecture diagram of the GitHub repository victoriousvijay/meeting-room-booking-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/victoriousvijay/meeting-room-booking-system
- Repository: https://github.com/victoriousvijay/meeting-room-booking-system

## Overview

Meeting Room Booking System: users view a room’s bookings by day, filter rooms, create or cancel bookings, and find the next available slot. The main path runs from the dashboard through the frontend API client to FastAPI routes, booking/room services, scheduling rules, and PostgreSQL. The UI also provides form validation, loading/error states, and toast feedback. Backend relationships are supported by excerpts and the README’s request-flow description; some frontend data-fetching and unsampled room-route details are documented but not excerpted.

Main entry points: [`frontend/components/BookingDashboard.tsx`](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/BookingDashboard.tsx) (Booking dashboard), [`backend/app/main.py`](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/main.py) (FastAPI application), [`backend/app/services/bookings.py`](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/services/bookings.py) (Booking operations), [`backend/app/services/rooms.py`](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/services/rooms.py) (Room operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Booking interface"]
  node_dashboard["Booking dashboard"]
  node_filters["Date and room filters<br/>[Filters.tsx]"]
  node_roomcard["Room day card<br/>[RoomCard.tsx]"]
  node_modal["Booking form<br/>[BookingModal.tsx]"]
  node_nextfinder["Next slot finder<br/>[NextSlotFinder.tsx]"]
  node_states["Loading and errors<br/>[States.tsx]"]
  node_toast["Toast notifications<br/>[Toast.tsx]"]
end

subgraph group_client["Frontend data"]
  node_hooks["Room and booking hooks"]
  node_api_client["API client<br/>[api.ts]"]
  node_validation["Form validation<br/>[validation.ts]"]
end

subgraph group_api["HTTP API"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_booking_routes["Booking routes<br/>[bookings.py]"]
  node_room_routes["Room routes<br/>[rooms.py]"]
  node_schemas["Request and response schemas<br/>[schemas.py]"]
end

subgraph group_domain["Booking domain"]
  node_booking_service["Booking operations<br/>[bookings.py]"]
  node_room_service["Room operations<br/>[rooms.py]"]
  node_scheduling["Scheduling rules<br/>[scheduling.py]"]
  node_errors["API errors<br/>[errors.py]"]
  node_seed["Room initialization<br/>[seed.py]"]
end

subgraph group_storage["Persistence"]
  node_db_session["Database sessions<br/>[database.py]"]
  node_models["Room and booking tables<br/>[models.py]"]
  node_postgres[("PostgreSQL")]
end

node_user(("Room booker"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"renders"| node_filters
node_dashboard -->|"renders"| node_roomcard
node_dashboard -->|"renders"| node_modal
node_dashboard -->|"renders"| node_nextfinder
node_dashboard -->|"renders"| node_states
node_dashboard -->|"loads data"| node_hooks
node_dashboard -->|"creates and cancels"| node_api_client
node_dashboard -->|"notifies"| node_toast
node_modal -->|"validates"| node_validation
node_hooks -.->|"fetches data"| node_api_client
node_api_client -->|"HTTP requests"| node_api_app
node_api_app -->|"registers"| node_booking_routes
node_api_app -->|"registers"| node_room_routes
node_api_app -->|"initializes on startup"| node_seed
node_booking_routes -->|"calls"| node_booking_service
node_room_routes -->|"calls"| node_room_service
node_booking_routes -->|"validates and shapes"| node_schemas
node_room_routes -->|"shapes responses"| node_schemas
node_booking_service -->|"checks booking rules"| node_scheduling
node_room_service -->|"finds free slots"| node_scheduling
node_booking_service -->|"looks up room"| node_room_service
node_booking_service -->|"raises domain errors"| node_errors
node_room_service -->|"raises not found"| node_errors
node_api_app -->|"maps to responses"| node_errors
node_booking_service -->|"reads and writes"| node_models
node_room_service -->|"reads"| node_models
node_seed -->|"creates room records"| node_models
node_models -->|"uses base"| node_db_session
node_db_session -->|"queries database"| node_postgres

click node_dashboard "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/BookingDashboard.tsx"
click node_filters "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/Filters.tsx"
click node_roomcard "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/RoomCard.tsx"
click node_modal "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/BookingModal.tsx"
click node_nextfinder "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/NextSlotFinder.tsx"
click node_states "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/States.tsx"
click node_toast "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/Toast.tsx"
click node_hooks "https://github.com/victoriousvijay/meeting-room-booking-system/tree/main/frontend/hooks"
click node_api_client "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/lib/api.ts"
click node_validation "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/lib/validation.ts"
click node_api_app "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/main.py"
click node_booking_routes "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/routers/bookings.py"
click node_room_routes "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/routers/rooms.py"
click node_schemas "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/schemas.py"
click node_booking_service "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/services/bookings.py"
click node_room_service "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/services/rooms.py"
click node_scheduling "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/scheduling.py"
click node_errors "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/errors.py"
click node_seed "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/seed.py"
click node_db_session "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/database.py"
click node_models "https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/models.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_filters,node_roomcard,node_modal,node_nextfinder,node_states,node_toast toneBlue
class node_hooks,node_api_client,node_validation toneAmber
class node_api_app,node_booking_routes,node_room_routes,node_schemas toneMint
class node_booking_service,node_room_service,node_scheduling,node_errors,node_seed toneRose
class node_db_session,node_models,node_postgres,node_user toneIndigo
```

## Components

### Booking interface

- [Booking dashboard](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/BookingDashboard.tsx): `frontend/components/BookingDashboard.tsx`
- [Date and room filters](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/Filters.tsx): `frontend/components/Filters.tsx`
- [Room day card](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/RoomCard.tsx): `frontend/components/RoomCard.tsx`
- [Booking form](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/BookingModal.tsx): `frontend/components/BookingModal.tsx`
- [Next slot finder](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/NextSlotFinder.tsx): `frontend/components/NextSlotFinder.tsx`
- [Loading and errors](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/States.tsx): `frontend/components/States.tsx`
- [Toast notifications](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/components/Toast.tsx): `frontend/components/Toast.tsx`

### Frontend data

- [Room and booking hooks](https://github.com/victoriousvijay/meeting-room-booking-system/tree/main/frontend/hooks): `frontend/hooks`
- [API client](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`
- [Form validation](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/frontend/lib/validation.ts): `frontend/lib/validation.ts`

### HTTP API

- [FastAPI application](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/main.py): `backend/app/main.py`
- [Booking routes](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/routers/bookings.py): `backend/app/routers/bookings.py`
- [Room routes](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/routers/rooms.py): `backend/app/routers/rooms.py`
- [Request and response schemas](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/schemas.py): `backend/app/schemas.py`

### Booking domain

- [Booking operations](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/services/bookings.py): `backend/app/services/bookings.py`
- [Room operations](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/services/rooms.py): `backend/app/services/rooms.py`
- [Scheduling rules](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/scheduling.py): `backend/app/scheduling.py`
- [API errors](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/errors.py): `backend/app/errors.py`
- [Room initialization](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/seed.py): `backend/app/seed.py`

### Persistence

- [Database sessions](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/database.py): `backend/app/database.py`
- [Room and booking tables](https://github.com/victoriousvijay/meeting-room-booking-system/blob/main/backend/app/models.py): `backend/app/models.py`
- **PostgreSQL**

### Other components

- **Room booker**

## Connections

- Room booker → Booking dashboard: uses (evidence: `README.md`)
- Booking dashboard → Date and room filters: renders (evidence: `frontend/components/BookingDashboard.tsx`)
- Booking dashboard → Room day card: renders (evidence: `frontend/components/BookingDashboard.tsx`)
- Booking dashboard → Booking form: renders (evidence: `frontend/components/BookingDashboard.tsx`)
- Booking dashboard → Next slot finder: renders (evidence: `frontend/components/BookingDashboard.tsx`)
- Booking dashboard → Loading and errors: renders (evidence: `frontend/components/BookingDashboard.tsx`)
- Booking dashboard → Room and booking hooks: loads data (evidence: `frontend/components/BookingDashboard.tsx`)
- Booking dashboard → API client: creates and cancels (evidence: `frontend/components/BookingDashboard.tsx`)
- Booking dashboard → Toast notifications: notifies (evidence: `frontend/components/BookingDashboard.tsx`)
- Booking form → Form validation: validates (evidence: `frontend/components/BookingModal.tsx`)
- Room and booking hooks → API client: fetches data (evidence: `README.md`)
- API client → FastAPI application: HTTP requests (evidence: `README.md`)
- FastAPI application → Booking routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Room routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Room initialization: initializes on startup (evidence: `backend/app/main.py`)
- Booking routes → Booking operations: calls (evidence: `backend/app/routers/bookings.py`)
- Room routes → Room operations: calls (evidence: `backend/app/routers/rooms.py`)
- Booking routes → Request and response schemas: validates and shapes (evidence: `backend/app/routers/bookings.py`)
- Room routes → Request and response schemas: shapes responses (evidence: `backend/app/routers/rooms.py`)
- Booking operations → Scheduling rules: checks booking rules (evidence: `backend/app/services/bookings.py`)
- Room operations → Scheduling rules: finds free slots (evidence: `backend/app/services/rooms.py`)
- Booking operations → Room operations: looks up room (evidence: `backend/app/services/bookings.py`)
- Booking operations → API errors: raises domain errors (evidence: `backend/app/services/bookings.py`)
- Room operations → API errors: raises not found (evidence: `backend/app/services/rooms.py`)
- FastAPI application → API errors: maps to responses (evidence: `backend/app/main.py`)
- Booking operations → Room and booking tables: reads and writes (evidence: `backend/app/services/bookings.py`)
- Room operations → Room and booking tables: reads (evidence: `backend/app/services/rooms.py`)
- Room initialization → Room and booking tables: creates room records (evidence: `backend/app/seed.py`)
- Room and booking tables → Database sessions: uses base (evidence: `backend/app/models.py`)
- Database sessions → PostgreSQL: queries database (evidence: `backend/app/database.py`)
