# ishansharma1811/cinevault architecture

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

- Interactive diagram: https://gitdiagram.com/ishansharma1811/cinevault
- Repository: https://github.com/ishansharma1811/cinevault

## Overview

CineVault is a Base44-backed movie and event ticket-booking app. Users browse city-filtered movies and showtimes, select seats, hold them temporarily, check out, and receive a digital ticket; the backend enforces seat availability and confirms bookings. Separate branches cover account and profile features, AI recommendations, and administration. The README documents the API and entity architecture, but most page and function implementations were not sampled, so those links reflect documented behavior rather than inspected calls.

Main entry points: [`src/App.jsx`](https://github.com/ishansharma1811/cinevault/blob/main/src/App.jsx) (App routing), [`src/pages/SeatSelection.jsx`](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/SeatSelection.jsx) (Seat selection), [`src/pages/Checkout.jsx`](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Checkout.jsx) (Checkout and fees), [`src/pages/Home.jsx`](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Home.jsx) (Movie discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_home["Movie discovery<br/>[Home.jsx]"]
  node_details["Movie details<br/>[MovieDetails.jsx]"]
  node_city["City selection<br/>[CityContext.jsx]"]
end

subgraph group_identity["Identity and profile"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_account["Login and registration<br/>[Register.jsx]"]
  node_profile["Profile management<br/>[Profile.jsx]"]
  node_bookings["Booking history<br/>[MyBookings.jsx]"]
end

subgraph group_booking["Booking workflow"]
  node_seats["Seat selection<br/>[SeatSelection.jsx]"]
  node_seatmap["Seat map<br/>[SeatMap.jsx]"]
  node_checkout["Checkout and fees<br/>[Checkout.jsx]"]
  node_ticket["Digital ticket<br/>[Confirmation.jsx]"]
end

subgraph group_backend["Backend functions"]
  node_hold["Seat hold<br/>[entry.ts]"]
  node_showseats["Show seat availability<br/>[entry.ts]"]
  node_release["Seat release<br/>[entry.ts]"]
  node_coupon["Coupon validation<br/>[entry.ts]"]
  node_confirm["Booking confirmation<br/>[entry.ts]"]
  node_entities[("Base44 entities")]
  node_recommend["Recommendation engine<br/>[entry.ts]"]
  node_stats["Admin statistics<br/>[entry.ts]"]
  node_seed["Demo data seeding<br/>[entry.ts]"]
  node_cinema["Cinema rules and scoring<br/>[cinema.ts]"]
end

subgraph group_operations["Discovery and admin"]
  node_assistant["AI assistant<br/>[AIAssistant.jsx]"]
  node_admin["Admin dashboard<br/>[Admin.jsx]"]
end

node_visitor(("Moviegoer"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_details
node_app -->|"routes to"| node_seats
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_ticket
node_app -->|"provides"| node_auth
node_home -->|"uses"| node_city
node_details -->|"uses"| node_city
node_visitor -->|"registers or logs in"| node_account
node_account -->|"establishes session"| node_auth
node_visitor -->|"browses"| node_home
node_home -->|"opens movie"| node_details
node_details -->|"selects showtime"| node_seats
node_seats -->|"loads availability"| node_showseats
node_seats -->|"renders"| node_seatmap
node_seats -->|"requests hold"| node_hold
node_hold -->|"uses hold duration"| node_cinema
node_hold -->|"conditionally updates"| node_entities
node_showseats -->|"reads and cleans"| node_entities
node_seats -->|"releases hold"| node_release
node_release -->|"updates seats"| node_entities
node_seats -->|"continues to"| node_checkout
node_checkout -->|"validates coupon"| node_coupon
node_checkout -->|"confirms booking"| node_confirm
node_checkout -->|"uses fee rules"| node_cinema
node_confirm -->|"books seats and creates booking"| node_entities
node_confirm -->|"returns confirmation"| node_ticket
node_visitor -->|"views bookings"| node_bookings
node_visitor -->|"edits profile"| node_profile
node_assistant -->|"requests recommendations"| node_recommend
node_recommend -->|"scores movies"| node_cinema
node_recommend -->|"reads movies"| node_entities
node_admin -->|"loads dashboard stats"| node_stats
node_admin -->|"requests demo seed"| node_seed
node_admin -->|"manages catalog and users"| node_entities
node_stats -->|"reads metrics"| node_entities
node_seed -->|"creates demo records"| node_entities
node_entities -.->|"publishes seat changes"| node_visitor

click node_app "https://github.com/ishansharma1811/cinevault/blob/main/src/App.jsx"
click node_home "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Home.jsx"
click node_details "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/MovieDetails.jsx"
click node_city "https://github.com/ishansharma1811/cinevault/blob/main/src/context/CityContext.jsx"
click node_auth "https://github.com/ishansharma1811/cinevault/blob/main/src/lib/AuthContext.jsx"
click node_account "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Register.jsx"
click node_profile "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Profile.jsx"
click node_bookings "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/MyBookings.jsx"
click node_seats "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/SeatSelection.jsx"
click node_seatmap "https://github.com/ishansharma1811/cinevault/blob/main/src/components/SeatMap.jsx"
click node_hold "https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/holdSeat/entry.ts"
click node_showseats "https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/getShowSeats/entry.ts"
click node_release "https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/releaseSeat/entry.ts"
click node_checkout "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Checkout.jsx"
click node_coupon "https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/validateCoupon/entry.ts"
click node_confirm "https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/confirmBooking/entry.ts"
click node_ticket "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Confirmation.jsx"
click node_assistant "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/AIAssistant.jsx"
click node_recommend "https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/getRecommendations/entry.ts"
click node_admin "https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Admin.jsx"
click node_stats "https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/adminStats/entry.ts"
click node_seed "https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/seedData/entry.ts"
click node_cinema "https://github.com/ishansharma1811/cinevault/blob/main/base44/shared/cinema.ts"

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_app,node_home,node_details,node_city toneBlue
class node_auth,node_account,node_profile,node_bookings toneAmber
class node_seats,node_seatmap,node_checkout,node_ticket toneMint
class node_hold,node_showseats,node_release,node_coupon,node_confirm,node_entities,node_recommend,node_stats,node_seed,node_cinema toneRose
class node_assistant,node_admin,node_visitor toneIndigo
```

## Components

### App experience

- [App routing](https://github.com/ishansharma1811/cinevault/blob/main/src/App.jsx): `src/App.jsx`
- [Movie discovery](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Movie details](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/MovieDetails.jsx): `src/pages/MovieDetails.jsx`
- [City selection](https://github.com/ishansharma1811/cinevault/blob/main/src/context/CityContext.jsx): `src/context/CityContext.jsx`

### Identity and profile

- [Authentication state](https://github.com/ishansharma1811/cinevault/blob/main/src/lib/AuthContext.jsx): `src/lib/AuthContext.jsx`
- [Login and registration](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Register.jsx): `src/pages/Register.jsx`
- [Profile management](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Profile.jsx): `src/pages/Profile.jsx`
- [Booking history](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/MyBookings.jsx): `src/pages/MyBookings.jsx`

### Booking workflow

- [Seat selection](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/SeatSelection.jsx): `src/pages/SeatSelection.jsx`
- [Seat map](https://github.com/ishansharma1811/cinevault/blob/main/src/components/SeatMap.jsx): `src/components/SeatMap.jsx`
- [Checkout and fees](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Checkout.jsx): `src/pages/Checkout.jsx`
- [Digital ticket](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Confirmation.jsx): `src/pages/Confirmation.jsx`

### Backend functions

- [Seat hold](https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/holdSeat/entry.ts): `base44/functions/holdSeat/entry.ts`
- [Show seat availability](https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/getShowSeats/entry.ts): `base44/functions/getShowSeats/entry.ts`
- [Seat release](https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/releaseSeat/entry.ts): `base44/functions/releaseSeat/entry.ts`
- [Coupon validation](https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/validateCoupon/entry.ts): `base44/functions/validateCoupon/entry.ts`
- [Booking confirmation](https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/confirmBooking/entry.ts): `base44/functions/confirmBooking/entry.ts`
- **Base44 entities**
- [Recommendation engine](https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/getRecommendations/entry.ts): `base44/functions/getRecommendations/entry.ts`
- [Admin statistics](https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/adminStats/entry.ts): `base44/functions/adminStats/entry.ts`
- [Demo data seeding](https://github.com/ishansharma1811/cinevault/blob/main/base44/functions/seedData/entry.ts): `base44/functions/seedData/entry.ts`
- [Cinema rules and scoring](https://github.com/ishansharma1811/cinevault/blob/main/base44/shared/cinema.ts): `base44/shared/cinema.ts`

### Discovery and admin

- [AI assistant](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/AIAssistant.jsx): `src/pages/AIAssistant.jsx`
- [Admin dashboard](https://github.com/ishansharma1811/cinevault/blob/main/src/pages/Admin.jsx): `src/pages/Admin.jsx`

### Other components

- **Moviegoer**

## Connections

- Moviegoer → App routing: uses
- App routing → Movie discovery: routes to (evidence: `src/App.jsx`)
- App routing → Movie details: routes to (evidence: `src/App.jsx`)
- App routing → Seat selection: routes to (evidence: `src/App.jsx`)
- App routing → Checkout and fees: routes to (evidence: `src/App.jsx`)
- App routing → Digital ticket: routes to (evidence: `src/App.jsx`)
- App routing → Authentication state: provides (evidence: `src/App.jsx`)
- Movie discovery → City selection: uses (evidence: `src/pages/Home.jsx`)
- Movie details → City selection: uses (evidence: `src/pages/MovieDetails.jsx`)
- Moviegoer → Login and registration: registers or logs in
- Login and registration → Authentication state: establishes session
- Moviegoer → Movie discovery: browses
- Movie discovery → Movie details: opens movie
- Movie details → Seat selection: selects showtime
- Seat selection → Show seat availability: loads availability
- Seat selection → Seat map: renders (evidence: `src/pages/SeatSelection.jsx`)
- Seat selection → Seat hold: requests hold
- Seat hold → Cinema rules and scoring: uses hold duration (evidence: `base44/functions/holdSeat/entry.ts`)
- Seat hold → Base44 entities: conditionally updates
- Show seat availability → Base44 entities: reads and cleans
- Seat selection → Seat release: releases hold
- Seat release → Base44 entities: updates seats
- Seat selection → Checkout and fees: continues to
- Checkout and fees → Coupon validation: validates coupon
- Checkout and fees → Booking confirmation: confirms booking
- Checkout and fees → Cinema rules and scoring: uses fee rules
- Booking confirmation → Base44 entities: books seats and creates booking
- Booking confirmation → Digital ticket: returns confirmation
- Moviegoer → Booking history: views bookings
- Moviegoer → Profile management: edits profile
- AI assistant → Recommendation engine: requests recommendations
- Recommendation engine → Cinema rules and scoring: scores movies (evidence: `base44/shared/cinema.ts`)
- Recommendation engine → Base44 entities: reads movies
- Admin dashboard → Admin statistics: loads dashboard stats
- Admin dashboard → Demo data seeding: requests demo seed
- Admin dashboard → Base44 entities: manages catalog and users
- Admin statistics → Base44 entities: reads metrics
- Demo data seeding → Base44 entities: creates demo records
- Base44 entities → Moviegoer: publishes seat changes
