# pushingcode70/movie-booking-recommendation-system architecture

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

- Interactive diagram: https://gitdiagram.com/pushingcode70/movie-booking-recommendation-system
- Repository: https://github.com/pushingcode70/movie-booking-recommendation-system

## Overview

This is a cinema-booking platform whose main customer journey runs from browsing movies and showtimes through seat selection, booking, payment, and emailed tickets. Account verification, TMDB catalogue search, wishlists/watched history, semantic recommendations, and an admin dashboard are distinct supporting capabilities. The sampled files establish key routing and embedding flows; many feature internals are represented from the documented structure and are not individually verified.

Main entry points: [`repositories/movie_repository.go`](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/repositories/movie_repository.go) (Data repositories), [`frontend/js/app.js`](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/app.js) (Web client), [`frontend/js/booking.js`](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/booking.js) (Booking UI), [`main.go`](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/main.go) (API route registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User experience"]
  node_web["Web client<br/>[app.js]"]
  node_auth_ui["Authentication UI<br/>[auth.js]"]
  node_booking_ui["Booking UI<br/>[booking.js]"]
  node_admin_ui["Admin dashboard<br/>[admin.js]"]
end

subgraph group_api["API and identity"]
  node_auth_api["Auth handlers<br/>[auth_handler.go]"]
  node_auth_service["Auth and OTP<br/>[auth_service.go]"]
  node_routes["API route registration<br/>[main.go]"]
end

subgraph group_cinema["Cinema operations"]
  node_movie_catalogue["Movie catalogue<br/>[movie_service.go]"]
  node_theatre_shows["Theatres and shows<br/>[show_service.go]"]
  node_seats["Seat availability<br/>[seat_service.go]"]
  node_booking["Booking workflow<br/>[booking_service.go]"]
  node_payments["Payment and tickets<br/>[payment_service.go]"]
  node_admin["Admin operations<br/>[admin_service.go]"]
end

subgraph group_personal["Discovery and recommendations"]
  node_watchlist["Wishlist and watched"]
  node_recommendations["Recommendations"]
  node_embedding["Embedding generation"]
  node_embedding_api["Embedding model API<br/>[main.py]"]
end

subgraph group_platform["Persistence and integrations"]
  node_tmdb["TMDB integration<br/>[tmdb_service.go]"]
  node_repositories["Data repositories"]
  node_database[("PostgreSQL and pgvector<br/>[database.go]")]
end

node_viewer(("Customer or admin"))
node_razorpay["Razorpay"]
node_smtp["SMTP email"]

node_viewer -->|"uses"| node_web
node_web -.->|"renders"| node_auth_ui
node_web -.->|"routes to"| node_booking_ui
node_web -->|"routes to"| node_admin_ui
node_auth_ui -.->|"requests"| node_auth_api
node_auth_api -->|"calls"| node_auth_service
node_auth_service -->|"reads and writes"| node_repositories
node_auth_service -->|"sends OTP"| node_smtp
node_web -.->|"API requests"| node_routes
node_routes -->|"registers endpoints"| node_recommendations
node_routes -->|"registers endpoints"| node_admin
node_routes -->|"registers endpoints"| node_booking
node_booking_ui -.->|"selects show"| node_theatre_shows
node_booking_ui -.->|"selects seats"| node_seats
node_booking_ui -.->|"submits booking"| node_booking
node_booking -->|"persists booking"| node_repositories
node_booking -->|"initiates payment"| node_razorpay
node_payments -->|"processes payment"| node_razorpay
node_payments -->|"emails ticket"| node_smtp
node_admin_ui -.->|"admin requests"| node_admin
node_admin -.->|"reads and writes"| node_repositories
node_movie_catalogue -.->|"reads catalogue"| node_repositories
node_movie_catalogue -.->|"searches metadata"| node_tmdb
node_theatre_shows -.->|"reads schedules"| node_repositories
node_seats -.->|"reads availability"| node_repositories
node_watchlist -.->|"stores history"| node_repositories
node_recommendations -.->|"reads taste and vectors"| node_repositories
node_recommendations -.->|"requests vectors"| node_embedding
node_embedding -->|"loads movie details"| node_tmdb
node_embedding -->|"posts text"| node_embedding_api
node_recommendations -.->|"similarity search"| node_database
node_repositories -.->|"queries"| node_database
node_movie_catalogue -.->|"imports movie data"| node_tmdb

click node_web "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/app.js"
click node_auth_ui "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/auth.js"
click node_booking_ui "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/booking.js"
click node_admin_ui "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/admin.js"
click node_auth_api "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/handlers/auth_handler.go"
click node_auth_service "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/auth_service.go"
click node_routes "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/main.go"
click node_movie_catalogue "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/movie_service.go"
click node_theatre_shows "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/show_service.go"
click node_seats "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/seat_service.go"
click node_booking "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/booking_service.go"
click node_payments "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/payment_service.go"
click node_admin "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/admin_service.go"
click node_watchlist "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/wishlist_service.go"
click node_recommendations "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/recommendation_service.go"
click node_embedding "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/movie_embedding_service.go"
click node_embedding_api "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/embedding-service/main.py"
click node_tmdb "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/tmdb_service.go"
click node_repositories "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/repositories/movie_repository.go"
click node_database "https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/database/database.go"

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_web,node_auth_ui,node_booking_ui,node_admin_ui toneBlue
class node_auth_api,node_auth_service,node_routes toneAmber
class node_movie_catalogue,node_theatre_shows,node_seats,node_booking,node_payments,node_admin toneMint
class node_watchlist,node_recommendations,node_embedding,node_embedding_api toneRose
class node_tmdb,node_repositories,node_database,node_viewer,node_razorpay,node_smtp toneIndigo
```

## Components

### User experience

- [Web client](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Authentication UI](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/auth.js): `frontend/js/auth.js`
- [Booking UI](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/booking.js): `frontend/js/booking.js`
- [Admin dashboard](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/frontend/js/admin.js): `frontend/js/admin.js`

### API and identity

- [Auth handlers](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/handlers/auth_handler.go): `handlers/auth_handler.go`
- [Auth and OTP](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/auth_service.go): `services/auth_service.go`
- [API route registration](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/main.go): `main.go`

### Cinema operations

- [Movie catalogue](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/movie_service.go): `services/movie_service.go`
- [Theatres and shows](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/show_service.go): `services/show_service.go`
- [Seat availability](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/seat_service.go): `services/seat_service.go`
- [Booking workflow](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/booking_service.go): `services/booking_service.go`
- [Payment and tickets](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/payment_service.go): `services/payment_service.go`
- [Admin operations](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/admin_service.go): `services/admin_service.go`

### Discovery and recommendations

- [Wishlist and watched](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/wishlist_service.go): `services/wishlist_service.go`
- [Recommendations](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/recommendation_service.go): `services/recommendation_service.go`
- [Embedding generation](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/movie_embedding_service.go): `services/movie_embedding_service.go`
- [Embedding model API](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/embedding-service/main.py): `embedding-service/main.py`

### Persistence and integrations

- [TMDB integration](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/services/tmdb_service.go): `services/tmdb_service.go`
- [Data repositories](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/repositories/movie_repository.go): `repositories/movie_repository.go`
- [PostgreSQL and pgvector](https://github.com/pushingcode70/movie-booking-recommendation-system/blob/main/database/database.go): `database/database.go`

### Other components

- **Customer or admin**
- **Razorpay**
- **SMTP email**

## Connections

- Customer or admin → Web client: uses (evidence: `README.md`)
- Web client → Authentication UI: renders
- Web client → Booking UI: routes to
- Web client → Admin dashboard: routes to (evidence: `frontend/js/app.js`)
- Authentication UI → Auth handlers: requests
- Auth handlers → Auth and OTP: calls (evidence: `handlers/auth_handler.go`)
- Auth and OTP → Data repositories: reads and writes (evidence: `services/auth_service.go`)
- Auth and OTP → SMTP email: sends OTP (evidence: `services/auth_service.go`)
- Web client → API route registration: API requests
- API route registration → Recommendations: registers endpoints (evidence: `main.go`)
- API route registration → Admin operations: registers endpoints (evidence: `main.go`)
- API route registration → Booking workflow: registers endpoints (evidence: `main.go`)
- Booking UI → Theatres and shows: selects show
- Booking UI → Seat availability: selects seats
- Booking UI → Booking workflow: submits booking
- Booking workflow → Data repositories: persists booking
- Booking workflow → Razorpay: initiates payment
- Payment and tickets → Razorpay: processes payment
- Payment and tickets → SMTP email: emails ticket
- Admin dashboard → Admin operations: admin requests
- Admin operations → Data repositories: reads and writes
- Movie catalogue → Data repositories: reads catalogue
- Movie catalogue → TMDB integration: searches metadata
- Theatres and shows → Data repositories: reads schedules
- Seat availability → Data repositories: reads availability
- Wishlist and watched → Data repositories: stores history
- Recommendations → Data repositories: reads taste and vectors
- Recommendations → Embedding generation: requests vectors
- Embedding generation → TMDB integration: loads movie details (evidence: `services/movie_embedding_service.go`)
- Embedding generation → Embedding model API: posts text (evidence: `services/movie_embedding_service.go`)
- Recommendations → PostgreSQL and pgvector: similarity search
- Data repositories → PostgreSQL and pgvector: queries
- Movie catalogue → TMDB integration: imports movie data
