# sarthakmahapatra05/movie-app architecture

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

- Interactive diagram: https://gitdiagram.com/sarthakmahapatra05/movie-app
- Repository: https://github.com/sarthakmahapatra05/movie-app

## Overview

Creative Upaay is a mobile-first movie-ticket reservation app. Its main user journey runs from browsing movies through theatre, schedule, and seat selection to payment and ticket management; sign-in and profile access support that journey. The frontend keeps booking selections and derived totals in persisted Redux state, while the backend exposes domain APIs and stores reservations and seat occupancy in MongoDB. The README documents several capabilities whose page implementations were not sampled; those workflow links are therefore attributed to the README.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/App.jsx) (Route app), [`backend/server.js`](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/server.js) (Express server), [`backend/controllers/bookingController.js`](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/bookingController.js) (Booking service), [`frontend/src/pages/SelectSchedule.jsx`](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/SelectSchedule.jsx) (Schedule selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Customer app"]
  node_app["Route app<br/>[App.jsx]"]
  node_auth_pages["Sign in / signup"]
  node_booking_state["Booking state<br/>[bookingSlice.js]"]
  node_api_client["API wrappers<br/>[endpoints.js]"]
end

subgraph group_booking["Booking journey"]
  node_home["Movie browsing<br/>[Home.jsx]"]
  node_movie_detail["Movie details<br/>[MovieDetails.jsx]"]
  node_theatre_select["Theatre selection<br/>[SelectTheatre.jsx]"]
  node_schedule_select["Schedule selection<br/>[SelectSchedule.jsx]"]
  node_seat_select["Seat selection<br/>[SelectSeats.jsx]"]
  node_summary["Booking summary<br/>[BookingSummary.jsx]"]
  node_payment["Simulated payment<br/>[Payment.jsx]"]
  node_success["Payment confirmation<br/>[PaymentSuccess.jsx]"]
  node_my_bookings["Ticket management<br/>[MyBookings.jsx]"]
end

subgraph group_backend["Reservation API"]
  node_server["Express server<br/>[server.js]"]
  node_auth["Auth service<br/>[authController.js]"]
  node_movie_service["Movie service<br/>[movieController.js]"]
  node_theatre_service["Theatre service"]
  node_showtime_service["Showtime service"]
  node_booking_service["Booking service"]
end

subgraph group_data["Domain data"]
  node_mongo[("MongoDB<br/>[db.js]")]
  node_users[("User records<br/>[User.js]")]
  node_movies[("Movie records<br/>[Movie.js]")]
  node_theatres[("Theatre records<br/>[Theatre.js]")]
  node_showtimes[("Showtime records<br/>[Showtime.js]")]
  node_bookings[("Booking records<br/>[Booking.js]")]
end

node_customer(("Moviegoer"))

node_customer -->|"uses"| node_app
node_app -->|"routes to"| node_auth_pages
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_movie_detail
node_app -->|"routes to"| node_theatre_select
node_app -->|"routes to"| node_schedule_select
node_app -->|"routes to"| node_seat_select
node_app -->|"routes to"| node_summary
node_app -->|"routes to"| node_payment
node_app -->|"routes to"| node_success
node_app -->|"routes to"| node_my_bookings
node_home -->|"continues to"| node_movie_detail
node_movie_detail -->|"continues to"| node_theatre_select
node_theatre_select -->|"continues to"| node_schedule_select
node_schedule_select -->|"continues to"| node_seat_select
node_seat_select -->|"continues to"| node_summary
node_summary -->|"continues to"| node_payment
node_payment -->|"confirms at"| node_success
node_success -->|"continues to"| node_my_bookings
node_seat_select -->|"updates"| node_booking_state
node_schedule_select -->|"updates"| node_booking_state
node_summary -->|"reads totals"| node_booking_state
node_payment -->|"reads booking"| node_booking_state
node_home -->|"requests data"| node_api_client
node_schedule_select -->|"requests data"| node_api_client
node_payment -->|"submits booking"| node_api_client
node_my_bookings -->|"requests tickets"| node_api_client
node_api_client -.->|"calls API"| node_server
node_server -->|"mounts routes"| node_auth
node_server -->|"mounts routes"| node_movie_service
node_server -->|"mounts routes"| node_theatre_service
node_server -->|"mounts routes"| node_showtime_service
node_server -->|"mounts routes"| node_booking_service
node_server -->|"connects"| node_mongo
node_auth -->|"reads / writes"| node_users
node_movie_service -->|"queries"| node_movies
node_theatre_service -->|"queries"| node_theatres
node_showtime_service -->|"queries"| node_showtimes
node_showtime_service -->|"queries"| node_movies
node_showtime_service -->|"queries"| node_theatres
node_booking_service -->|"reserves seats"| node_showtimes
node_booking_service -->|"loads snapshot"| node_movies
node_booking_service -->|"loads snapshot"| node_theatres
node_booking_service -->|"creates tickets"| node_bookings
node_booking_service -->|"releases seats"| node_showtimes

click node_app "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/App.jsx"
click node_auth_pages "https://github.com/sarthakmahapatra05/movie-app/tree/master/frontend/src/pages"
click node_home "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/Home.jsx"
click node_movie_detail "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/MovieDetails.jsx"
click node_theatre_select "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/SelectTheatre.jsx"
click node_schedule_select "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/SelectSchedule.jsx"
click node_seat_select "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/SelectSeats.jsx"
click node_summary "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/BookingSummary.jsx"
click node_payment "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/Payment.jsx"
click node_success "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/PaymentSuccess.jsx"
click node_my_bookings "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/MyBookings.jsx"
click node_booking_state "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/redux/slices/bookingSlice.js"
click node_api_client "https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/api/endpoints.js"
click node_server "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/server.js"
click node_auth "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/authController.js"
click node_movie_service "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/movieController.js"
click node_theatre_service "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/theatreController.js"
click node_showtime_service "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/showtimeController.js"
click node_booking_service "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/bookingController.js"
click node_mongo "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/config/db.js"
click node_users "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/User.js"
click node_movies "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/Movie.js"
click node_theatres "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/Theatre.js"
click node_showtimes "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/Showtime.js"
click node_bookings "https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/Booking.js"

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_auth_pages,node_booking_state,node_api_client toneBlue
class node_home,node_movie_detail,node_theatre_select,node_schedule_select,node_seat_select,node_summary,node_payment,node_success,node_my_bookings toneAmber
class node_server,node_auth,node_movie_service,node_theatre_service,node_showtime_service,node_booking_service toneMint
class node_mongo,node_users,node_movies,node_theatres,node_showtimes,node_bookings toneRose
class node_customer toneIndigo
```

## Components

### Customer app

- [Route app](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Sign in / signup](https://github.com/sarthakmahapatra05/movie-app/tree/master/frontend/src/pages): `frontend/src/pages`
- [Booking state](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/redux/slices/bookingSlice.js): `frontend/src/redux/slices/bookingSlice.js`
- [API wrappers](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/api/endpoints.js): `frontend/src/api/endpoints.js`

### Booking journey

- [Movie browsing](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Movie details](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/MovieDetails.jsx): `frontend/src/pages/MovieDetails.jsx`
- [Theatre selection](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/SelectTheatre.jsx): `frontend/src/pages/SelectTheatre.jsx`
- [Schedule selection](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/SelectSchedule.jsx): `frontend/src/pages/SelectSchedule.jsx`
- [Seat selection](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/SelectSeats.jsx): `frontend/src/pages/SelectSeats.jsx`
- [Booking summary](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/BookingSummary.jsx): `frontend/src/pages/BookingSummary.jsx`
- [Simulated payment](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/Payment.jsx): `frontend/src/pages/Payment.jsx`
- [Payment confirmation](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/PaymentSuccess.jsx): `frontend/src/pages/PaymentSuccess.jsx`
- [Ticket management](https://github.com/sarthakmahapatra05/movie-app/blob/master/frontend/src/pages/MyBookings.jsx): `frontend/src/pages/MyBookings.jsx`

### Reservation API

- [Express server](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/server.js): `backend/server.js`
- [Auth service](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Movie service](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/movieController.js): `backend/controllers/movieController.js`
- [Theatre service](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/theatreController.js): `backend/controllers/theatreController.js`
- [Showtime service](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/showtimeController.js): `backend/controllers/showtimeController.js`
- [Booking service](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/controllers/bookingController.js): `backend/controllers/bookingController.js`

### Domain data

- [MongoDB](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/config/db.js): `backend/config/db.js`
- [User records](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/User.js): `backend/models/User.js`
- [Movie records](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/Movie.js): `backend/models/Movie.js`
- [Theatre records](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/Theatre.js): `backend/models/Theatre.js`
- [Showtime records](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/Showtime.js): `backend/models/Showtime.js`
- [Booking records](https://github.com/sarthakmahapatra05/movie-app/blob/master/backend/models/Booking.js): `backend/models/Booking.js`

### Other components

- **Moviegoer**

## Connections

- Moviegoer → Route app: uses
- Route app → Sign in / signup: routes to (evidence: `frontend/src/App.jsx`)
- Route app → Movie browsing: routes to (evidence: `frontend/src/App.jsx`)
- Route app → Movie details: routes to (evidence: `frontend/src/App.jsx`)
- Route app → Theatre selection: routes to (evidence: `frontend/src/App.jsx`)
- Route app → Schedule selection: routes to (evidence: `frontend/src/App.jsx`)
- Route app → Seat selection: routes to (evidence: `frontend/src/App.jsx`)
- Route app → Booking summary: routes to (evidence: `frontend/src/App.jsx`)
- Route app → Simulated payment: routes to (evidence: `frontend/src/App.jsx`)
- Route app → Payment confirmation: routes to (evidence: `frontend/src/App.jsx`)
- Route app → Ticket management: routes to (evidence: `frontend/src/App.jsx`)
- Movie browsing → Movie details: continues to
- Movie details → Theatre selection: continues to
- Theatre selection → Schedule selection: continues to
- Schedule selection → Seat selection: continues to
- Seat selection → Booking summary: continues to
- Booking summary → Simulated payment: continues to
- Simulated payment → Payment confirmation: confirms at
- Payment confirmation → Ticket management: continues to
- Seat selection → Booking state: updates (evidence: `frontend/src/pages/SelectSeats.jsx`)
- Schedule selection → Booking state: updates (evidence: `frontend/src/pages/SelectSchedule.jsx`)
- Booking summary → Booking state: reads totals (evidence: `frontend/src/pages/BookingSummary.jsx`)
- Simulated payment → Booking state: reads booking (evidence: `frontend/src/pages/Payment.jsx`)
- Movie browsing → API wrappers: requests data (evidence: `frontend/src/pages/Home.jsx`)
- Schedule selection → API wrappers: requests data (evidence: `frontend/src/pages/SelectSchedule.jsx`)
- Simulated payment → API wrappers: submits booking (evidence: `frontend/src/pages/Payment.jsx`)
- Ticket management → API wrappers: requests tickets (evidence: `frontend/src/pages/MyBookings.jsx`)
- API wrappers → Express server: calls API
- Express server → Auth service: mounts routes (evidence: `backend/server.js`)
- Express server → Movie service: mounts routes (evidence: `backend/server.js`)
- Express server → Theatre service: mounts routes (evidence: `backend/server.js`)
- Express server → Showtime service: mounts routes (evidence: `backend/server.js`)
- Express server → Booking service: mounts routes (evidence: `backend/server.js`)
- Express server → MongoDB: connects (evidence: `backend/server.js`)
- Auth service → User records: reads / writes (evidence: `backend/controllers/authController.js`)
- Movie service → Movie records: queries (evidence: `backend/controllers/movieController.js`)
- Theatre service → Theatre records: queries (evidence: `backend/controllers/theatreController.js`)
- Showtime service → Showtime records: queries (evidence: `backend/controllers/showtimeController.js`)
- Showtime service → Movie records: queries (evidence: `backend/controllers/showtimeController.js`)
- Showtime service → Theatre records: queries (evidence: `backend/controllers/showtimeController.js`)
- Booking service → Showtime records: reserves seats (evidence: `backend/controllers/bookingController.js`)
- Booking service → Movie records: loads snapshot (evidence: `backend/controllers/bookingController.js`)
- Booking service → Theatre records: loads snapshot (evidence: `backend/controllers/bookingController.js`)
- Booking service → Booking records: creates tickets (evidence: `backend/controllers/bookingController.js`)
- Booking service → Showtime records: releases seats (evidence: `backend/controllers/bookingController.js`)
