# hretzx/film architecture

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

- Interactive diagram: https://gitdiagram.com/hretzx/film
- Repository: https://github.com/hretzx/film

## Overview

CineBook is a Django movie-ticket booking site backed by MySQL. Its main user journey runs from account registration or login through movie browsing, show selection, seat selection, payment, confirmation, and booking history. The graph distinguishes those booking stages while grouping the direct SQL persistence layer with the relevant features. The README documents the end-to-end flow; sampled views show the database operations and rendered pages. Project-level URL wiring and unsampled implementation details are not inferred.

Main entry points: [`templates`](https://github.com/hretzx/film/tree/main/templates) (Page templates), [`users/views.py`](https://github.com/hretzx/film/blob/main/users/views.py) (Account access), [`movies/views.py`](https://github.com/hretzx/film/blob/main/movies/views.py) (Movie catalog), [`booking/views.py`](https://github.com/hretzx/film/blob/main/booking/views.py) (Show listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Accounts and history"]
  node_accounts["Account access<br/>[views.py]"]
  node_history["Booking history<br/>[views.py]"]
end

subgraph group_catalog["Movie discovery"]
  node_catalog["Movie catalog<br/>[views.py]"]
  node_movie_detail["Movie details<br/>[views.py]"]
end

subgraph group_booking["Ticket booking"]
  node_shows["Show listings<br/>[views.py]"]
  node_seat_map["Seat selection<br/>[views.py]"]
  node_booking_submit["Booking submission<br/>[views.py]"]
  node_payment["Payment workflow<br/>[views.py]"]
  node_confirmation["Booking confirmation<br/>[views.py]"]
end

subgraph group_support["Site and storage"]
  node_landing["Landing and demo<br/>[views.py]"]
  node_templates["Page templates"]
  node_mysql[("MySQL database")]
end

node_customer(("Moviegoer"))

node_customer -->|"registers or logs in"| node_accounts
node_customer -->|"browses movies"| node_catalog
node_customer -->|"selects a show"| node_shows
node_customer -->|"selects seats"| node_seat_map
node_customer -->|"submits payment"| node_payment
node_customer -->|"views history"| node_history
node_catalog -->|"queries movies"| node_mysql
node_catalog -->|"renders home"| node_templates
node_movie_detail -->|"queries movie"| node_mysql
node_movie_detail -->|"renders details"| node_templates
node_shows -->|"seeds and reads shows"| node_mysql
node_shows -->|"renders shows"| node_templates
node_seat_map -->|"reads seats"| node_mysql
node_seat_map -->|"renders seat map"| node_templates
node_booking_submit -->|"checks seat availability"| node_mysql
node_booking_submit -->|"renders payment page"| node_templates
node_payment -->|"records payment and books seats"| node_mysql
node_payment -->|"renders confirmation"| node_templates
node_accounts -->|"reads and writes accounts"| node_mysql
node_accounts -->|"renders login and registration"| node_templates
node_history -->|"queries booking records"| node_mysql
node_history -->|"renders history"| node_templates
node_landing -->|"writes and reads demo data"| node_mysql
node_landing -->|"renders landing and results"| node_templates

click node_accounts "https://github.com/hretzx/film/blob/main/users/views.py"
click node_history "https://github.com/hretzx/film/blob/main/users/views.py"
click node_catalog "https://github.com/hretzx/film/blob/main/movies/views.py"
click node_movie_detail "https://github.com/hretzx/film/blob/main/movies/views.py"
click node_landing "https://github.com/hretzx/film/blob/main/firstapp/views.py"
click node_shows "https://github.com/hretzx/film/blob/main/booking/views.py"
click node_seat_map "https://github.com/hretzx/film/blob/main/booking/views.py"
click node_booking_submit "https://github.com/hretzx/film/blob/main/booking/views.py"
click node_payment "https://github.com/hretzx/film/blob/main/booking/views.py"
click node_confirmation "https://github.com/hretzx/film/blob/main/booking/views.py"
click node_templates "https://github.com/hretzx/film/tree/main/templates"

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_accounts,node_history toneBlue
class node_catalog,node_movie_detail toneAmber
class node_shows,node_seat_map,node_booking_submit,node_payment,node_confirmation toneMint
class node_landing,node_templates,node_mysql toneRose
class node_customer toneIndigo
```

## Components

### Accounts and history

- [Account access](https://github.com/hretzx/film/blob/main/users/views.py): `users/views.py`
- [Booking history](https://github.com/hretzx/film/blob/main/users/views.py): `users/views.py`

### Movie discovery

- [Movie catalog](https://github.com/hretzx/film/blob/main/movies/views.py): `movies/views.py`
- [Movie details](https://github.com/hretzx/film/blob/main/movies/views.py): `movies/views.py`

### Ticket booking

- [Show listings](https://github.com/hretzx/film/blob/main/booking/views.py): `booking/views.py`
- [Seat selection](https://github.com/hretzx/film/blob/main/booking/views.py): `booking/views.py`
- [Booking submission](https://github.com/hretzx/film/blob/main/booking/views.py): `booking/views.py`
- [Payment workflow](https://github.com/hretzx/film/blob/main/booking/views.py): `booking/views.py`
- [Booking confirmation](https://github.com/hretzx/film/blob/main/booking/views.py): `booking/views.py`

### Site and storage

- [Landing and demo](https://github.com/hretzx/film/blob/main/firstapp/views.py): `firstapp/views.py`
- [Page templates](https://github.com/hretzx/film/tree/main/templates): `templates`
- **MySQL database**

### Other components

- **Moviegoer**

## Connections

- Moviegoer → Account access: registers or logs in (evidence: `README.md`)
- Moviegoer → Movie catalog: browses movies (evidence: `README.md`)
- Moviegoer → Show listings: selects a show (evidence: `README.md`)
- Moviegoer → Seat selection: selects seats (evidence: `README.md`)
- Moviegoer → Payment workflow: submits payment (evidence: `README.md`)
- Moviegoer → Booking history: views history (evidence: `README.md`)
- Movie catalog → MySQL database: queries movies (evidence: `movies/views.py`)
- Movie catalog → Page templates: renders home (evidence: `movies/views.py`)
- Movie details → MySQL database: queries movie (evidence: `movies/views.py`)
- Movie details → Page templates: renders details (evidence: `movies/views.py`)
- Show listings → MySQL database: seeds and reads shows (evidence: `booking/views.py`)
- Show listings → Page templates: renders shows (evidence: `booking/views.py`)
- Seat selection → MySQL database: reads seats (evidence: `booking/views.py`)
- Seat selection → Page templates: renders seat map (evidence: `booking/views.py`)
- Booking submission → MySQL database: checks seat availability (evidence: `booking/views.py`)
- Booking submission → Page templates: renders payment page (evidence: `booking/views.py`)
- Payment workflow → MySQL database: records payment and books seats (evidence: `booking/views.py`)
- Payment workflow → Page templates: renders confirmation (evidence: `booking/views.py`)
- Account access → MySQL database: reads and writes accounts (evidence: `users/views.py`)
- Account access → Page templates: renders login and registration (evidence: `users/views.py`)
- Booking history → MySQL database: queries booking records (evidence: `users/views.py`)
- Booking history → Page templates: renders history (evidence: `users/views.py`)
- Landing and demo → MySQL database: writes and reads demo data (evidence: `firstapp/views.py`)
- Landing and demo → Page templates: renders landing and results (evidence: `firstapp/views.py`)
