# shubhamstr/meeting-room-booking architecture

> Architecture diagram of the GitHub repository shubhamstr/meeting-room-booking, 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/shubhamstr/meeting-room-booking
- Repository: https://github.com/shubhamstr/meeting-room-booking

## Overview

TurboSoft is a meeting-room booking service with an SSR web interface and REST APIs. Users browse rooms and availability, submit reservations, and manage bookings; the service persists customers, rooms, and reservations in PostgreSQL. Zoho CRM customer synchronization and Google Calendar event management are distinct integration capabilities, with queued work supporting deferred calendar processing. The excerpts show route ownership and key service dependencies; unsampled route behavior is represented only where documented or indexed.

Main entry points: [`src/app.js`](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/app.js) (Express app), [`src/services/bookingService.js`](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/bookingService.js) (Booking service), [`src/routes/frontendRoutes.js`](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/routes/frontendRoutes.js) (Web routes), [`src/services/queueService.js`](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/queueService.js) (Queue service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web and API"]
  node_express_app["Express app<br/>[app.js]"]
  node_frontend_routes["Web routes<br/>[frontendRoutes.js]"]
  node_api_routes["Core API routes<br/>[apiRoutes.js]"]
  node_zoho_routes["Zoho routes<br/>[zohoRoutes.js]"]
  node_calendar_routes["Calendar routes<br/>[calendarRoutes.js]"]
  node_views["SSR templates"]
  node_browser_ui["Browser interface<br/>[app.js]"]
  node_error_middleware["Error handling<br/>[errorHandler.js]"]
end

subgraph group_booking["Booking domain"]
  node_booking_service["Booking service<br/>[bookingService.js]"]
  node_time_slots["Time slot rules<br/>[timeSlots.js]"]
end

subgraph group_integrations["External integrations"]
  node_zoho_service["Zoho CRM service<br/>[zohoCrmService.js]"]
  node_calendar_service["Calendar service"]
end

subgraph group_persistence["Persistence and jobs"]
  node_queue_service["Queue service<br/>[queueService.js]"]
  node_db_layer["Database setup<br/>[db.js]"]
  node_server["Server startup<br/>[server.js]"]
end

node_user(("User"))
node_api_client(("API client"))
node_zoho_crm["Zoho CRM"]
node_google_calendar["Google Calendar"]
node_postgres[("PostgreSQL")]

node_user -->|"sends requests"| node_express_app
node_api_client -->|"sends requests"| node_express_app
node_express_app -->|"mounts routes"| node_frontend_routes
node_express_app -->|"mounts routes"| node_api_routes
node_express_app -->|"mounts routes"| node_zoho_routes
node_express_app -->|"mounts routes"| node_calendar_routes
node_express_app -->|"registers handlers"| node_error_middleware
node_frontend_routes -->|"renders views"| node_views
node_browser_ui -.->|"requests service"| node_express_app
node_frontend_routes -->|"calls booking operations"| node_booking_service
node_api_routes -->|"calls booking operations"| node_booking_service
node_zoho_routes -->|"calls CRM operations"| node_zoho_service
node_zoho_routes -->|"syncs customer data"| node_booking_service
node_calendar_routes -->|"calls calendar operations"| node_calendar_service
node_calendar_routes -->|"reads bookings"| node_booking_service
node_frontend_routes -->|"calls calendar operations"| node_calendar_service
node_frontend_routes -->|"uses queued jobs"| node_queue_service
node_booking_service -->|"queries and transacts"| node_db_layer
node_booking_service -->|"resolves availability"| node_time_slots
node_db_layer -->|"persists records"| node_postgres
node_zoho_service -->|"syncs CRM data"| node_zoho_crm
node_calendar_service -->|"manages events"| node_google_calendar
node_queue_service -->|"stores job state"| node_db_layer
node_queue_service -->|"processes calendar jobs"| node_calendar_service
node_server -->|"starts HTTP app"| node_express_app
node_server -->|"initializes schema"| node_db_layer
node_server -->|"starts worker"| node_queue_service

click node_express_app "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/app.js"
click node_frontend_routes "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/routes/frontendRoutes.js"
click node_api_routes "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/routes/apiRoutes.js"
click node_zoho_routes "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/routes/zohoRoutes.js"
click node_calendar_routes "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/routes/calendarRoutes.js"
click node_views "https://github.com/shubhamstr/meeting-room-booking/tree/main/src/views"
click node_browser_ui "https://github.com/shubhamstr/meeting-room-booking/blob/main/public/js/app.js"
click node_booking_service "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/bookingService.js"
click node_time_slots "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/config/timeSlots.js"
click node_zoho_service "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/zohoCrmService.js"
click node_calendar_service "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/googleCalendarService.js"
click node_queue_service "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/queueService.js"
click node_db_layer "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/config/db.js"
click node_server "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/server.js"
click node_error_middleware "https://github.com/shubhamstr/meeting-room-booking/blob/main/src/middlewares/errorHandler.js"

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_express_app,node_frontend_routes,node_api_routes,node_zoho_routes,node_calendar_routes,node_views,node_browser_ui,node_error_middleware,node_user,node_api_client toneBlue
class node_booking_service,node_time_slots,node_postgres toneAmber
class node_zoho_service,node_calendar_service toneMint
class node_queue_service,node_db_layer,node_server toneRose
class node_zoho_crm,node_google_calendar toneIndigo
```

## Components

### Web and API

- [Express app](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/app.js): `src/app.js`
- [Web routes](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/routes/frontendRoutes.js): `src/routes/frontendRoutes.js`
- [Core API routes](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/routes/apiRoutes.js): `src/routes/apiRoutes.js`
- [Zoho routes](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/routes/zohoRoutes.js): `src/routes/zohoRoutes.js`
- [Calendar routes](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/routes/calendarRoutes.js): `src/routes/calendarRoutes.js`
- [SSR templates](https://github.com/shubhamstr/meeting-room-booking/tree/main/src/views): `src/views`
- [Browser interface](https://github.com/shubhamstr/meeting-room-booking/blob/main/public/js/app.js): `public/js/app.js`
- [Error handling](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/middlewares/errorHandler.js): `src/middlewares/errorHandler.js`

### Booking domain

- [Booking service](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/bookingService.js): `src/services/bookingService.js`
- [Time slot rules](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/config/timeSlots.js): `src/config/timeSlots.js`

### External integrations

- [Zoho CRM service](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/zohoCrmService.js): `src/services/zohoCrmService.js`
- [Calendar service](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/googleCalendarService.js): `src/services/googleCalendarService.js`

### Persistence and jobs

- [Queue service](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/services/queueService.js): `src/services/queueService.js`
- [Database setup](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/config/db.js): `src/config/db.js`
- [Server startup](https://github.com/shubhamstr/meeting-room-booking/blob/main/src/server.js): `src/server.js`

### Other components

- **User**
- **API client**
- **Zoho CRM**
- **Google Calendar**
- **PostgreSQL**

## Connections

- User → Express app: sends requests (evidence: `README.md`)
- API client → Express app: sends requests (evidence: `README.md`)
- Express app → Web routes: mounts routes (evidence: `src/app.js`)
- Express app → Core API routes: mounts routes (evidence: `src/app.js`)
- Express app → Zoho routes: mounts routes (evidence: `src/app.js`)
- Express app → Calendar routes: mounts routes (evidence: `src/app.js`)
- Express app → Error handling: registers handlers (evidence: `src/app.js`)
- Web routes → SSR templates: renders views (evidence: `README.md`)
- Browser interface → Express app: requests service
- Web routes → Booking service: calls booking operations (evidence: `src/routes/frontendRoutes.js`)
- Core API routes → Booking service: calls booking operations (evidence: `src/routes/apiRoutes.js`)
- Zoho routes → Zoho CRM service: calls CRM operations (evidence: `src/routes/zohoRoutes.js`)
- Zoho routes → Booking service: syncs customer data (evidence: `src/routes/zohoRoutes.js`)
- Calendar routes → Calendar service: calls calendar operations (evidence: `src/routes/calendarRoutes.js`)
- Calendar routes → Booking service: reads bookings (evidence: `src/routes/calendarRoutes.js`)
- Web routes → Calendar service: calls calendar operations (evidence: `src/routes/frontendRoutes.js`)
- Web routes → Queue service: uses queued jobs (evidence: `src/routes/frontendRoutes.js`)
- Booking service → Database setup: queries and transacts (evidence: `src/services/bookingService.js`)
- Booking service → Time slot rules: resolves availability (evidence: `src/services/bookingService.js`)
- Database setup → PostgreSQL: persists records (evidence: `README.md`)
- Zoho CRM service → Zoho CRM: syncs CRM data (evidence: `README.md`)
- Calendar service → Google Calendar: manages events (evidence: `README.md`)
- Queue service → Database setup: stores job state (evidence: `src/services/queueService.js`)
- Queue service → Calendar service: processes calendar jobs (evidence: `src/services/queueService.js`)
- Server startup → Express app: starts HTTP app (evidence: `src/server.js`)
- Server startup → Database setup: initializes schema (evidence: `src/server.js`)
- Server startup → Queue service: starts worker (evidence: `src/server.js`)
