# sanchita-hasure21/streamlit_demo architecture

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

- Interactive diagram: https://gitdiagram.com/sanchita-hasure21/streamlit_demo
- Repository: https://github.com/sanchita-hasure21/streamlit_demo

## Overview

This is a Streamlit railway reservation app. A user enters journey and passenger details, sees fare information, and submits a booking; the app stores it in SQLite and reports the booking ID. Users can also search for a booking, view bookings, and cancel one. The README provides no further capability details, and the source excerpt omits some sections, so the graph shows only evidenced database interactions and does not infer extra modules or integrations.

Main entry points: [`app.py`](https://github.com/sanchita-hasure21/streamlit_demo/blob/main/app.py) (Search and manage), [`railway.db`](https://github.com/sanchita-hasure21/streamlit_demo/blob/main/railway.db) (Bookings database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Booking"]
  node_booking_ui["Booking and fare UI<br/>[app.py]"]
end

subgraph group_management["Booking management"]
  node_management_ui["Search and manage<br/>[app.py]"]
end

subgraph group_storage["Persistence"]
  node_booking_store[("Bookings database<br/>[railway.db]")]
end

node_user(("Railway user"))

node_user -->|"enters booking"| node_booking_ui
node_booking_ui -->|"inserts booking"| node_booking_store
node_user -->|"selects action"| node_management_ui
node_management_ui -->|"queries or updates"| node_booking_store
node_booking_store -->|"returns records"| node_management_ui
node_booking_ui -->|"shows fare and confirmation"| node_user
node_management_ui -->|"shows booking results"| node_user

click node_booking_ui "https://github.com/sanchita-hasure21/streamlit_demo/blob/main/app.py"
click node_management_ui "https://github.com/sanchita-hasure21/streamlit_demo/blob/main/app.py"
click node_booking_store "https://github.com/sanchita-hasure21/streamlit_demo/blob/main/railway.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_ui,node_user toneBlue
class node_management_ui toneAmber
class node_booking_store toneMint
```

## Components

### Booking

- [Booking and fare UI](https://github.com/sanchita-hasure21/streamlit_demo/blob/main/app.py): `app.py`

### Booking management

- [Search and manage](https://github.com/sanchita-hasure21/streamlit_demo/blob/main/app.py): `app.py`

### Persistence

- [Bookings database](https://github.com/sanchita-hasure21/streamlit_demo/blob/main/railway.db): `railway.db`

### Other components

- **Railway user**

## Connections

- Railway user → Booking and fare UI: enters booking
- Booking and fare UI → Bookings database: inserts booking
- Railway user → Search and manage: selects action
- Search and manage → Bookings database: queries or updates
- Bookings database → Search and manage: returns records
- Booking and fare UI → Railway user: shows fare and confirmation
- Search and manage → Railway user: shows booking results
