# tarunkaul35/ai-based-movies-recommendation-system architecture

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

- Interactive diagram: https://gitdiagram.com/tarunkaul35/ai-based-movies-recommendation-system
- Repository: https://github.com/tarunkaul35/ai-based-movies-recommendation-system

## Overview

This is a Streamlit movie recommender. The user selects a title, requests recommendations, and sees similar movies filtered by genre, rating, and year, with poster images where available. Offline preprocessing cleans the IMDb CSV, builds CountVectorizer features, computes cosine similarity, and saves data consumed by the recommendation function. The UI calls that function and retrieves posters from OMDb. The source index and excerpts support these main connections; generated pickle files are runtime artifacts, not listed in the tree.

Main entry points: [`app.py`](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/app.py) (Streamlit app and filters), [`model.py`](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/model.py) (Pickled movie data and similarity), [`main.py`](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/main.py) (Top-five recommender), [`poster.py`](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/poster.py) (Poster lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Data preparation"]
  node_dataset["IMDb movie data"]
  node_builder["Feature and similarity builder<br/>[model.py]"]
  node_artifacts[("Pickled movie data and similarity<br/>[model.py]")]
end

subgraph group_recommend["Recommendation"]
  node_engine["Top-five recommender<br/>[main.py]"]
end

subgraph group_interface["User interface"]
  node_ui["Streamlit app and filters<br/>[app.py]"]
  node_poster["Poster lookup<br/>[poster.py]"]
end

node_user(("Movie viewer"))
node_omdb{{"OMDb API"}}

node_dataset -->|"reads CSV"| node_builder
node_builder -->|"writes pickles"| node_artifacts
node_engine -->|"loads pickles"| node_artifacts
node_ui -->|"loads movie data"| node_artifacts
node_user -->|"selects title"| node_ui
node_ui -->|"requests recommendations"| node_engine
node_ui -->|"requests poster"| node_poster
node_poster -->|"queries API"| node_omdb
node_ui -->|"shows filtered results"| node_user

click node_dataset "https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/IMDb_All_Genres_etf_clean1.csv"
click node_builder "https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/model.py"
click node_artifacts "https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/model.py"
click node_engine "https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/main.py"
click node_ui "https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/app.py"
click node_poster "https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/poster.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_dataset,node_builder,node_artifacts,node_user toneBlue
class node_engine toneAmber
class node_ui,node_poster,node_omdb toneMint
```

## Components

### Data preparation

- [IMDb movie data](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/IMDb_All_Genres_etf_clean1.csv): `IMDb_All_Genres_etf_clean1.csv`
- [Feature and similarity builder](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/model.py): `model.py`
- [Pickled movie data and similarity](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/model.py): `model.py`

### Recommendation

- [Top-five recommender](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/main.py): `main.py`

### User interface

- [Streamlit app and filters](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/app.py): `app.py`
- [Poster lookup](https://github.com/tarunkaul35/ai-based-movies-recommendation-system/blob/main/poster.py): `poster.py`

### Other components

- **Movie viewer**
- **OMDb API**

## Connections

- IMDb movie data → Feature and similarity builder: reads CSV (evidence: `model.py`)
- Feature and similarity builder → Pickled movie data and similarity: writes pickles (evidence: `model.py`)
- Top-five recommender → Pickled movie data and similarity: loads pickles (evidence: `main.py`)
- Streamlit app and filters → Pickled movie data and similarity: loads movie data (evidence: `app.py`)
- Movie viewer → Streamlit app and filters: selects title (evidence: `app.py`)
- Streamlit app and filters → Top-five recommender: requests recommendations (evidence: `app.py`)
- Streamlit app and filters → Poster lookup: requests poster (evidence: `app.py`)
- Poster lookup → OMDb API: queries API (evidence: `poster.py`)
- Streamlit app and filters → Movie viewer: shows filtered results (evidence: `app.py`)
