# romstab/businessbookingsystem architecture

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

- Interactive diagram: https://gitdiagram.com/romstab/businessbookingsystem
- Repository: https://github.com/romstab/businessbookingsystem

## Overview

A .NET console booking platform supports customer discovery and appointments, business-owner operations, and administrator oversight. Program.cs is the menu/UI orchestrator; services implement authentication, business and staff setup, booking lifecycle and reporting, backed by in-memory lists persisted to local JSON. The README documents the complete customer, owner, and admin capabilities; the sampled excerpts directly establish only some call relationships, so unsampled menu actions are not wired speculatively here.

Main entry points: [`BusinessBookingSystem/Services/DataService.cs`](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/DataService.cs) (JSON data service), [`BusinessBookingSystem/Program.cs`](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Program.cs) (Menus and workflows), [`BusinessBookingSystem/Services/BusinessService.cs`](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/BusinessService.cs) (Business, services, staff), [`BusinessBookingSystem/Services/BookingService.cs`](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/BookingService.cs) (Booking lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Console interface"]
  node_console["Menus and workflows<br/>[Program.cs]"]
end

subgraph group_domain["Booking operations"]
  node_business["Business, services, staff<br/>[BusinessService.cs]"]
  node_booking["Booking lifecycle<br/>[BookingService.cs]"]
end

subgraph group_identity["Accounts"]
  node_auth["Authentication<br/>[AuthService.cs]"]
end

subgraph group_persistence["JSON persistence"]
  node_data["JSON data service<br/>[DataService.cs]"]
  node_json_users[("Users JSON<br/>[users.json]")]
  node_json_businesses[("Businesses JSON<br/>[businesses.json]")]
  node_json_services[("Services JSON<br/>[services.json]")]
  node_json_staff[("Staff JSON<br/>[staff.json]")]
  node_json_bookings[("Bookings JSON<br/>[bookings.json]")]
end

subgraph group_records["Domain records"]
  node_user_model["User record<br/>[User.cs]"]
  node_business_model["Business record<br/>[Business.cs]"]
  node_service_model["Service record<br/>[Service.cs]"]
  node_staff_model["Staff record<br/>[Staff.cs]"]
  node_booking_model["Booking record<br/>[Booking.cs]"]
end

node_customer(("Customer"))
node_owner(("Business owner"))
node_admin(("Administrator"))

node_customer -->|"uses"| node_console
node_owner -->|"uses"| node_console
node_admin -->|"uses"| node_console
node_console -->|"authenticates"| node_auth
node_console -->|"browses and manages"| node_business
node_console -->|"creates and manages"| node_booking
node_console -->|"loads and seeds"| node_data
node_booking -->|"validates and slots"| node_business
node_auth -->|"reads and saves"| node_data
node_business -->|"reads and saves"| node_data
node_booking -->|"reads and saves"| node_data
node_data -->|"loads and writes"| node_json_users
node_data -->|"loads and writes"| node_json_businesses
node_data -->|"loads and writes"| node_json_services
node_data -->|"loads and writes"| node_json_staff
node_data -->|"loads and writes"| node_json_bookings
node_auth -->|"creates and checks"| node_user_model
node_business -->|"manages"| node_business_model
node_business -->|"manages"| node_service_model
node_business -->|"manages"| node_staff_model
node_booking -->|"creates and updates"| node_booking_model

click node_console "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Program.cs"
click node_auth "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/AuthService.cs"
click node_business "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/BusinessService.cs"
click node_booking "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/BookingService.cs"
click node_data "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/DataService.cs"
click node_json_users "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/users.json"
click node_json_businesses "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/businesses.json"
click node_json_services "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/services.json"
click node_json_staff "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/staff.json"
click node_json_bookings "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/bookings.json"
click node_user_model "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/User.cs"
click node_business_model "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/Business.cs"
click node_service_model "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/Service.cs"
click node_staff_model "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/Staff.cs"
click node_booking_model "https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/Booking.cs"

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_console toneBlue
class node_business,node_booking toneAmber
class node_auth toneMint
class node_data,node_json_users,node_json_businesses,node_json_services,node_json_staff,node_json_bookings toneRose
class node_user_model,node_business_model,node_service_model,node_staff_model,node_booking_model,node_customer,node_owner,node_admin toneIndigo
```

## Components

### Console interface

- [Menus and workflows](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Program.cs): `BusinessBookingSystem/Program.cs`

### Booking operations

- [Business, services, staff](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/BusinessService.cs): `BusinessBookingSystem/Services/BusinessService.cs`
- [Booking lifecycle](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/BookingService.cs): `BusinessBookingSystem/Services/BookingService.cs`

### Accounts

- [Authentication](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/AuthService.cs): `BusinessBookingSystem/Services/AuthService.cs`

### JSON persistence

- [JSON data service](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Services/DataService.cs): `BusinessBookingSystem/Services/DataService.cs`
- [Users JSON](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/users.json): `BusinessBookingSystem/Data/users.json`
- [Businesses JSON](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/businesses.json): `BusinessBookingSystem/Data/businesses.json`
- [Services JSON](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/services.json): `BusinessBookingSystem/Data/services.json`
- [Staff JSON](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/staff.json): `BusinessBookingSystem/Data/staff.json`
- [Bookings JSON](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Data/bookings.json): `BusinessBookingSystem/Data/bookings.json`

### Domain records

- [User record](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/User.cs): `BusinessBookingSystem/Models/User.cs`
- [Business record](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/Business.cs): `BusinessBookingSystem/Models/Business.cs`
- [Service record](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/Service.cs): `BusinessBookingSystem/Models/Service.cs`
- [Staff record](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/Staff.cs): `BusinessBookingSystem/Models/Staff.cs`
- [Booking record](https://github.com/romstab/businessbookingsystem/blob/master/BusinessBookingSystem/Models/Booking.cs): `BusinessBookingSystem/Models/Booking.cs`

### Other components

- **Customer**
- **Business owner**
- **Administrator**

## Connections

- Customer → Menus and workflows: uses (evidence: `README.md`)
- Business owner → Menus and workflows: uses (evidence: `README.md`)
- Administrator → Menus and workflows: uses (evidence: `README.md`)
- Menus and workflows → Authentication: authenticates (evidence: `BusinessBookingSystem/Program.cs`)
- Menus and workflows → Business, services, staff: browses and manages (evidence: `BusinessBookingSystem/Program.cs`)
- Menus and workflows → Booking lifecycle: creates and manages (evidence: `BusinessBookingSystem/Program.cs`)
- Menus and workflows → JSON data service: loads and seeds (evidence: `BusinessBookingSystem/Program.cs`)
- Booking lifecycle → Business, services, staff: validates and slots (evidence: `BusinessBookingSystem/Services/BookingService.cs`)
- Authentication → JSON data service: reads and saves (evidence: `BusinessBookingSystem/Services/AuthService.cs`)
- Business, services, staff → JSON data service: reads and saves (evidence: `BusinessBookingSystem/Services/BusinessService.cs`)
- Booking lifecycle → JSON data service: reads and saves (evidence: `BusinessBookingSystem/Services/BookingService.cs`)
- JSON data service → Users JSON: loads and writes (evidence: `BusinessBookingSystem/Services/DataService.cs`)
- JSON data service → Businesses JSON: loads and writes (evidence: `BusinessBookingSystem/Services/DataService.cs`)
- JSON data service → Services JSON: loads and writes (evidence: `BusinessBookingSystem/Services/DataService.cs`)
- JSON data service → Staff JSON: loads and writes (evidence: `BusinessBookingSystem/Services/DataService.cs`)
- JSON data service → Bookings JSON: loads and writes (evidence: `BusinessBookingSystem/Services/DataService.cs`)
- Authentication → User record: creates and checks (evidence: `BusinessBookingSystem/Services/AuthService.cs`)
- Business, services, staff → Business record: manages (evidence: `BusinessBookingSystem/Services/BusinessService.cs`)
- Business, services, staff → Service record: manages (evidence: `BusinessBookingSystem/Services/BusinessService.cs`)
- Business, services, staff → Staff record: manages (evidence: `BusinessBookingSystem/Services/BusinessService.cs`)
- Booking lifecycle → Booking record: creates and updates (evidence: `BusinessBookingSystem/Services/BookingService.cs`)
