# inboxpraveen/movie-recommendation-system architecture

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

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

## Overview

This is a Django movie-discovery application backed by precomputed content-similarity artifacts. The main user flow is search or autocomplete, resolve a title, fetch similar movies, and render metadata-rich results; health and model-status endpoints support the same serving layer. An optional training pipeline builds artifacts for larger or custom catalogs, and a standalone inference engine exposes recommendation functionality. The graph follows documented behavior and shown excerpts; several implementation details and integrations are unsampled, so uncertain links are omitted.

Main entry points: [`recommender/views.py`](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py) (Web and API views), [`training/train.py`](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/train.py) (Training pipeline), [`movie_recommendation/urls.py`](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/movie_recommendation/urls.py) (URL routing), [`recommender/urls.py`](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/urls.py) (App endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_django_routes["URL routing<br/>[urls.py]"]
  node_app_routes["App endpoints<br/>[urls.py]"]
  node_request_views["Web and API views<br/>[views.py]"]
  node_search_cache[("Autocomplete cache<br/>[settings.py]")]
  node_page_templates["Search and results UI"]
end

subgraph group_serving["Recommendation serving"]
  node_model_loader["Model loading<br/>[views.py]"]
  node_web_recommender["Web recommender<br/>[views.py]"]
  node_title_search["Title matching<br/>[views.py]"]
  node_recommendation_results["Recommendations and metadata<br/>[views.py]"]
  node_health_status["Health and status<br/>[views.py]"]
end

subgraph group_training["Model preparation"]
  node_trainer["Training pipeline<br/>[train.py]"]
  node_feature_build["Feature preparation<br/>[train.py]"]
  node_neighbor_build["Similarity neighbors<br/>[train.py]"]
  node_cli_inference["Inference engine<br/>[infer.py]"]
end

subgraph group_data["Catalog and integrations"]
  node_artifact_output["Model artifacts<br/>[train.py]"]
  node_demo_catalog["Demo model files"]
end

node_visitor(("Movie seeker"))
node_moviegoers(("Movie catalog user"))
node_external_search["Google and IMDb"]
node_poster_host["TMDB image host"]

node_visitor -->|"requests pages"| node_django_routes
node_django_routes -->|"includes routes"| node_app_routes
node_app_routes -->|"dispatches endpoints"| node_request_views
node_request_views -->|"renders pages"| node_page_templates
node_request_views -->|"gets model"| node_model_loader
node_model_loader -->|"loads model files"| node_demo_catalog
node_model_loader -->|"initializes"| node_web_recommender
node_request_views -->|"searches titles"| node_title_search
node_request_views -->|"requests recommendations"| node_recommendation_results
node_web_recommender -->|"matches titles"| node_title_search
node_web_recommender -->|"builds results"| node_recommendation_results
node_request_views -->|"caches autocomplete"| node_search_cache
node_request_views -->|"serves status"| node_health_status
node_moviegoers -->|"supplies dataset"| node_trainer
node_trainer -->|"prepares features"| node_feature_build
node_trainer -->|"computes neighbors"| node_neighbor_build
node_trainer -->|"writes artifacts"| node_artifact_output
node_cli_inference -->|"loads model artifacts"| node_demo_catalog
node_recommendation_results -->|"links posters"| node_poster_host
node_page_templates -.->|"offers movie links"| node_external_search

click node_django_routes "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/movie_recommendation/urls.py"
click node_app_routes "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/urls.py"
click node_request_views "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py"
click node_search_cache "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/movie_recommendation/settings.py"
click node_page_templates "https://github.com/inboxpraveen/movie-recommendation-system/tree/master/recommender/templates/recommender"
click node_model_loader "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py"
click node_web_recommender "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py"
click node_title_search "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py"
click node_recommendation_results "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py"
click node_health_status "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py"
click node_trainer "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/train.py"
click node_feature_build "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/train.py"
click node_neighbor_build "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/train.py"
click node_artifact_output "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/train.py"
click node_demo_catalog "https://github.com/inboxpraveen/movie-recommendation-system/tree/master/demo_model"
click node_cli_inference "https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/infer.py"

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_django_routes,node_app_routes,node_request_views,node_search_cache,node_page_templates,node_moviegoers toneBlue
class node_model_loader,node_web_recommender,node_title_search,node_recommendation_results,node_health_status toneAmber
class node_trainer,node_feature_build,node_neighbor_build,node_cli_inference toneMint
class node_artifact_output,node_demo_catalog toneRose
class node_visitor,node_external_search,node_poster_host toneIndigo
```

## Components

### Web application

- [URL routing](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/movie_recommendation/urls.py): `movie_recommendation/urls.py`
- [App endpoints](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/urls.py): `recommender/urls.py`
- [Web and API views](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py): `recommender/views.py`
- [Autocomplete cache](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/movie_recommendation/settings.py): `movie_recommendation/settings.py`
- [Search and results UI](https://github.com/inboxpraveen/movie-recommendation-system/tree/master/recommender/templates/recommender): `recommender/templates/recommender`

### Recommendation serving

- [Model loading](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py): `recommender/views.py`
- [Web recommender](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py): `recommender/views.py`
- [Title matching](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py): `recommender/views.py`
- [Recommendations and metadata](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py): `recommender/views.py`
- [Health and status](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/recommender/views.py): `recommender/views.py`

### Model preparation

- [Training pipeline](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/train.py): `training/train.py`
- [Feature preparation](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/train.py): `training/train.py`
- [Similarity neighbors](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/train.py): `training/train.py`
- [Inference engine](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/infer.py): `training/infer.py`

### Catalog and integrations

- [Model artifacts](https://github.com/inboxpraveen/movie-recommendation-system/blob/master/training/train.py): `training/train.py`
- [Demo model files](https://github.com/inboxpraveen/movie-recommendation-system/tree/master/demo_model): `demo_model`

### Other components

- **Movie seeker**
- **Movie catalog user**
- **Google and IMDb**
- **TMDB image host**

## Connections

- Movie seeker → URL routing: requests pages (evidence: `README.md`)
- URL routing → App endpoints: includes routes (evidence: `movie_recommendation/urls.py`)
- App endpoints → Web and API views: dispatches endpoints (evidence: `recommender/urls.py`)
- Web and API views → Search and results UI: renders pages (evidence: `recommender/views.py`)
- Web and API views → Model loading: gets model (evidence: `recommender/views.py`)
- Model loading → Demo model files: loads model files (evidence: `README.md`)
- Model loading → Web recommender: initializes (evidence: `recommender/views.py`)
- Web and API views → Title matching: searches titles (evidence: `recommender/views.py`)
- Web and API views → Recommendations and metadata: requests recommendations (evidence: `recommender/views.py`)
- Web recommender → Title matching: matches titles (evidence: `recommender/views.py`)
- Web recommender → Recommendations and metadata: builds results (evidence: `recommender/views.py`)
- Web and API views → Autocomplete cache: caches autocomplete (evidence: `movie_recommendation/settings.py`)
- Web and API views → Health and status: serves status (evidence: `recommender/urls.py`)
- Movie catalog user → Training pipeline: supplies dataset (evidence: `README.md`)
- Training pipeline → Feature preparation: prepares features (evidence: `training/train.py`)
- Training pipeline → Similarity neighbors: computes neighbors (evidence: `training/train.py`)
- Training pipeline → Model artifacts: writes artifacts (evidence: `training/train.py`)
- Inference engine → Demo model files: loads model artifacts (evidence: `training/infer.py`)
- Recommendations and metadata → TMDB image host: links posters (evidence: `recommender/views.py`)
- Search and results UI → Google and IMDb: offers movie links (evidence: `README.md`)
