# eisoptrophobicc/popaction-movie-ticket-reservation-app architecture

> Architecture diagram of the GitHub repository eisoptrophobicc/popaction-movie-ticket-reservation-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eisoptrophobicc/popaction-movie-ticket-reservation-app
- Repository: https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app

## Overview

1. **Overall shape**
   - This repository is a single-user, desktop-oriented movie ticket reservation system.
   - The architecture is centered on one main Python application entry point, `popaction.py`, with supporting configuration and static media assets.

2. **Primary runtime boundary**
   - The app is not split into multiple services or microservices.
   - Most behavior appears to live in one process: the Python GUI app connects directly to a local MySQL database and renders the entire user experience in the desktop client.

3. **Presentation layer**
   - The UI is built with **CustomTkinter**, so the front end is a native desktop interface rather than a browser app.
   - The readme’s feature list implies multiple screens or views: authentication, city selection, theatre/showtime selection, seat booking, and reservation history.

4. **Application logic layer**
   - `popaction.py` is likely the orchestration point for the app flow.
   - It probably owns screen transitions, validation, state management for the current user/session, and the booking workflow from movie selection through reservation confirmation.

5. **Persistence layer**
   - **MySQL** is the only named backend datastore.
   - The database likely holds user accounts, movie listings, theatres, showtimes, seat availability, and reservation records.
   - This is a direct app-to-database architecture, with no separate API server in between.

6. **Configuration boundary**
   - The `config/` folder separates environment-specific settings from code.
   - `config/config.example.json` indicates the real config is copied from a template and used for local MySQL credentials and other runtime settings.
   - `config/README.md` suggests setup guidance is intentionally isolated from application logic.

7. **Static media and branding assets**
   - The `assets/` folder contains video files and a privacy policy HTML document.
   - The media files are likely used for splash screens, background animations, loading screens, or promotional visuals inside the desktop UI.
   - `PrivacyPolicy.html` suggests the app includes an in-app or bundled legal/info screen.

8. **Data flow**
   - User input enters through the CustomTkinter UI.
   - The app validates actions in Python, then reads/writes directly to MySQL.
   - Results from the database drive what the UI shows next: available movies, theatre options, seat states, booking confirmation, and reservation history.

9. **Authentication flow**
   - The repo explicitly supports signup, login, and password reset.
   - These flows likely map to database-backed user records and form a gate before access to booking features.
   - Since there is no separate identity provider, authentication is handled locally inside the app.

10. **Booking flow**
   - The core business path is: choose city → choose movie → choose theatre/showtime → select seats → create reservation.
   - This suggests the system maintains availability state in the database and updates it when reservations are created.

11. **Technology implications**
   - Python 3.10+ is the runtime.
   - `PIL` and `OpenCV` are probably used for image/video handling in the UI, especially since the repo includes `.mov` and `.mp4` assets.
   - The architecture is therefore UI-heavy, with multimedia presentation woven into the desktop experience.

12. **Operational constraints**
   - The project is designed for a local MySQL instance, so deployment is intentionally lightweight and developer-managed.
   - There is no evidence of cloud infrastructure, queues, background workers, or external APIs.
   - This makes the system simple to diagram: one desktop client, one local database, and a static asset bundle.

13. **What to draw in an architecture diagram**
   - Show a single Python desktop application at the center.
   - Connect it to:
     - a **MySQL database** for all persistent business data,
     - a **config file** for environment credentials/settings,
     - an **assets bundle** for media and policy content.
   - Inside the app, represent the main functional modules as authentication, catalog selection, seat booking, and reservation history.

14. **Repo structure signal**
   - The repository is intentionally small and focused: one executable script, one config area, one asset area.
   - That strongly suggests a monolithic desktop application with clear separation between UI, business logic, and externalized configuration, rather than a layered distributed system.

