# palvash-kumar/viewmax architecture

> Architecture diagram of the GitHub repository palvash-kumar/viewmax, 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/palvash-kumar/viewmax
- Repository: https://github.com/palvash-kumar/viewmax

## Overview

ViewMax is a cinema booking and experience platform. Moviegoers discover films and showtimes, choose seats, reserve them during checkout, pay, and receive tickets for entry; theatre operators manage venues and design layouts, while the geometry-based intelligence features score and recommend seats. The map combines documented capabilities with sampled controller and engine relationships. Several service internals were not sampled, so uncertain wiring is omitted; the README documents the major external integrations and reservation behavior.

Main entry points: [`backend/src/main.ts`](https://github.com/palvash-kumar/viewmax/blob/main/backend/src/main.ts) (NestJS REST API), [`backend/src/bookings`](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/bookings) (Booking service), [`backend/src/payments`](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/payments) (Payment handling), [`frontend/src/app`](https://github.com/palvash-kumar/viewmax/tree/main/frontend/src/app) (ViewMax web app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Customer experience"]
  node_webapp["ViewMax web app"]
  node_catalog["Movies and showtimes"]
  node_intelligence["Seat intelligence"]
end

subgraph group_venue["Venue operations"]
  node_theatres["Theatre management"]
  node_screens["Screens and layouts"]
  node_coordinates["Seat geometry"]
end

subgraph group_transactions["Booking and entry"]
  node_bookings["Booking service"]
  node_payments["Payment handling"]
  node_tickets["Ticket lifecycle"]
end

subgraph group_platform["Platform services"]
  node_auth["Authentication"]
  node_notifications["Notifications"]
  node_admin["Audit and analytics"]
  node_api["NestJS REST API<br/>[main.ts]"]
  node_mongo[("MongoDB")]
  node_redis[("Redis")]
end

node_moviegoer(("Moviegoer"))
node_venueoperator(("Theatre operator"))
node_stripe["Stripe"]
node_email["SMTP email"]
node_cloudinary["Cloudinary media"]
node_google["Google OAuth"]

node_moviegoer -->|"uses"| node_webapp
node_venueoperator -->|"manages venues"| node_webapp
node_webapp -->|"REST requests"| node_api
node_api -->|"authenticates"| node_auth
node_api -->|"routes requests"| node_catalog
node_api -->|"routes requests"| node_theatres
node_api -->|"routes requests"| node_screens
node_api -->|"routes requests"| node_intelligence
node_api -->|"routes requests"| node_bookings
node_api -->|"routes requests"| node_payments
node_api -->|"routes requests"| node_tickets
node_api -->|"routes requests"| node_notifications
node_api -->|"routes requests"| node_admin
node_screens -->|"generates geometry"| node_coordinates
node_webapp -->|"requests seat insights"| node_intelligence
node_bookings -->|"locks seats"| node_redis
node_bookings -->|"starts checkout"| node_payments
node_payments -->|"creates checkout"| node_stripe
node_stripe -->|"sends webhook"| node_payments
node_payments -->|"confirms or releases"| node_bookings
node_tickets -->|"stores QR nonce"| node_redis
node_catalog -->|"reads catalog"| node_mongo
node_bookings -->|"stores bookings"| node_mongo
node_tickets -->|"reads booking data"| node_mongo
node_notifications -->|"sends email"| node_email
node_api -.->|"uploads media"| node_cloudinary
node_auth -.->|"OAuth sign-in"| node_google

click node_webapp "https://github.com/palvash-kumar/viewmax/tree/main/frontend/src/app"
click node_catalog "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/movies"
click node_auth "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/auth"
click node_theatres "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/theatres"
click node_screens "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/theatre-design"
click node_coordinates "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/theatre-design/engines"
click node_intelligence "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/cinema-intelligence"
click node_bookings "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/bookings"
click node_payments "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/payments"
click node_tickets "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/tickets"
click node_notifications "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/notifications"
click node_admin "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/analytics"
click node_api "https://github.com/palvash-kumar/viewmax/blob/main/backend/src/main.ts"
click node_redis "https://github.com/palvash-kumar/viewmax/tree/main/backend/src/redis"

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_webapp,node_catalog,node_intelligence toneBlue
class node_theatres,node_screens,node_coordinates toneAmber
class node_bookings,node_payments,node_tickets toneMint
class node_auth,node_notifications,node_admin,node_api,node_mongo,node_redis toneRose
class node_moviegoer,node_venueoperator,node_stripe,node_email,node_cloudinary,node_google toneIndigo
```

## Components

### Customer experience

- [ViewMax web app](https://github.com/palvash-kumar/viewmax/tree/main/frontend/src/app): `frontend/src/app`
- [Movies and showtimes](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/movies): `backend/src/movies`
- [Seat intelligence](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/cinema-intelligence): `backend/src/cinema-intelligence`

### Venue operations

- [Theatre management](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/theatres): `backend/src/theatres`
- [Screens and layouts](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/theatre-design): `backend/src/theatre-design`
- [Seat geometry](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/theatre-design/engines): `backend/src/theatre-design/engines`

### Booking and entry

- [Booking service](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/bookings): `backend/src/bookings`
- [Payment handling](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/payments): `backend/src/payments`
- [Ticket lifecycle](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/tickets): `backend/src/tickets`

### Platform services

- [Authentication](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/auth): `backend/src/auth`
- [Notifications](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/notifications): `backend/src/notifications`
- [Audit and analytics](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/analytics): `backend/src/analytics`
- [NestJS REST API](https://github.com/palvash-kumar/viewmax/blob/main/backend/src/main.ts): `backend/src/main.ts`
- **MongoDB**
- [Redis](https://github.com/palvash-kumar/viewmax/tree/main/backend/src/redis): `backend/src/redis`

### Other components

- **Moviegoer**
- **Theatre operator**
- **Stripe**
- **SMTP email**
- **Cloudinary media**
- **Google OAuth**

## Connections

- Moviegoer → ViewMax web app: uses
- Theatre operator → ViewMax web app: manages venues
- ViewMax web app → NestJS REST API: REST requests
- NestJS REST API → Authentication: authenticates
- NestJS REST API → Movies and showtimes: routes requests
- NestJS REST API → Theatre management: routes requests
- NestJS REST API → Screens and layouts: routes requests
- NestJS REST API → Seat intelligence: routes requests
- NestJS REST API → Booking service: routes requests
- NestJS REST API → Payment handling: routes requests
- NestJS REST API → Ticket lifecycle: routes requests
- NestJS REST API → Notifications: routes requests
- NestJS REST API → Audit and analytics: routes requests
- Screens and layouts → Seat geometry: generates geometry
- ViewMax web app → Seat intelligence: requests seat insights
- Booking service → Redis: locks seats
- Booking service → Payment handling: starts checkout
- Payment handling → Stripe: creates checkout
- Stripe → Payment handling: sends webhook
- Payment handling → Booking service: confirms or releases
- Ticket lifecycle → Redis: stores QR nonce
- Movies and showtimes → MongoDB: reads catalog
- Booking service → MongoDB: stores bookings
- Ticket lifecycle → MongoDB: reads booking data
- Notifications → SMTP email: sends email
- NestJS REST API → Cloudinary media: uploads media
- Authentication → Google OAuth: OAuth sign-in
