# lunaboy65/meehongpa-booking architecture

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

- Interactive diagram: https://gitdiagram.com/lunaboy65/meehongpa-booking
- Repository: https://github.com/lunaboy65/meehongpa-booking

## Overview

RoomDesk is a meeting-room reservation and administration product: users find rooms, create bookings, and check in; administrators manage rooms, users, approvals, and analytics. The client separates UI pages, domain services, and an HTTP client; the FastAPI server handles domain endpoints using schemas, models, database sessions, and authentication utilities. The shown excerpts establish service-to-client and server-internal dependencies. Client-to-server endpoint wiring is apparent from matching routes, but no single cited excerpt shows both sides, so those links are marked unverified.

Main entry points: [`server/main.py`](https://github.com/lunaboy65/meehongpa-booking/blob/master/server/main.py) (FastAPI endpoints), [`client/src/services/api-client.ts`](https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/api-client.ts) (HTTP client), [`server/database.py`](https://github.com/lunaboy65/meehongpa-booking/blob/master/server/database.py) (Database sessions), [`client/src/services/booking.service.ts`](https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/booking.service.ts) (Booking service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client_ui["Client experience"]
  node_booking_pages["Booking pages"]
  node_room_pages["Room pages"]
  node_auth_pages["Auth pages"]
  node_admin_pages["Admin pages"]
  node_profile_page["Profile page<br/>[page.tsx]"]
end

subgraph group_client_services["Client services"]
  node_booking_service["Booking service<br/>[booking.service.ts]"]
  node_room_service["Room service<br/>[room.service.ts]"]
  node_auth_service["Auth service<br/>[auth.service.ts]"]
  node_user_service["User service<br/>[user.service.ts]"]
  node_analytics_service["Analytics service"]
  node_api_client["HTTP client<br/>[api-client.ts]"]
end

subgraph group_server_api["Server API"]
  node_server["FastAPI endpoints<br/>[main.py]"]
end

subgraph group_server_core["Server core"]
  node_schemas["Request schemas<br/>[schemas.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_auth_utils["Token utilities<br/>[auth_utils.py]"]
  node_database[("Database sessions<br/>[database.py]")]
end

node_member(("Room user"))
node_admin(("Administrator"))
node_db_service[("Database")]

node_booking_service -->|"sends requests"| node_api_client
node_room_service -->|"sends requests"| node_api_client
node_auth_service -->|"sends requests"| node_api_client
node_user_service -->|"sends requests"| node_api_client
node_api_client -.->|"calls API"| node_server
node_server -->|"opens sessions"| node_database
node_server -->|"uses models"| node_models
node_server -->|"uses tokens"| node_auth_utils
node_server -->|"uses schemas"| node_schemas
node_database -.->|"connects"| node_db_service
node_member -.->|"uses"| node_booking_pages
node_member -.->|"browses"| node_room_pages
node_member -.->|"authenticates"| node_auth_pages
node_admin -.->|"administers"| node_admin_pages
node_member -.->|"manages profile"| node_profile_page

click node_booking_pages "https://github.com/lunaboy65/meehongpa-booking/tree/master/client/src/app/bookings"
click node_room_pages "https://github.com/lunaboy65/meehongpa-booking/tree/master/client/src/app/rooms"
click node_auth_pages "https://github.com/lunaboy65/meehongpa-booking/tree/master/client/src/app/(auth)"
click node_admin_pages "https://github.com/lunaboy65/meehongpa-booking/tree/master/client/src/app/admin"
click node_profile_page "https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/app/profile/page.tsx"
click node_booking_service "https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/booking.service.ts"
click node_room_service "https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/room.service.ts"
click node_auth_service "https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/auth.service.ts"
click node_user_service "https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/user.service.ts"
click node_analytics_service "https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/analytics.service.ts"
click node_api_client "https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/api-client.ts"
click node_server "https://github.com/lunaboy65/meehongpa-booking/blob/master/server/main.py"
click node_schemas "https://github.com/lunaboy65/meehongpa-booking/blob/master/server/schemas.py"
click node_models "https://github.com/lunaboy65/meehongpa-booking/blob/master/server/models.py"
click node_auth_utils "https://github.com/lunaboy65/meehongpa-booking/blob/master/server/auth_utils.py"
click node_database "https://github.com/lunaboy65/meehongpa-booking/blob/master/server/database.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_booking_pages,node_room_pages,node_auth_pages,node_admin_pages,node_profile_page,node_member toneBlue
class node_booking_service,node_room_service,node_auth_service,node_user_service,node_analytics_service,node_api_client,node_db_service toneAmber
class node_server toneMint
class node_schemas,node_models,node_auth_utils,node_database toneRose
class node_admin toneIndigo
```

## Components

### Client experience

- [Booking pages](https://github.com/lunaboy65/meehongpa-booking/tree/master/client/src/app/bookings): `client/src/app/bookings`
- [Room pages](https://github.com/lunaboy65/meehongpa-booking/tree/master/client/src/app/rooms): `client/src/app/rooms`
- [Auth pages](https://github.com/lunaboy65/meehongpa-booking/tree/master/client/src/app/(auth)): `client/src/app/(auth)`
- [Admin pages](https://github.com/lunaboy65/meehongpa-booking/tree/master/client/src/app/admin): `client/src/app/admin`
- [Profile page](https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/app/profile/page.tsx): `client/src/app/profile/page.tsx`

### Client services

- [Booking service](https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/booking.service.ts): `client/src/services/booking.service.ts`
- [Room service](https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/room.service.ts): `client/src/services/room.service.ts`
- [Auth service](https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/auth.service.ts): `client/src/services/auth.service.ts`
- [User service](https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/user.service.ts): `client/src/services/user.service.ts`
- [Analytics service](https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/analytics.service.ts): `client/src/services/analytics.service.ts`
- [HTTP client](https://github.com/lunaboy65/meehongpa-booking/blob/master/client/src/services/api-client.ts): `client/src/services/api-client.ts`

### Server API

- [FastAPI endpoints](https://github.com/lunaboy65/meehongpa-booking/blob/master/server/main.py): `server/main.py`

### Server core

- [Request schemas](https://github.com/lunaboy65/meehongpa-booking/blob/master/server/schemas.py): `server/schemas.py`
- [Domain models](https://github.com/lunaboy65/meehongpa-booking/blob/master/server/models.py): `server/models.py`
- [Token utilities](https://github.com/lunaboy65/meehongpa-booking/blob/master/server/auth_utils.py): `server/auth_utils.py`
- [Database sessions](https://github.com/lunaboy65/meehongpa-booking/blob/master/server/database.py): `server/database.py`

### Other components

- **Room user**
- **Administrator**
- **Database**

## Connections

- Booking service → HTTP client: sends requests (evidence: `client/src/services/booking.service.ts`)
- Room service → HTTP client: sends requests (evidence: `client/src/services/room.service.ts`)
- Auth service → HTTP client: sends requests (evidence: `client/src/services/auth.service.ts`)
- User service → HTTP client: sends requests (evidence: `client/src/services/user.service.ts`)
- HTTP client → FastAPI endpoints: calls API
- FastAPI endpoints → Database sessions: opens sessions (evidence: `server/main.py`)
- FastAPI endpoints → Domain models: uses models (evidence: `server/main.py`)
- FastAPI endpoints → Token utilities: uses tokens (evidence: `server/main.py`)
- FastAPI endpoints → Request schemas: uses schemas (evidence: `server/main.py`)
- Database sessions → Database: connects
- Room user → Booking pages: uses
- Room user → Room pages: browses
- Room user → Auth pages: authenticates
- Administrator → Admin pages: administers
- Room user → Profile page: manages profile
