# suyashagnihotri/bollywood-genre-based-movie-recommender architecture

> Architecture diagram of the GitHub repository suyashagnihotri/bollywood-genre-based-movie-recommender, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suyashagnihotri/bollywood-genre-based-movie-recommender
- Repository: https://github.com/suyashagnihotri/bollywood-genre-based-movie-recommender

## Overview

##### Project Type and Purpose
- This is a standalone, desktop-based recommendation application built in Python.
- Purpose: Let users pick a Bollywood movie title from a GUI and get top-N genre-based suggestions computed via TF–IDF and cosine similarity.

##### Key Components
a. User Interface Layer
- CustomTkinter GUI (movie_gui.py)
- Widgets: dropdown/listbox for movie selection, “Recommend” button, results display area
b. Data Layer
- CSV data source (movies_metadata.csv)
- Data ingestion via Pandas
c. Processing / Algorithm Layer
- Text preprocessing (TF–IDF vectorization on the “genres” field)
- Similarity computation (cosine similarity using Scikit-learn)
- Recommendation logic (sorting and selecting top-N results)
d. Integration and Flow
- GUI triggers data load & processing
- Algorithm returns a ranked list of movie titles
- GUI presents the recommendations

##### Architectural Patterns & Design Principles
- Simple MVC‐style separation:
- Model: movies_metadata.csv + Pandas DataFrame
- View: CustomTkinter components
- Controller: recommendation logic and event handlers in movie_gui.py
- Single‐process, in-memory data pipeline—no external services.
- Lazy loading: load & vectorize dataset only once at startup for responsiveness.

##### Technology Stack Labels
- Python 3.x
- Pandas (data ingestion & manipulation)
- Scikit-learn (TF–IDF, cosine similarity)
- CustomTkinter (desktop GUI)
- CSV file as data store

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "User Interface Layer"
        GUI["CustomTkinter GUI\n(movie_gui.py)"]:::ui
    end

    subgraph "Data Layer"
        DataSource["CSV Data Source\n(movies_metadata.csv)"]:::data
        DataLoader["Pandas Data Loader"]:::data
    end

    subgraph "Recommendation Engine"
        Vectorizer["TF–IDF Vectorizer"]:::proc
        Similarity["Cosine Similarity Engine"]:::proc
        Recommender["Recommendation Logic"]:::proc
    end

    README["Project Documentation\n(README.md)"]:::doc

    GUI -->|"Recommend event\ncalls controller"| DataLoader
    DataLoader -->|"load CSV"| DataSource
    DataLoader -->|"DataFrame"| Vectorizer
    Vectorizer -->|"feature vectors"| Similarity
    Similarity -->|"scores matrix"| Recommender
    Recommender -->|"top-N titles"| GUI

    click GUI "https://github.com/suyashagnihotri/bollywood-genre-based-movie-recommender/blob/main/movie_gui.py"
    click DataSource "https://github.com/suyashagnihotri/bollywood-genre-based-movie-recommender/blob/main/movies_metadata.csv"
    click README "https://github.com/suyashagnihotri/bollywood-genre-based-movie-recommender/blob/main/README.md"

    classDef ui fill:#AED6F1,stroke:#2E86C1,color:#1B4F72
    classDef data fill:#ABEBC6,stroke:#27AE60,color:#1D8348
    classDef proc fill:#F5CBA7,stroke:#EB984E,color:#B03A2E
    classDef doc fill:#D6DBDF,stroke:#85929E,color:#424949
```
