# ava0509/cinema-reservation-system architecture

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

- Interactive diagram: https://gitdiagram.com/ava0509/cinema-reservation-system
- Repository: https://github.com/ava0509/cinema-reservation-system

## Overview

This is a Tkinter cinema reservation application backed by MySQL. The customer workflow is account registration or login, movie/show selection, seat selection, booking, and later booking search or cancellation. The graph separates customer-facing stages, seat selection, and persistence; the admin page is a separate, partial capability. Source excerpts do not show the full booking/cancellation implementation, and the SQL schema and seed data were not sampled, so those details are represented only at the documented level.

Main entry points: [`customer.py`](https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py) (Customer app), [`database.py`](https://github.com/ava0509/cinema-reservation-system/blob/main/database.py) (MySQL connection), [`Seat_selection.py`](https://github.com/ava0509/cinema-reservation-system/blob/main/Seat_selection.py) (Seat picker), [`database_structure.sql`](https://github.com/ava0509/cinema-reservation-system/blob/main/database_structure.sql) (Cinema schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer experience"]
  node_customer["Customer app<br/>[customer.py]"]
  node_auth["Registration and login<br/>[customer.py]"]
  node_catalog["Movies and showtimes<br/>[customer.py]"]
  node_booking["Booking and confirmation<br/>[customer.py]"]
  node_booking_lookup["Booking search and cancellation<br/>[customer.py]"]
end

subgraph group_seats["Seat selection"]
  node_seat_picker["Seat picker<br/>[Seat_selection.py]"]
end

subgraph group_storage["Database access"]
  node_db_connection[("MySQL connection<br/>[database.py]")]
  node_database_schema["Cinema schema"]
  node_seat_initializer["Seat initializer"]
end

subgraph group_admin["Admin access"]
  node_admin_page["Admin page<br/>[admin.py]"]
end

node_customer_actor(("Customer"))
node_mysql[("MySQL")]

node_customer_actor -->|"uses"| node_customer
node_customer -->|"offers"| node_auth
node_customer -->|"lists"| node_catalog
node_customer -->|"books"| node_booking
node_customer -->|"manages"| node_booking_lookup
node_customer -->|"opens"| node_seat_picker
node_seat_picker -->|"reads availability"| node_db_connection
node_customer -->|"queries and updates"| node_db_connection
node_db_connection -->|"connects"| node_mysql
node_database_schema -.->|"defines schema"| node_mysql
node_seat_initializer -.->|"seeds seats"| node_database_schema
node_admin_page -->|"uses"| node_db_connection

click node_customer "https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py"
click node_auth "https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py"
click node_catalog "https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py"
click node_booking "https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py"
click node_booking_lookup "https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py"
click node_seat_picker "https://github.com/ava0509/cinema-reservation-system/blob/main/Seat_selection.py"
click node_db_connection "https://github.com/ava0509/cinema-reservation-system/blob/main/database.py"
click node_database_schema "https://github.com/ava0509/cinema-reservation-system/blob/main/database_structure.sql"
click node_seat_initializer "https://github.com/ava0509/cinema-reservation-system/blob/main/Seats%20insertion%20(one-time%20execution).py"
click node_admin_page "https://github.com/ava0509/cinema-reservation-system/blob/main/admin.py"

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_customer,node_auth,node_catalog,node_booking,node_booking_lookup toneBlue
class node_seat_picker,node_mysql toneAmber
class node_db_connection,node_database_schema,node_seat_initializer toneMint
class node_admin_page toneRose
class node_customer_actor toneIndigo
```

## Components

### Customer experience

- [Customer app](https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py): `customer.py`
- [Registration and login](https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py): `customer.py`
- [Movies and showtimes](https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py): `customer.py`
- [Booking and confirmation](https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py): `customer.py`
- [Booking search and cancellation](https://github.com/ava0509/cinema-reservation-system/blob/main/customer.py): `customer.py`

### Seat selection

- [Seat picker](https://github.com/ava0509/cinema-reservation-system/blob/main/Seat_selection.py): `Seat_selection.py`

### Database access

- [MySQL connection](https://github.com/ava0509/cinema-reservation-system/blob/main/database.py): `database.py`
- [Cinema schema](https://github.com/ava0509/cinema-reservation-system/blob/main/database_structure.sql): `database_structure.sql`
- [Seat initializer](https://github.com/ava0509/cinema-reservation-system/blob/main/Seats%20insertion%20(one-time%20execution).py): `Seats insertion (one-time execution).py`

### Admin access

- [Admin page](https://github.com/ava0509/cinema-reservation-system/blob/main/admin.py): `admin.py`

### Other components

- **Customer**
- **MySQL**

## Connections

- Customer → Customer app: uses (evidence: `README.md`)
- Customer app → Registration and login: offers (evidence: `README.md`)
- Customer app → Movies and showtimes: lists (evidence: `customer.py`)
- Customer app → Booking and confirmation: books (evidence: `README.md`)
- Customer app → Booking search and cancellation: manages (evidence: `README.md`)
- Customer app → Seat picker: opens (evidence: `customer.py`)
- Seat picker → MySQL connection: reads availability (evidence: `Seat_selection.py`)
- Customer app → MySQL connection: queries and updates (evidence: `customer.py`)
- MySQL connection → MySQL: connects (evidence: `database.py`)
- Cinema schema → MySQL: defines schema
- Seat initializer → Cinema schema: seeds seats
- Admin page → MySQL connection: uses (evidence: `admin.py`)
