# firmanps/booking-ruang-meeting architecture

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

- Interactive diagram: https://gitdiagram.com/firmanps/booking-ruang-meeting
- Repository: https://github.com/firmanps/booking-ruang-meeting

## Overview

MeetSpace is a meeting-room reservation application: employees discover rooms, check availability, create and manage their bookings; administrators manage rooms and oversee bookings. The main runtime spans the Next.js interface, typed API clients, NestJS controllers and domain services, and PostgreSQL. Authentication and shared Zod schemas support that flow. README capabilities are included where source excerpts were unavailable; edges are limited to relationships evidenced by excerpts, the source index, or README statements.

Main entry points: [`apps/api/src/modules/auth/auth.controller.ts`](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/auth/auth.controller.ts) (Authentication), [`apps/api/src/app.module.ts`](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/app.module.ts) (API composition), [`apps/api/src/modules/rooms/rooms.controller.ts`](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/rooms/rooms.controller.ts) (Room operations), [`apps/api/src/modules/bookings/bookings.controller.ts`](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/bookings/bookings.controller.ts) (Booking operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_home["Room discovery<br/>[page.tsx]"]
  node_employee_rooms["Employee rooms<br/>[page.tsx]"]
  node_employee_bookings["Employee bookings<br/>[page.tsx]"]
  node_admin_rooms["Room management<br/>[page.tsx]"]
  node_admin_bookings["Booking oversight<br/>[page.tsx]"]
  node_profile["Account profile<br/>[page.tsx]"]
  node_web_auth["Login and registration"]
end

subgraph group_api["API domain"]
  node_auth_api["Authentication<br/>[auth.controller.ts]"]
  node_rooms_api["Room operations"]
  node_bookings_api["Booking operations"]
  node_auth_logic["Identity logic<br/>[auth.service.ts]"]
  node_room_logic["Room logic<br/>[rooms.service.ts]"]
  node_booking_logic["Booking logic"]
end

subgraph group_platform["Shared and persistence"]
  node_room_client["Room API client<br/>[rooms.service.ts]"]
  node_booking_client["Booking API client"]
  node_profile_client["Profile API client<br/>[profile.service.ts]"]
  node_auth_client["Auth API client<br/>[auth.service.ts]"]
  node_shared_schemas["Shared Zod schemas"]
  node_prisma["Prisma access<br/>[prisma.service.ts]"]
  node_database[("PostgreSQL")]
end

subgraph group_crosscut["Identity and controls"]
  node_api_setup["API composition<br/>[app.module.ts]"]
  node_jwt_guard["JWT authorization<br/>[jwt-auth.guard.ts]"]
  node_error_filter["HTTP error formatting"]
end

node_visitor(("Employee or admin"))

node_visitor -->|"uses"| node_home
node_visitor -->|"uses"| node_employee_rooms
node_visitor -->|"uses"| node_employee_bookings
node_visitor -->|"uses"| node_admin_rooms
node_visitor -->|"uses"| node_admin_bookings
node_visitor -->|"signs in"| node_web_auth
node_home -->|"loads rooms"| node_room_client
node_room_client -->|"requests rooms"| node_rooms_api
node_booking_client -->|"requests bookings"| node_bookings_api
node_auth_client -->|"requests identity"| node_auth_api
node_profile_client -->|"requests profile"| node_auth_api
node_auth_api -->|"delegates"| node_auth_logic
node_rooms_api -->|"delegates"| node_room_logic
node_bookings_api -->|"delegates"| node_booking_logic
node_auth_logic -->|"reads and writes"| node_prisma
node_room_logic -->|"reads and writes"| node_prisma
node_booking_logic -->|"reads and writes"| node_prisma
node_prisma -->|"connects"| node_database
node_auth_api -->|"validates input"| node_shared_schemas
node_rooms_api -->|"validates input"| node_shared_schemas
node_bookings_api -->|"validates input"| node_shared_schemas
node_booking_client -->|"validates data"| node_shared_schemas
node_auth_api -->|"guards profile"| node_jwt_guard
node_api_setup -->|"registers module"| node_auth_api
node_api_setup -->|"registers module"| node_rooms_api
node_api_setup -->|"registers module"| node_bookings_api
node_api_setup -->|"configures filter"| node_error_filter

click node_home "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/page.tsx"
click node_employee_rooms "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/(employee)/rooms/%5Bslug%5D/page.tsx"
click node_employee_bookings "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/(employee)/bookings/page.tsx"
click node_admin_rooms "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/admin/manage-rooms/page.tsx"
click node_admin_bookings "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/admin/manage-bookings/page.tsx"
click node_profile "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/profile/page.tsx"
click node_web_auth "https://github.com/firmanps/booking-ruang-meeting/tree/main/apps/web/components/auth"
click node_room_client "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/lib/services/rooms.service.ts"
click node_booking_client "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/lib/services/bookings.service.ts"
click node_profile_client "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/lib/services/profile.service.ts"
click node_auth_client "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/lib/services/auth.service.ts"
click node_auth_api "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/auth/auth.controller.ts"
click node_rooms_api "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/rooms/rooms.controller.ts"
click node_bookings_api "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/bookings/bookings.controller.ts"
click node_auth_logic "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/auth/auth.service.ts"
click node_room_logic "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/rooms/rooms.service.ts"
click node_booking_logic "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/bookings/bookings.service.ts"
click node_api_setup "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/app.module.ts"
click node_shared_schemas "https://github.com/firmanps/booking-ruang-meeting/tree/main/packages/shared/schemas"
click node_prisma "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/common/prisma.service.ts"
click node_jwt_guard "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/common/jwt-auth.guard.ts"
click node_error_filter "https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/common/http-exception.filter.ts"

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_home,node_employee_rooms,node_employee_bookings,node_admin_rooms,node_admin_bookings,node_profile,node_web_auth toneBlue
class node_auth_api,node_rooms_api,node_bookings_api,node_auth_logic,node_room_logic,node_booking_logic toneAmber
class node_room_client,node_booking_client,node_profile_client,node_auth_client,node_shared_schemas,node_prisma,node_database toneMint
class node_api_setup,node_jwt_guard,node_error_filter toneRose
class node_visitor toneIndigo
```

## Components

### Web experience

- [Room discovery](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/page.tsx): `apps/web/app/page.tsx`
- [Employee rooms](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/(employee)/rooms/%5Bslug%5D/page.tsx): `apps/web/app/(employee)/rooms/[slug]/page.tsx`
- [Employee bookings](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/(employee)/bookings/page.tsx): `apps/web/app/(employee)/bookings/page.tsx`
- [Room management](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/admin/manage-rooms/page.tsx): `apps/web/app/admin/manage-rooms/page.tsx`
- [Booking oversight](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/admin/manage-bookings/page.tsx): `apps/web/app/admin/manage-bookings/page.tsx`
- [Account profile](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/app/profile/page.tsx): `apps/web/app/profile/page.tsx`
- [Login and registration](https://github.com/firmanps/booking-ruang-meeting/tree/main/apps/web/components/auth): `apps/web/components/auth`

### API domain

- [Authentication](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/auth/auth.controller.ts): `apps/api/src/modules/auth/auth.controller.ts`
- [Room operations](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/rooms/rooms.controller.ts): `apps/api/src/modules/rooms/rooms.controller.ts`
- [Booking operations](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/bookings/bookings.controller.ts): `apps/api/src/modules/bookings/bookings.controller.ts`
- [Identity logic](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/auth/auth.service.ts): `apps/api/src/modules/auth/auth.service.ts`
- [Room logic](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/rooms/rooms.service.ts): `apps/api/src/modules/rooms/rooms.service.ts`
- [Booking logic](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/modules/bookings/bookings.service.ts): `apps/api/src/modules/bookings/bookings.service.ts`

### Shared and persistence

- [Room API client](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/lib/services/rooms.service.ts): `apps/web/lib/services/rooms.service.ts`
- [Booking API client](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/lib/services/bookings.service.ts): `apps/web/lib/services/bookings.service.ts`
- [Profile API client](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/lib/services/profile.service.ts): `apps/web/lib/services/profile.service.ts`
- [Auth API client](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/web/lib/services/auth.service.ts): `apps/web/lib/services/auth.service.ts`
- [Shared Zod schemas](https://github.com/firmanps/booking-ruang-meeting/tree/main/packages/shared/schemas): `packages/shared/schemas`
- [Prisma access](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/common/prisma.service.ts): `apps/api/src/common/prisma.service.ts`
- **PostgreSQL**

### Identity and controls

- [API composition](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/app.module.ts): `apps/api/src/app.module.ts`
- [JWT authorization](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/common/jwt-auth.guard.ts): `apps/api/src/common/jwt-auth.guard.ts`
- [HTTP error formatting](https://github.com/firmanps/booking-ruang-meeting/blob/main/apps/api/src/common/http-exception.filter.ts): `apps/api/src/common/http-exception.filter.ts`

### Other components

- **Employee or admin**

## Connections

- Employee or admin → Room discovery: uses (evidence: `README.md`)
- Employee or admin → Employee rooms: uses (evidence: `README.md`)
- Employee or admin → Employee bookings: uses (evidence: `README.md`)
- Employee or admin → Room management: uses (evidence: `README.md`)
- Employee or admin → Booking oversight: uses (evidence: `README.md`)
- Employee or admin → Login and registration: signs in (evidence: `README.md`)
- Room discovery → Room API client: loads rooms (evidence: `apps/web/app/page.tsx`)
- Room API client → Room operations: requests rooms (evidence: `README.md`)
- Booking API client → Booking operations: requests bookings (evidence: `README.md`)
- Auth API client → Authentication: requests identity (evidence: `README.md`)
- Profile API client → Authentication: requests profile (evidence: `README.md`)
- Authentication → Identity logic: delegates (evidence: `apps/api/src/modules/auth/auth.controller.ts`)
- Room operations → Room logic: delegates (evidence: `apps/api/src/modules/rooms/rooms.controller.ts`)
- Booking operations → Booking logic: delegates (evidence: `apps/api/src/modules/bookings/bookings.controller.ts`)
- Identity logic → Prisma access: reads and writes (evidence: `apps/api/src/modules/auth/auth.service.ts`)
- Room logic → Prisma access: reads and writes (evidence: `apps/api/src/modules/rooms/rooms.service.ts`)
- Booking logic → Prisma access: reads and writes (evidence: `apps/api/src/modules/bookings/bookings.service.ts`)
- Prisma access → PostgreSQL: connects (evidence: `README.md`)
- Authentication → Shared Zod schemas: validates input (evidence: `apps/api/src/modules/auth/auth.controller.ts`)
- Room operations → Shared Zod schemas: validates input (evidence: `apps/api/src/modules/rooms/rooms.controller.ts`)
- Booking operations → Shared Zod schemas: validates input (evidence: `apps/api/src/modules/bookings/bookings.controller.ts`)
- Booking API client → Shared Zod schemas: validates data (evidence: `apps/web/lib/services/bookings.service.ts`)
- Authentication → JWT authorization: guards profile (evidence: `apps/api/src/modules/auth/auth.controller.ts`)
- API composition → Authentication: registers module (evidence: `apps/api/src/app.module.ts`)
- API composition → Room operations: registers module (evidence: `apps/api/src/app.module.ts`)
- API composition → Booking operations: registers module (evidence: `apps/api/src/app.module.ts`)
- API composition → HTTP error formatting: configures filter (evidence: `apps/api/src/app.module.ts`)
