# dinatikone123/streamlit_demo1 architecture

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

- Interactive diagram: https://gitdiagram.com/dinatikone123/streamlit_demo1
- Repository: https://github.com/dinatikone123/streamlit_demo1

## Overview

This is a small Streamlit movie-ticket booking app. Users enter customer and show details, choose seats, meals, and a payment method; the app validates the input, calculates fares, saves the booking, and displays confirmation. Separate menu options search bookings, list bookings, and cancel them by updating status. The runtime is a single file, so the components below are logical responsibilities rather than separate modules. Excerpts do not show every query or the full confirmation path.

Main entry points: [`app.py`](https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py) (Booking app), [`movie_booking.db`](https://github.com/dinatikone123/streamlit_demo1/blob/main/movie_booking.db) (SQLite bookings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Booking workflow"]
  node_booking_form["Booking form<br/>[app.py]"]
  node_validation["Input validation<br/>[app.py]"]
  node_fare["Fare calculation<br/>[app.py]"]
end

subgraph group_records["Booking records"]
  node_search["Booking search<br/>[app.py]"]
  node_listing["Booking listing<br/>[app.py]"]
  node_cancellation["Booking cancellation<br/>[app.py]"]
  node_database[("SQLite bookings<br/>[movie_booking.db]")]
end

subgraph group_interface["Streamlit interface"]
  node_app["Booking app<br/>[app.py]"]
  node_confirmation["Booking confirmation<br/>[app.py]"]
end

node_customer(("Customer"))

node_customer -->|"uses"| node_app
node_app -->|"shows"| node_booking_form
node_booking_form -->|"submits details"| node_validation
node_validation -->|"valid details"| node_fare
node_app -->|"creates table"| node_database
node_app -->|"inserts booking"| node_database
node_app -->|"displays result"| node_confirmation
node_app -->|"dispatches search"| node_search
node_search -->|"reads booking"| node_database
node_app -->|"dispatches listing"| node_listing
node_listing -->|"reads bookings"| node_database
node_app -->|"dispatches cancellation"| node_cancellation
node_cancellation -->|"reads and updates"| node_database

click node_app "https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py"
click node_booking_form "https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py"
click node_validation "https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py"
click node_fare "https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py"
click node_confirmation "https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py"
click node_search "https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py"
click node_listing "https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py"
click node_cancellation "https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py"
click node_database "https://github.com/dinatikone123/streamlit_demo1/blob/main/movie_booking.db"

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_booking_form,node_validation,node_fare toneBlue
class node_search,node_listing,node_cancellation,node_database toneAmber
class node_app,node_confirmation toneMint
class node_customer toneIndigo
```

## Components

### Booking workflow

- [Booking form](https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py): `app.py`
- [Input validation](https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py): `app.py`
- [Fare calculation](https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py): `app.py`

### Booking records

- [Booking search](https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py): `app.py`
- [Booking listing](https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py): `app.py`
- [Booking cancellation](https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py): `app.py`
- [SQLite bookings](https://github.com/dinatikone123/streamlit_demo1/blob/main/movie_booking.db): `movie_booking.db`

### Streamlit interface

- [Booking app](https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py): `app.py`
- [Booking confirmation](https://github.com/dinatikone123/streamlit_demo1/blob/main/app.py): `app.py`

### Other components

- **Customer**

## Connections

- Customer → Booking app: uses
- Booking app → Booking form: shows
- Booking form → Input validation: submits details
- Input validation → Fare calculation: valid details
- Booking app → SQLite bookings: creates table
- Booking app → SQLite bookings: inserts booking
- Booking app → Booking confirmation: displays result
- Booking app → Booking search: dispatches search
- Booking search → SQLite bookings: reads booking
- Booking app → Booking listing: dispatches listing
- Booking listing → SQLite bookings: reads bookings
- Booking app → Booking cancellation: dispatches cancellation
- Booking cancellation → SQLite bookings: reads and updates
