# eirandrie/kubo_reservationmanagementsystem architecture

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

- Interactive diagram: https://gitdiagram.com/eirandrie/kubo_reservationmanagementsystem
- Repository: https://github.com/eirandrie/kubo_reservationmanagementsystem

## Overview

KUBO is a beach-resort reservation-management system: staff and administrators use a role-protected React app to manage guests, reservations, room assignments, charges, payments, and operations; an Express API serves those workflows over PostgreSQL. The graph separates frontend workflows, backend domain modules, and shared infrastructure. README capabilities are retained, but the excerpts do not show all route wiring or frontend-to-API calls, so those links are omitted rather than inferred.

Main entry points: [`frontend/src/App.tsx`](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/App.tsx) (React app routes), [`backend/src/config/connectDB.ts`](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/config/connectDB.ts) (PostgreSQL), [`backend/src/modules/reservation/reservation.controllers.ts`](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/reservation/reservation.controllers.ts) (Reservations), [`backend/src/utils/http.ts`](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/utils/http.ts) (HTTP validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_front["Staff application"]
  node_app["React app routes<br/>[App.tsx]"]
  node_login["Sign-in<br/>[auth.service.ts]"]
  node_guestui["Guest screens<br/>[guest.service.ts]"]
  node_reserveui["Reservation screens"]
  node_deskui["Front desk"]
  node_kuboui["Kubo screens<br/>[kubo.service.ts]"]
  node_payui["Payment screens<br/>[payment.service.ts]"]
  node_reportui["Daily reports<br/>[report.service.ts]"]
  node_auditui["Audit screens"]
end

subgraph group_stay["Reservation operations"]
  node_reservation["Reservations"]
  node_assignment["Room assignments"]
end

subgraph group_catalog["People and inventory"]
  node_guest["Guest records"]
  node_employees["Employees and roles"]
  node_kubo["Kubo inventory"]
  node_kubotype["Kubo types"]
end

subgraph group_finance["Charges and reporting"]
  node_charges["Additional charges"]
  node_payments["Payments and refunds"]
  node_reports["Operational reports"]
  node_audit["Audit log"]
end

subgraph group_platform["API and infrastructure"]
  node_auth["Authentication and access<br/>[auth.services.ts]"]
  node_api["Express API server<br/>[server.ts]"]
  node_database[("PostgreSQL<br/>[connectDB.ts]")]
  node_http["HTTP validation<br/>[http.ts]"]
  node_logger["Application logging<br/>[logger.ts]"]
  node_pagination["Pagination utility<br/>[pagination.ts]"]
end

node_staff(("Staff user"))

node_staff -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_guestui
node_app -->|"routes to"| node_reserveui
node_app -->|"routes to"| node_deskui
node_app -->|"routes to"| node_kuboui
node_app -->|"routes to"| node_payui
node_app -->|"routes to"| node_reportui
node_app -->|"routes to"| node_auditui
node_reservation -.->|"assigns kubos"| node_assignment
node_api -->|"connects"| node_database
node_reservation -.->|"validates requests"| node_http
node_charges -->|"uses errors"| node_http
node_payments -->|"uses errors"| node_http
node_reservation -.->|"persists data"| node_database
node_guest -.->|"persists data"| node_database
node_kubo -.->|"persists data"| node_database
node_payments -.->|"persists data"| node_database
node_auth -->|"records events"| node_audit
node_reservation -.->|"paginates results"| node_pagination
node_guest -.->|"paginates results"| node_pagination
node_logger -.-> node_database

click node_app "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/App.tsx"
click node_login "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/auth/services/auth.service.ts"
click node_guestui "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/guest/services/guest.service.ts"
click node_reserveui "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/reservation/services/reservation.service.ts"
click node_deskui "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/check-in-out/services/check-in-out.service.ts"
click node_kuboui "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/kubo/services/kubo.service.ts"
click node_payui "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/payment/services/payment.service.ts"
click node_reportui "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/reports/services/report.service.ts"
click node_auditui "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/audit-logs/services/audit-log.service.ts"
click node_reservation "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/reservation/reservation.controllers.ts"
click node_assignment "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/reserved-room_kubo/reserved-room_kubo.controllers.ts"
click node_guest "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/guest/guest.controllers.ts"
click node_employees "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/employee/employee.controllers.ts"
click node_kubo "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/room_kubo/kubo.controllers.ts"
click node_kubotype "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/room_kubo-type/kubo-type.controllers.ts"
click node_charges "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/additional-charges/additional-charges.controllers.ts"
click node_payments "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/payment/payment.controllers.ts"
click node_reports "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/report/report.controllers.ts"
click node_audit "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/audit-logs/audit-logs.controllers.ts"
click node_auth "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/auth/auth.services.ts"
click node_api "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/server.ts"
click node_database "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/config/connectDB.ts"
click node_http "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/utils/http.ts"
click node_logger "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/utils/logger.ts"
click node_pagination "https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/utils/pagination.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_app,node_login,node_guestui,node_reserveui,node_deskui,node_kuboui,node_payui,node_reportui,node_auditui,node_staff toneBlue
class node_reservation,node_assignment toneAmber
class node_guest,node_employees,node_kubo,node_kubotype toneMint
class node_charges,node_payments,node_reports,node_audit toneRose
class node_auth,node_api,node_database,node_http,node_logger,node_pagination toneIndigo
```

## Components

### Staff application

- [React app routes](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Sign-in](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/auth/services/auth.service.ts): `frontend/src/features/auth/services/auth.service.ts`
- [Guest screens](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/guest/services/guest.service.ts): `frontend/src/features/guest/services/guest.service.ts`
- [Reservation screens](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/reservation/services/reservation.service.ts): `frontend/src/features/reservation/services/reservation.service.ts`
- [Front desk](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/check-in-out/services/check-in-out.service.ts): `frontend/src/features/check-in-out/services/check-in-out.service.ts`
- [Kubo screens](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/kubo/services/kubo.service.ts): `frontend/src/features/kubo/services/kubo.service.ts`
- [Payment screens](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/payment/services/payment.service.ts): `frontend/src/features/payment/services/payment.service.ts`
- [Daily reports](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/reports/services/report.service.ts): `frontend/src/features/reports/services/report.service.ts`
- [Audit screens](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/frontend/src/features/audit-logs/services/audit-log.service.ts): `frontend/src/features/audit-logs/services/audit-log.service.ts`

### Reservation operations

- [Reservations](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/reservation/reservation.controllers.ts): `backend/src/modules/reservation/reservation.controllers.ts`
- [Room assignments](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/reserved-room_kubo/reserved-room_kubo.controllers.ts): `backend/src/modules/reserved-room_kubo/reserved-room_kubo.controllers.ts`

### People and inventory

- [Guest records](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/guest/guest.controllers.ts): `backend/src/modules/guest/guest.controllers.ts`
- [Employees and roles](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/employee/employee.controllers.ts): `backend/src/modules/employee/employee.controllers.ts`
- [Kubo inventory](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/room_kubo/kubo.controllers.ts): `backend/src/modules/room_kubo/kubo.controllers.ts`
- [Kubo types](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/room_kubo-type/kubo-type.controllers.ts): `backend/src/modules/room_kubo-type/kubo-type.controllers.ts`

### Charges and reporting

- [Additional charges](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/additional-charges/additional-charges.controllers.ts): `backend/src/modules/additional-charges/additional-charges.controllers.ts`
- [Payments and refunds](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/payment/payment.controllers.ts): `backend/src/modules/payment/payment.controllers.ts`
- [Operational reports](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/report/report.controllers.ts): `backend/src/modules/report/report.controllers.ts`
- [Audit log](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/audit-logs/audit-logs.controllers.ts): `backend/src/modules/audit-logs/audit-logs.controllers.ts`

### API and infrastructure

- [Authentication and access](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/modules/auth/auth.services.ts): `backend/src/modules/auth/auth.services.ts`
- [Express API server](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/server.ts): `backend/src/server.ts`
- [PostgreSQL](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/config/connectDB.ts): `backend/src/config/connectDB.ts`
- [HTTP validation](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/utils/http.ts): `backend/src/utils/http.ts`
- [Application logging](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/utils/logger.ts): `backend/src/utils/logger.ts`
- [Pagination utility](https://github.com/eirandrie/kubo_reservationmanagementsystem/blob/main/backend/src/utils/pagination.ts): `backend/src/utils/pagination.ts`

### Other components

- **Staff user**

## Connections

- Staff user → React app routes: uses (evidence: `README.md`)
- React app routes → Sign-in: routes to (evidence: `frontend/src/App.tsx`)
- React app routes → Guest screens: routes to (evidence: `frontend/src/App.tsx`)
- React app routes → Reservation screens: routes to (evidence: `frontend/src/App.tsx`)
- React app routes → Front desk: routes to (evidence: `frontend/src/App.tsx`)
- React app routes → Kubo screens: routes to (evidence: `frontend/src/App.tsx`)
- React app routes → Payment screens: routes to (evidence: `frontend/src/App.tsx`)
- React app routes → Daily reports: routes to (evidence: `frontend/src/App.tsx`)
- React app routes → Audit screens: routes to (evidence: `frontend/src/App.tsx`)
- Reservations → Room assignments: assigns kubos
- Express API server → PostgreSQL: connects (evidence: `README.md`)
- Reservations → HTTP validation: validates requests (evidence: `backend/src/modules/reservation/reservation.controllers.ts`)
- Additional charges → HTTP validation: uses errors (evidence: `backend/src/modules/additional-charges/additional-charges.controllers.ts`)
- Payments and refunds → HTTP validation: uses errors (evidence: `backend/src/modules/payment/payment.controllers.ts`)
- Reservations → PostgreSQL: persists data
- Guest records → PostgreSQL: persists data
- Kubo inventory → PostgreSQL: persists data
- Payments and refunds → PostgreSQL: persists data
- Authentication and access → Audit log: records events (evidence: `backend/src/modules/auth/auth.services.ts`)
- Reservations → Pagination utility: paginates results
- Guest records → Pagination utility: paginates results
- Application logging → PostgreSQL (evidence: `backend/src/config/connectDB.ts`)
