# himeshrana1137/cinematch-multilang architecture

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

- Interactive diagram: https://gitdiagram.com/himeshrana1137/cinematch-multilang
- Repository: https://github.com/himeshrana1137/cinematch-multilang

## Overview

CineMatch is a multilingual movie discovery and recommendation web app. Users browse by cinema, genre, or mood, search the catalogue, select a movie, and explore same-language and cross-language recommendations; favourites and personalized picks support ongoing discovery. The React app presents the experience and calls the Flask backend, whose recommender serves catalogue features. The README also documents offline TMDB data preparation and an installable PWA. Some component and endpoint wiring is unsampled, so the graph limits those relationships to documented or excerpt-visible evidence.

Main entry points: [`frontend/src/App.jsx`](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/App.jsx) (Discovery app), [`frontend/src/components/Hero.jsx`](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/Hero.jsx) (Featured movie), [`frontend/src/components/DetailModal.jsx`](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/DetailModal.jsx) (Movie details and trailers), [`frontend/src/context/FavoritesContext.jsx`](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/context/FavoritesContext.jsx) (Favourites and watchlist)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Catalogue and recommendations"]
  node_dataset["Dataset preparation<br/>[build_dataset.py]"]
  node_catalogue[("Movie catalogue<br/>[movies.json]")]
  node_api["Flask API<br/>[app.py]"]
  node_engine["Hybrid recommender<br/>[recommender.py]"]
end

subgraph group_discovery["Discovery interface"]
  node_app["Discovery app<br/>[App.jsx]"]
  node_navbar["Search and filters<br/>[Navbar.jsx]"]
  node_languages["Cinema selector"]
  node_moods["Mood selector<br/>[MoodSelector.jsx]"]
  node_carousel["Recommendation rows<br/>[Carousel.jsx]"]
  node_surprise["Surprise pick<br/>[SurpriseButton.jsx]"]
end

subgraph group_presentation["Movie presentation"]
  node_hero["Featured movie<br/>[Hero.jsx]"]
  node_card["Movie card<br/>[MovieCard.jsx]"]
  node_details["Movie details and trailers<br/>[DetailModal.jsx]"]
end

subgraph group_personal["Personal features"]
  node_favorites["Favourites and watchlist"]
  node_sharing["Movie sharing<br/>[ShareButton.jsx]"]
  node_pwa["Offline app shell<br/>[sw.js]"]
end

node_viewer(("Movie viewer"))

node_dataset -->|"builds"| node_catalogue
node_catalogue -->|"loads at startup"| node_engine
node_viewer -->|"browses"| node_app
node_app -->|"fetches shared movie"| node_api
node_api -->|"delegates search"| node_engine
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_languages
node_app -->|"renders"| node_moods
node_app -->|"renders"| node_carousel
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_card
node_app -->|"renders"| node_details
node_languages -->|"renders"| node_surprise
node_card -->|"reads and toggles"| node_favorites
node_hero -->|"reads and toggles"| node_favorites
node_details -->|"reads and toggles"| node_favorites
node_hero -->|"renders"| node_sharing
node_details -->|"renders"| node_sharing
node_viewer -->|"uses offline fallback"| node_pwa

