# ishmam21/seat-booking architecture

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

- Interactive diagram: https://gitdiagram.com/ishmam21/seat-booking
- Repository: https://github.com/ishmam21/seat-booking

## Overview

This is an ASP.NET MVC seat-reservation application: customers browse layouts, select seats, complete a demo checkout and review bookings; layout creators manage layouts and seats, while users can register, sign in and edit account settings. The graph follows controller-to-service and service-to-repository calls where the indexed source references support them. Several controllers and repositories were not excerpted, so their behavior is represented at subsystem level and uncertain links are omitted.

Main entry points: [`BLL/Services/LayoutService.cs`](https://github.com/ishmam21/seat-booking/blob/main/BLL/Services/LayoutService.cs) (Layout service), [`DAL/EF/AppDbContext.cs`](https://github.com/ishmam21/seat-booking/blob/main/DAL/EF/AppDbContext.cs) (Entity Framework context), [`BLL/Services/BookingService.cs`](https://github.com/ishmam21/seat-booking/blob/main/BLL/Services/BookingService.cs) (Booking service), [`DAL/EF/Tables`](https://github.com/ishmam21/seat-booking/tree/main/DAL/EF/Tables) (Reservation entities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_selection["Layout selection"]
  node_booking["Booking and checkout<br/>[BookController.cs]"]
  node_mybookings["My bookings"]
  node_layoutmanagement["Layout management"]
  node_creator["Layout creation"]
  node_accounts["Account and access"]
  node_registration["Registration"]
  node_login["Sign-in<br/>[LoginController.cs]"]
  node_preview["Seat preview<br/>[BookController.cs]"]
  node_warmup["Database warmup"]
end

subgraph group_domain["Domain services"]
  node_layouts["Layout service<br/>[LayoutService.cs]"]
  node_bookings["Booking service<br/>[BookingService.cs]"]
  node_userservice["User service<br/>[UserServices.cs]"]
  node_models["Domain models"]
end

subgraph group_storage["Persistence"]
  node_layoutrepo["Layout repository<br/>[LayoutRepo.cs]"]
  node_bookingrepo["Booking repository<br/>[BookingRepo.cs]"]
  node_userrepo["User repository<br/>[UserRepo.cs]"]
  node_context["Entity Framework context<br/>[AppDbContext.cs]"]
  node_entities["Reservation entities"]
  node_database[("PostgreSQL database")]
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_selection
node_selection -->|"requests layouts"| node_layouts
node_booking -->|"loads layout"| node_layouts
node_booking -->|"checks and creates"| node_bookings
node_mybookings -->|"loads bookings"| node_bookings
node_layoutmanagement -->|"manages layouts"| node_layouts
node_creator -->|"creates layouts"| node_layouts
node_preview -->|"loads seat data"| node_layouts
node_accounts -->|"uses user records"| node_entities
node_registration -->|"uses user records"| node_entities
node_login -->|"uses user records"| node_entities
node_warmup -->|"checks database"| node_context
node_layouts -->|"delegates storage"| node_layoutrepo
node_bookings -->|"delegates storage"| node_bookingrepo
node_userservice -->|"delegates storage"| node_userrepo
node_layoutrepo -->|"queries and saves"| node_context
node_bookingrepo -->|"queries and saves"| node_context
node_userrepo -->|"queries and saves"| node_context
node_context -->|"maps records"| node_entities
node_context -->|"persists data"| node_database
node_layouts -->|"maps layout data"| node_models
node_bookings -->|"builds booking views"| node_models

click node_selection "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/SelectController.cs"
click node_booking "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/BookController.cs"
click node_mybookings "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/MyBookingsController.cs"
click node_layoutmanagement "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/MyLayoutsController.cs"
click node_creator "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/CreatorController.cs"
click node_accounts "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/SettingsController.cs"
click node_registration "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/RegisterController.cs"
click node_login "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/LoginController.cs"
click node_preview "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/BookController.cs"
click node_warmup "https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/WarmupController.cs"
click node_layouts "https://github.com/ishmam21/seat-booking/blob/main/BLL/Services/LayoutService.cs"
click node_bookings "https://github.com/ishmam21/seat-booking/blob/main/BLL/Services/BookingService.cs"
click node_userservice "https://github.com/ishmam21/seat-booking/blob/main/BLL/Services/UserServices.cs"
click node_models "https://github.com/ishmam21/seat-booking/tree/main/BLL/Models"
click node_layoutrepo "https://github.com/ishmam21/seat-booking/blob/main/DAL/Repo/LayoutRepo.cs"
click node_bookingrepo "https://github.com/ishmam21/seat-booking/blob/main/DAL/Repo/BookingRepo.cs"
click node_userrepo "https://github.com/ishmam21/seat-booking/blob/main/DAL/Repo/UserRepo.cs"
click node_context "https://github.com/ishmam21/seat-booking/blob/main/DAL/EF/AppDbContext.cs"
click node_entities "https://github.com/ishmam21/seat-booking/tree/main/DAL/EF/Tables"

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_selection,node_booking,node_mybookings,node_layoutmanagement,node_creator,node_accounts,node_registration,node_login,node_preview,node_warmup toneBlue
class node_layouts,node_bookings,node_userservice,node_models toneAmber
class node_layoutrepo,node_bookingrepo,node_userrepo,node_context,node_entities,node_database toneMint
class node_visitor toneIndigo
```

## Components

### Web application

- [Layout selection](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/SelectController.cs): `AppLayerMVC/Controllers/SelectController.cs`
- [Booking and checkout](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/BookController.cs): `AppLayerMVC/Controllers/BookController.cs`
- [My bookings](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/MyBookingsController.cs): `AppLayerMVC/Controllers/MyBookingsController.cs`
- [Layout management](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/MyLayoutsController.cs): `AppLayerMVC/Controllers/MyLayoutsController.cs`
- [Layout creation](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/CreatorController.cs): `AppLayerMVC/Controllers/CreatorController.cs`
- [Account and access](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/SettingsController.cs): `AppLayerMVC/Controllers/SettingsController.cs`
- [Registration](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/RegisterController.cs): `AppLayerMVC/Controllers/RegisterController.cs`
- [Sign-in](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/LoginController.cs): `AppLayerMVC/Controllers/LoginController.cs`
- [Seat preview](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/BookController.cs): `AppLayerMVC/Controllers/BookController.cs`
- [Database warmup](https://github.com/ishmam21/seat-booking/blob/main/AppLayerMVC/Controllers/WarmupController.cs): `AppLayerMVC/Controllers/WarmupController.cs`

### Domain services

- [Layout service](https://github.com/ishmam21/seat-booking/blob/main/BLL/Services/LayoutService.cs): `BLL/Services/LayoutService.cs`
- [Booking service](https://github.com/ishmam21/seat-booking/blob/main/BLL/Services/BookingService.cs): `BLL/Services/BookingService.cs`
- [User service](https://github.com/ishmam21/seat-booking/blob/main/BLL/Services/UserServices.cs): `BLL/Services/UserServices.cs`
- [Domain models](https://github.com/ishmam21/seat-booking/tree/main/BLL/Models): `BLL/Models`

### Persistence

- [Layout repository](https://github.com/ishmam21/seat-booking/blob/main/DAL/Repo/LayoutRepo.cs): `DAL/Repo/LayoutRepo.cs`
- [Booking repository](https://github.com/ishmam21/seat-booking/blob/main/DAL/Repo/BookingRepo.cs): `DAL/Repo/BookingRepo.cs`
- [User repository](https://github.com/ishmam21/seat-booking/blob/main/DAL/Repo/UserRepo.cs): `DAL/Repo/UserRepo.cs`
- [Entity Framework context](https://github.com/ishmam21/seat-booking/blob/main/DAL/EF/AppDbContext.cs): `DAL/EF/AppDbContext.cs`
- [Reservation entities](https://github.com/ishmam21/seat-booking/tree/main/DAL/EF/Tables): `DAL/EF/Tables`
- **PostgreSQL database**

### Other components

- **Visitor**

## Connections

- Visitor → Layout selection: browses
- Layout selection → Layout service: requests layouts (evidence: `AppLayerMVC/Controllers/SelectController.cs`)
- Booking and checkout → Layout service: loads layout (evidence: `AppLayerMVC/Controllers/BookController.cs`)
- Booking and checkout → Booking service: checks and creates (evidence: `AppLayerMVC/Controllers/BookController.cs`)
- My bookings → Booking service: loads bookings (evidence: `AppLayerMVC/Controllers/MyBookingsController.cs`)
- Layout management → Layout service: manages layouts (evidence: `AppLayerMVC/Controllers/MyLayoutsController.cs`)
- Layout creation → Layout service: creates layouts (evidence: `AppLayerMVC/Controllers/CreatorController.cs`)
- Seat preview → Layout service: loads seat data (evidence: `AppLayerMVC/Controllers/BookController.cs`)
- Account and access → Reservation entities: uses user records (evidence: `AppLayerMVC/Controllers/SettingsController.cs`)
- Registration → Reservation entities: uses user records (evidence: `AppLayerMVC/Controllers/RegisterController.cs`)
- Sign-in → Reservation entities: uses user records (evidence: `AppLayerMVC/Controllers/LoginController.cs`)
- Database warmup → Entity Framework context: checks database (evidence: `AppLayerMVC/Controllers/WarmupController.cs`)
- Layout service → Layout repository: delegates storage (evidence: `BLL/Services/LayoutService.cs`)
- Booking service → Booking repository: delegates storage (evidence: `BLL/Services/BookingService.cs`)
- User service → User repository: delegates storage (evidence: `BLL/Services/UserServices.cs`)
- Layout repository → Entity Framework context: queries and saves (evidence: `DAL/Repo/LayoutRepo.cs`)
- Booking repository → Entity Framework context: queries and saves (evidence: `DAL/Repo/BookingRepo.cs`)
- User repository → Entity Framework context: queries and saves (evidence: `DAL/Repo/UserRepo.cs`)
- Entity Framework context → Reservation entities: maps records (evidence: `DAL/EF/AppDbContext.cs`)
- Entity Framework context → PostgreSQL database: persists data (evidence: `DAL/EF/AppDbContext.cs`)
- Layout service → Domain models: maps layout data (evidence: `BLL/Services/LayoutService.cs`)
- Booking service → Domain models: builds booking views (evidence: `BLL/Services/BookingService.cs`)
