# prashanth-banoth/cinemate-ai architecture

> Architecture diagram of the GitHub repository prashanth-banoth/cinemate-ai, 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/prashanth-banoth/cinemate-ai
- Repository: https://github.com/prashanth-banoth/cinemate-ai

## Overview

CineMate is a movie discovery and simulated ticket-booking app. Users can search for movies or request mood-based recommendations, then chat with an assistant to assemble booking details, choose seats, and confirm a simulated booking. The frontend is a single client page backed by a Python API; booking state and seat records are distinct backend responsibilities. The excerpts show frontend calls for movie search and seat availability, but omit several backend call sites and other frontend requests, so those relationships are left unverified rather than presented as confirmed.

Main entry points: [`frontend/src/app/page.tsx`](https://github.com/prashanth-banoth/cinemate-ai/blob/main/frontend/src/app/page.tsx) (CineMate interface), [`backend/main.py`](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py) (Booking confirmation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Movie discovery"]
  node_ui["CineMate interface<br/>[page.tsx]"]
  node_movie_search["Movie search<br/>[main.py]"]
  node_recommendations["Recommendations<br/>[main.py]"]
end

subgraph group_booking["Booking workflow"]
  node_booking_assistant["Booking assistant<br/>[main.py]"]
  node_showtime_check["Showtime validation<br/>[main.py]"]
  node_seat_selection["Seat availability<br/>[main.py]"]
  node_confirmation["Booking confirmation<br/>[main.py]"]
end

subgraph group_backend["Backend services"]
  node_session_state["Booking sessions<br/>[main.py]"]
end

subgraph group_persistence["Booking persistence"]
  node_seat_store[("Booked seats<br/>[main.py]")]
  node_booking_store[("Simulated bookings<br/>[main.py]")]
end

node_viewer(("Moviegoer"))
node_omdb["OMDb"]
node_postgres[("PostgreSQL")]

node_viewer -->|"uses"| node_ui
node_ui -->|"requests search"| node_movie_search
node_ui -->|"requests seats"| node_seat_selection
node_ui -.->|"requests recommendations"| node_recommendations
node_ui -.->|"submits booking"| node_booking_assistant
node_ui -.->|"confirms booking"| node_confirmation
node_movie_search -.->|"queries catalog"| node_omdb
node_recommendations -.->|"looks up titles"| node_omdb
node_booking_assistant -.->|"updates session"| node_session_state
node_confirmation -.->|"validates showtime"| node_showtime_check
node_confirmation -.->|"reserves seats"| node_seat_store
node_seat_selection -.->|"reads bookings"| node_seat_store
node_confirmation -.->|"saves simulation"| node_booking_store
node_seat_store -.->|"stores records"| node_postgres
node_booking_store -.->|"stores records"| node_postgres

click node_ui "https://github.com/prashanth-banoth/cinemate-ai/blob/main/frontend/src/app/page.tsx"
click node_movie_search "https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py"
click node_recommendations "https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py"
click node_booking_assistant "https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py"
click node_showtime_check "https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py"
click node_seat_selection "https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py"
click node_confirmation "https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py"
click node_session_state "https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py"
click node_seat_store "https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py"
click node_booking_store "https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.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_ui,node_movie_search,node_recommendations toneBlue
class node_booking_assistant,node_showtime_check,node_seat_selection,node_confirmation,node_postgres toneAmber
class node_session_state toneMint
class node_seat_store,node_booking_store toneRose
class node_viewer,node_omdb toneIndigo
```

## Components

### Movie discovery

- [CineMate interface](https://github.com/prashanth-banoth/cinemate-ai/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Movie search](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py): `backend/main.py`
- [Recommendations](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py): `backend/main.py`

### Booking workflow

- [Booking assistant](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py): `backend/main.py`
- [Showtime validation](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py): `backend/main.py`
- [Seat availability](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py): `backend/main.py`
- [Booking confirmation](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py): `backend/main.py`

### Backend services

- [Booking sessions](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py): `backend/main.py`

### Booking persistence

- [Booked seats](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py): `backend/main.py`
- [Simulated bookings](https://github.com/prashanth-banoth/cinemate-ai/blob/main/backend/main.py): `backend/main.py`

### Other components

- **Moviegoer**
- **OMDb**
- **PostgreSQL**

## Connections

- Moviegoer → CineMate interface: uses
- CineMate interface → Movie search: requests search (evidence: `frontend/src/app/page.tsx`)
- CineMate interface → Seat availability: requests seats (evidence: `frontend/src/app/page.tsx`)
- CineMate interface → Recommendations: requests recommendations
- CineMate interface → Booking assistant: submits booking
- CineMate interface → Booking confirmation: confirms booking
- Movie search → OMDb: queries catalog
- Recommendations → OMDb: looks up titles
- Booking assistant → Booking sessions: updates session (evidence: `backend/main.py`)
- Booking confirmation → Showtime validation: validates showtime (evidence: `backend/main.py`)
- Booking confirmation → Booked seats: reserves seats (evidence: `backend/main.py`)
- Seat availability → Booked seats: reads bookings (evidence: `backend/main.py`)
- Booking confirmation → Simulated bookings: saves simulation (evidence: `backend/main.py`)
- Booked seats → PostgreSQL: stores records
- Simulated bookings → PostgreSQL: stores records
