# zfnick/simple-cinema-booking-system architecture

> Architecture diagram of the GitHub repository zfnick/simple-cinema-booking-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zfnick/simple-cinema-booking-system
- Repository: https://github.com/zfnick/simple-cinema-booking-system

## Overview

##### Main Components

a) Core Modules (represented as rectangles):
- Movie Management Module (MovieList.hpp)
- Seat Management Module (seatArrangement.hpp)
- Booking Interface (menuSelection.hpp)
- Receipt Generation Module (DisplayReceipt.hpp)
- Seat Visualization Module (ViewSeats.hpp)

b) Data Flow Components:
- User Input/Output Interface
- Data Storage (in-memory structures)
- Booking Processing Pipeline

**┌─────────────────────────┐**
- Menu Selection       │
- ┘

**┌─────────────┐ ┌─────────────┐ ┌─────────────┐**
- Movie List  │ │ View Seats  │ │  Booking    │
- ┘ └─────────────┘ └─────────────┘

**┌─────────────┐ ┌─────────────────────┐**
- Seat      │ │    Receipt          │
- Arrangement │ │    Generation       │
- ┘ └─────────────────────┘

##### Component Relationships

- Menu Selection → Movie List (movie browsing)
- Menu Selection → View Seats (seat visualization)
- View Seats → Seat Arrangement (seat status checking)
- Menu Selection → Booking Processing (booking creation)
- Booking Processing → Receipt Generation (receipt creation)

##### Technical Details

Notes indicating:
- C++ implementation
- In-memory data storage
- Header-only architecture (.hpp files)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef business fill:#2ecc71,stroke:#27ae60,color:white
    classDef data fill:#f1c40f,stroke:#f39c12,color:black
    classDef critical fill:#e74c3c,stroke:#c0392b,color:white

    %% User Interface Layer
    subgraph UI
        Menu["Menu Selection"]:::ui
    end
    click Menu "https://github.com/zfnick/Simple-Cinema-Booking-System/blob/main/menuSelection.hpp"

    %% Business Logic Layer
    subgraph BusinessLogic
        MovieMgmt["Movie Management"]:::business
        SeatView["Seat Visualization"]:::business
        BookingProc["Booking Processing"]:::business
    end
    click MovieMgmt "https://github.com/zfnick/Simple-Cinema-Booking-System/blob/main/MovieList.hpp"
    click SeatView "https://github.com/zfnick/Simple-Cinema-Booking-System/blob/main/ViewSeats.hpp"

    %% Data Management Layer
    subgraph DataManagement
        SeatArrange["Seat Arrangement"]:::data
        ReceiptGen["Receipt Generation"]:::data
    end
    click SeatArrange "https://github.com/zfnick/Simple-Cinema-Booking-System/blob/main/seatArrangement.hpp"
    click ReceiptGen "https://github.com/zfnick/Simple-Cinema-Booking-System/blob/main/DisplayReceipt.hpp"

    %% Entry Point
    Entry["Application Entry"]:::ui
    click Entry "https://github.com/zfnick/Simple-Cinema-Booking-System/blob/main/main.cpp"

    %% Relationships
    Entry --> Menu
    Menu --> MovieMgmt
    Menu --> SeatView
    Menu --> BookingProc
    SeatView --> SeatArrange
    BookingProc --> ReceiptGen
    ReceiptGen --> Menu

    %% Annotations
    note["System Constraints:<br/>- Max 5 seats per booking<br/>- Twin seat rules apply<br/>- Adult/Child ticket types<br/>- C++ Implementation<br/>- In-memory storage"]

    %% Legend
    subgraph Legend
        UI_L["User Interface"]:::ui
        BL_L["Business Logic"]:::business
        DM_L["Data Management"]:::data
        CR_L["Critical Path"]:::critical
    end
```