Main entry points: [`popaction.py`](https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/popaction.py) (PopAction app), [`config/config.example.json`](https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/config/config.example.json) (Config template), [`config/README.md`](https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/config/README.md) (Config guide), [`assets/PrivacyPolicy.html`](https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/assets/PrivacyPolicy.html) (Privacy policy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_popaction_py["PopAction app<br/>Python desktop orchestrator<br/>[popaction.py]"]
  node_ui_shell["UI shell<br/>CustomTkinter views"]
  node_auth_flow["Auth flow<br/>login signup reset"]
  node_catalog_flow["Catalog flow<br/>city movie selection"]
  node_seat_flow["Seat booking<br/>availability update"]
  node_history_view["History view<br/>reservation history"]
  node_validation["Form logic<br/>state validation"]
end

subgraph group_support["Support files"]
  node_config_example["Config template<br/>json settings"]
  node_config_guide["Config guide<br/>setup docs<br/>[README.md]"]
  node_assets_bundle["Media assets<br/>video and branding"]
  node_privacy_policy["Privacy policy<br/>legal html<br/>[PrivacyPolicy.html]"]
end

subgraph group_data["Data store"]
  node_db[("MySQL<br/>local database")]
  node_users_data[("Users<br/>account records")]
  node_schedule_data[("Showtimes<br/>catalog records")]
  node_reservations_data[("Reservations<br/>booking records")]
end

node_popaction_py -->|"drives"| node_ui_shell
node_popaction_py -->|"orchestrates"| node_validation
node_popaction_py -->|"reads/writes"| node_db
node_popaction_py -->|"loads settings"| node_config_example
node_popaction_py -->|"uses media"| node_assets_bundle
node_ui_shell -->|"navigates to"| node_auth_flow
node_ui_shell -->|"navigates to"| node_catalog_flow
node_ui_shell -->|"navigates to"| node_seat_flow
node_ui_shell -->|"navigates to"| node_history_view
node_auth_flow -->|"checks accounts"| node_users_data
node_catalog_flow -->|"queries listings"| node_schedule_data
node_seat_flow -->|"checks seats"| node_schedule_data
node_seat_flow -->|"creates booking"| node_reservations_data
node_history_view -->|"reads history"| node_reservations_data
node_validation -->|"guards"| node_auth_flow
node_validation -->|"guards"| node_catalog_flow
node_validation -->|"guards"| node_seat_flow
node_db -.->|"contains"| node_users_data
node_db -.->|"contains"| node_schedule_data
node_db -.->|"contains"| node_reservations_data
node_config_guide -->|"documents"| node_config_example
node_assets_bundle -.->|"includes"| node_privacy_policy

click node_popaction_py "https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/popaction.py"
click node_config_example "https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/config/config.example.json"
click node_config_guide "https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/config/README.md"
click node_privacy_policy "https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/assets/PrivacyPolicy.html"

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_popaction_py,node_ui_shell,node_auth_flow,node_catalog_flow,node_seat_flow,node_history_view,node_validation toneBlue
class node_config_example,node_config_guide,node_assets_bundle,node_privacy_policy toneAmber
class node_db,node_users_data,node_schedule_data,node_reservations_data toneMint
```

## Components

### Desktop app

Main Python desktop application and its user-facing flows

- [PopAction app](https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/popaction.py): Python desktop orchestrator · Single-process CustomTkinter application that coordinates the reservation workflow · `popaction.py`
- **UI shell**: CustomTkinter views · Desktop interface that switches between login, browsing, booking, and history screens
- **Auth flow**: login signup reset · Handles account creation, sign-in, and password recovery
- **Catalog flow**: city movie selection · Guides users through city, movie, theatre, and showtime selection
- **Seat booking**: availability update · Manages seat selection, booking confirmation, and reservation creation
- **History view**: reservation history · Shows past bookings and reservation details
- **Form logic**: state validation · Validates user input and controls step-by-step screen transitions

### Support files

Configuration, documentation, and bundled media assets

- [Config template](https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/config/config.example.json): json settings · Example runtime settings and local MySQL credentials template · `config/config.example.json`
- [Config guide](https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/config/README.md): setup docs · Instructions for copying and using the runtime configuration · `config/README.md`
- **Media assets**: video and branding · Bundled multimedia used for splash screens, backgrounds, and in-app visuals
- [Privacy policy](https://github.com/eisoptrophobicc/popaction-movie-ticket-reservation-app/blob/main/assets/PrivacyPolicy.html): legal html · Bundled privacy policy content shown inside the app or alongside it · `assets/PrivacyPolicy.html`

### Data store

Local persistence boundary

- **MySQL**: local database · Local persistence layer for users, movies, theatres, showtimes, seats, and reservations
- **Users**: account records · User profiles, credentials, and recovery state stored in MySQL
- **Showtimes**: catalog records · Movies, theatres, screening times, and seat availability stored in MySQL
- **Reservations**: booking records · Confirmed bookings and reservation history persisted in MySQL

## Connections

- PopAction app → UI shell: drives · Main application controls the desktop interface
- PopAction app → Form logic: orchestrates · Coordinates input checks and workflow state
- PopAction app → MySQL: reads/writes · Application talks directly to the local MySQL database
- PopAction app → Config template: loads settings · Uses environment-specific configuration for runtime connection details
- PopAction app → Media assets: uses media · Loads bundled videos and visuals into the UI
- UI shell → Auth flow: navigates to · Presents authentication screens first
- UI shell → Catalog flow: navigates to · Routes users into selection screens
- UI shell → Seat booking: navigates to · Shows booking and confirmation views
- UI shell → History view: navigates to · Displays reservation history screen
- Auth flow → Users: checks accounts · Validates and persists user identity data
- Catalog flow → Showtimes: queries listings · Retrieves movies, theatres, and showtimes
- Seat booking → Showtimes: checks seats · Reads seat availability before booking
- Seat booking → Reservations: creates booking · Writes confirmed reservations and updates availability
- History view → Reservations: reads history · Loads prior reservations for the current user
- Form logic → Auth flow: guards · Validates login, signup, and reset inputs
- Form logic → Catalog flow: guards · Validates selection step progression
- Form logic → Seat booking: guards · Ensures seat choices and booking data are valid
- MySQL → Users: contains · Stores user account records
- MySQL → Showtimes: contains · Stores catalog and availability data
- MySQL → Reservations: contains · Stores reservation records
- Config guide → Config template: documents · Explains how to use the settings template
- Media assets → Privacy policy: includes · Bundled static legal/info content alongside media assets
