# mongkulim-a07y/parking-booking-system architecture

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

- Interactive diagram: https://gitdiagram.com/mongkulim-a07y/parking-booking-system
- Repository: https://github.com/mongkulim-a07y/parking-booking-system

## Overview

This is a role-based parking-booking CLI whose intended workflow is account access, lot/slot discovery, booking and booking lifecycle management, with administration and reporting alongside it. The README documents these capabilities, but the sampled implementation is incomplete: the CLI and list/model source files are empty stubs, and FileManager methods are TODOs. The graph therefore reflects documented responsibilities and declared interfaces; it does not imply that these features currently run end to end.

Main entry points: [`include/services/FileManager.h`](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/FileManager.h) (CSV file manager), [`src/main.cpp`](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/src/main.cpp) (CLI entry), [`include/services/ParkingSystem.h`](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h) (Business coordinator), [`include/models/ParkingLot.h`](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/ParkingLot.h) (Parking lot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["CLI interaction"]
  node_cli["CLI entry<br/>[main.cpp]"]
end

subgraph group_business["Parking operations"]
  node_auth["Accounts and roles<br/>[ParkingSystem.h]"]
  node_inventory_ops["Lot administration<br/>[ParkingSystem.h]"]
  node_search_pricing["Search and pricing<br/>[ParkingSystem.h]"]
  node_booking_ops["Booking lifecycle<br/>[ParkingSystem.h]"]
  node_reports["Admin reports<br/>[ParkingSystem.h]"]
  node_system["Business coordinator<br/>[ParkingSystem.h]"]
end

subgraph group_domain["Domain and lists"]
  node_user_model["User model<br/>[User.h]"]
  node_lot_model["Parking lot<br/>[ParkingLot.h]"]
  node_floor_model["Floor<br/>[Floor.h]"]
  node_slot_model["Slot<br/>[Slot.h]"]
  node_booking_model["Booking<br/>[Booking.h]"]
  node_user_list["User list<br/>[UserList.h]"]
  node_lot_list["Lot list<br/>[LotList.h]"]
  node_floor_list["Floor list<br/>[FloorList.h]"]
  node_slot_list["Slot list<br/>[SlotList.h]"]
  node_booking_list["Booking list<br/>[BookingList.h]"]
end

subgraph group_persistence["CSV persistence"]
  node_file_manager["CSV file manager<br/>[FileManager.h]"]
  node_users_csv[("User records<br/>[users.csv]")]
  node_lots_csv[("Lot records<br/>[lots.csv]")]
  node_bookings_csv[("Booking records<br/>[bookings.csv]")]
end

node_user(("User"))

node_user -->|"uses"| node_cli
node_cli -->|"requests access"| node_auth
node_cli -->|"manages inventory"| node_inventory_ops
node_cli -->|"searches slots"| node_search_pricing
node_cli -->|"manages bookings"| node_booking_ops
node_cli -->|"requests reports"| node_reports
node_auth -->|"delegates"| node_system
node_inventory_ops -->|"delegates"| node_system
node_search_pricing -->|"delegates"| node_system
node_booking_ops -->|"delegates"| node_system
node_reports -->|"delegates"| node_system
node_system -->|"loads and saves"| node_file_manager
node_file_manager -->|"reads and writes"| node_users_csv
node_file_manager -->|"reads and writes"| node_lots_csv
node_file_manager -->|"reads and writes"| node_bookings_csv
node_file_manager -->|"loads and saves"| node_user_list
node_file_manager -->|"loads and saves"| node_lot_list
node_file_manager -->|"loads and saves"| node_booking_list
node_lot_model -->|"owns floors"| node_floor_list
node_floor_model -->|"owns slots"| node_slot_list
node_user_list -->|"stores users"| node_user_model
node_lot_list -->|"stores lots"| node_lot_model
node_floor_list -->|"stores floors"| node_floor_model
node_slot_list -->|"stores slots"| node_slot_model
node_booking_list -->|"stores bookings"| node_booking_model

click node_cli "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/src/main.cpp"
click node_auth "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h"
click node_inventory_ops "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h"
click node_search_pricing "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h"
click node_booking_ops "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h"
click node_reports "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h"
click node_system "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h"
click node_user_model "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/User.h"
click node_lot_model "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/ParkingLot.h"
click node_floor_model "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/Floor.h"
click node_slot_model "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/Slot.h"
click node_booking_model "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/Booking.h"
click node_user_list "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/UserList.h"
click node_lot_list "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/LotList.h"
click node_floor_list "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/FloorList.h"
click node_slot_list "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/SlotList.h"
click node_booking_list "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/BookingList.h"
click node_file_manager "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/FileManager.h"
click node_users_csv "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/data/users.csv"
click node_lots_csv "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/data/lots.csv"
click node_bookings_csv "https://github.com/mongkulim-a07y/parking-booking-system/blob/main/data/bookings.csv"

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_cli,node_user toneBlue
class node_auth,node_inventory_ops,node_search_pricing,node_booking_ops,node_reports,node_system toneAmber
class node_user_model,node_lot_model,node_floor_model,node_slot_model,node_booking_model,node_user_list,node_lot_list,node_floor_list,node_slot_list,node_booking_list toneMint
class node_file_manager,node_users_csv,node_lots_csv,node_bookings_csv toneRose
```

## Components

### CLI interaction

- [CLI entry](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/src/main.cpp): `src/main.cpp`

### Parking operations

- [Accounts and roles](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h): `include/services/ParkingSystem.h`
- [Lot administration](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h): `include/services/ParkingSystem.h`
- [Search and pricing](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h): `include/services/ParkingSystem.h`
- [Booking lifecycle](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h): `include/services/ParkingSystem.h`
- [Admin reports](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h): `include/services/ParkingSystem.h`
- [Business coordinator](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/ParkingSystem.h): `include/services/ParkingSystem.h`

### Domain and lists

- [User model](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/User.h): `include/models/User.h`
- [Parking lot](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/ParkingLot.h): `include/models/ParkingLot.h`
- [Floor](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/Floor.h): `include/models/Floor.h`
- [Slot](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/Slot.h): `include/models/Slot.h`
- [Booking](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/models/Booking.h): `include/models/Booking.h`
- [User list](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/UserList.h): `include/ds/UserList.h`
- [Lot list](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/LotList.h): `include/ds/LotList.h`
- [Floor list](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/FloorList.h): `include/ds/FloorList.h`
- [Slot list](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/SlotList.h): `include/ds/SlotList.h`
- [Booking list](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/ds/BookingList.h): `include/ds/BookingList.h`

### CSV persistence

- [CSV file manager](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/include/services/FileManager.h): `include/services/FileManager.h`
- [User records](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/data/users.csv): `data/users.csv`
- [Lot records](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/data/lots.csv): `data/lots.csv`
- [Booking records](https://github.com/mongkulim-a07y/parking-booking-system/blob/main/data/bookings.csv): `data/bookings.csv`

### Other components

- **User**

## Connections

- User → CLI entry: uses (evidence: `README.md`)
- CLI entry → Accounts and roles: requests access (evidence: `README.md`)
- CLI entry → Lot administration: manages inventory (evidence: `README.md`)
- CLI entry → Search and pricing: searches slots (evidence: `README.md`)
- CLI entry → Booking lifecycle: manages bookings (evidence: `README.md`)
- CLI entry → Admin reports: requests reports (evidence: `README.md`)
- Accounts and roles → Business coordinator: delegates (evidence: `include/services/ParkingSystem.h`)
- Lot administration → Business coordinator: delegates (evidence: `include/services/ParkingSystem.h`)
- Search and pricing → Business coordinator: delegates (evidence: `include/services/ParkingSystem.h`)
- Booking lifecycle → Business coordinator: delegates (evidence: `include/services/ParkingSystem.h`)
- Admin reports → Business coordinator: delegates (evidence: `include/services/ParkingSystem.h`)
- Business coordinator → CSV file manager: loads and saves (evidence: `include/services/ParkingSystem.h`)
- CSV file manager → User records: reads and writes (evidence: `include/services/FileManager.h`)
- CSV file manager → Lot records: reads and writes (evidence: `include/services/FileManager.h`)
- CSV file manager → Booking records: reads and writes (evidence: `include/services/FileManager.h`)
- CSV file manager → User list: loads and saves (evidence: `include/services/FileManager.h`)
- CSV file manager → Lot list: loads and saves (evidence: `include/services/FileManager.h`)
- CSV file manager → Booking list: loads and saves (evidence: `include/services/FileManager.h`)
- Parking lot → Floor list: owns floors (evidence: `include/models/ParkingLot.h`)
- Floor → Slot list: owns slots (evidence: `include/models/Floor.h`)
- User list → User model: stores users (evidence: `include/ds/UserList.h`)
- Lot list → Parking lot: stores lots (evidence: `include/ds/LotList.h`)
- Floor list → Floor: stores floors (evidence: `include/ds/FloorList.h`)
- Slot list → Slot: stores slots (evidence: `include/ds/SlotList.h`)
- Booking list → Booking: stores bookings (evidence: `include/ds/BookingList.h`)