click node_dataset "https://github.com/himeshrana1137/cinematch-multilang/blob/main/backend/build_dataset.py"
click node_catalogue "https://github.com/himeshrana1137/cinematch-multilang/blob/main/backend/data/movies.json"
click node_api "https://github.com/himeshrana1137/cinematch-multilang/blob/main/backend/app.py"
click node_engine "https://github.com/himeshrana1137/cinematch-multilang/blob/main/backend/recommender.py"
click node_app "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/App.jsx"
click node_navbar "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/Navbar.jsx"
click node_languages "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/LanguageSelector.jsx"
click node_moods "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/MoodSelector.jsx"
click node_carousel "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/Carousel.jsx"
click node_surprise "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/SurpriseButton.jsx"
click node_hero "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/Hero.jsx"
click node_card "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/MovieCard.jsx"
click node_details "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/DetailModal.jsx"
click node_favorites "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/context/FavoritesContext.jsx"
click node_sharing "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/ShareButton.jsx"
click node_pwa "https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/public/sw.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_dataset,node_catalogue,node_api,node_engine,node_viewer toneBlue
class node_app,node_navbar,node_languages,node_moods,node_carousel,node_surprise toneAmber
class node_hero,node_card,node_details toneMint
class node_favorites,node_sharing,node_pwa toneRose
```

## Components

### Catalogue and recommendations

- [Dataset preparation](https://github.com/himeshrana1137/cinematch-multilang/blob/main/backend/build_dataset.py): `backend/build_dataset.py`
- [Movie catalogue](https://github.com/himeshrana1137/cinematch-multilang/blob/main/backend/data/movies.json): `backend/data/movies.json`
- [Flask API](https://github.com/himeshrana1137/cinematch-multilang/blob/main/backend/app.py): `backend/app.py`
- [Hybrid recommender](https://github.com/himeshrana1137/cinematch-multilang/blob/main/backend/recommender.py): `backend/recommender.py`

### Discovery interface

- [Discovery app](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Search and filters](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Cinema selector](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/LanguageSelector.jsx): `frontend/src/components/LanguageSelector.jsx`
- [Mood selector](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/MoodSelector.jsx): `frontend/src/components/MoodSelector.jsx`
- [Recommendation rows](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/Carousel.jsx): `frontend/src/components/Carousel.jsx`
- [Surprise pick](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/SurpriseButton.jsx): `frontend/src/components/SurpriseButton.jsx`

### Movie presentation

- [Featured movie](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/Hero.jsx): `frontend/src/components/Hero.jsx`
- [Movie card](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/MovieCard.jsx): `frontend/src/components/MovieCard.jsx`
- [Movie details and trailers](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/DetailModal.jsx): `frontend/src/components/DetailModal.jsx`

### Personal features

- [Favourites and watchlist](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/context/FavoritesContext.jsx): `frontend/src/context/FavoritesContext.jsx`
- [Movie sharing](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/src/components/ShareButton.jsx): `frontend/src/components/ShareButton.jsx`
- [Offline app shell](https://github.com/himeshrana1137/cinematch-multilang/blob/main/frontend/public/sw.js): `frontend/public/sw.js`

### Other components

- **Movie viewer**

## Connections

- Dataset preparation → Movie catalogue: builds (evidence: `README.md`)
- Movie catalogue → Hybrid recommender: loads at startup (evidence: `README.md`)
- Movie viewer → Discovery app: browses (evidence: `README.md`)
- Discovery app → Flask API: fetches shared movie (evidence: `frontend/src/App.jsx`)
- Flask API → Hybrid recommender: delegates search (evidence: `backend/app.py`)
- Discovery app → Search and filters: renders (evidence: `frontend/src/App.jsx`)
- Discovery app → Cinema selector: renders (evidence: `frontend/src/App.jsx`)
- Discovery app → Mood selector: renders (evidence: `frontend/src/App.jsx`)
- Discovery app → Recommendation rows: renders (evidence: `frontend/src/App.jsx`)
- Discovery app → Featured movie: renders (evidence: `frontend/src/App.jsx`)
- Discovery app → Movie card: renders (evidence: `frontend/src/App.jsx`)
- Discovery app → Movie details and trailers: renders (evidence: `frontend/src/App.jsx`)
- Cinema selector → Surprise pick: renders (evidence: `frontend/src/components/LanguageSelector.jsx`)
- Movie card → Favourites and watchlist: reads and toggles (evidence: `frontend/src/components/MovieCard.jsx`)
- Featured movie → Favourites and watchlist: reads and toggles (evidence: `frontend/src/components/Hero.jsx`)
- Movie details and trailers → Favourites and watchlist: reads and toggles (evidence: `frontend/src/components/DetailModal.jsx`)
- Featured movie → Movie sharing: renders (evidence: `frontend/src/components/Hero.jsx`)
- Movie details and trailers → Movie sharing: renders (evidence: `frontend/src/components/DetailModal.jsx`)
- Movie viewer → Offline app shell: uses offline fallback (evidence: `README.md`)
