# ramkishan576/moive_recom architecture

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

- Interactive diagram: https://gitdiagram.com/ramkishan576/moive_recom
- Repository: https://github.com/ramkishan576/moive_recom

## Overview

This repository implements a movie-recommendation app: a user selects a movie in the Streamlit interface, which requests recommendations from a FastAPI endpoint and displays the returned titles. The API matches the title against its movie catalog and ranks movies using a similarity matrix. The source also references a similarity pickle that is not present in the supplied file tree; notebook contents and the similarity-building workflow were not inspected.

Main entry points: [`app.py`](https://github.com/ramkishan576/moive_recom/blob/main/app.py) (Movie selector), [`api.py`](https://github.com/ramkishan576/moive_recom/blob/main/api.py) (FastAPI endpoints), [`movies.pkl`](https://github.com/ramkishan576/moive_recom/blob/main/movies.pkl) (Movie catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_streamlit["Movie selector<br/>[app.py]"]
end

subgraph group_service["Recommendation service"]
  node_api["FastAPI endpoints<br/>[api.py]"]
  node_recommend["Title matching and ranking<br/>[api.py]"]
end

subgraph group_data["Recommendation data"]
  node_catalog[("Movie catalog<br/>[movies.pkl]")]
  node_similarity[("Similarity matrix")]
end

node_user(("User"))

node_user -->|"selects movie"| node_streamlit
node_streamlit -->|"loads titles"| node_catalog
node_streamlit -->|"requests recommendations"| node_api
node_api -->|"calls"| node_recommend
node_recommend -->|"matches and reads"| node_catalog
node_recommend -->|"ranks with"| node_similarity
node_api -->|"returns recommendations"| node_streamlit
node_streamlit -->|"displays titles"| node_user

click node_streamlit "https://github.com/ramkishan576/moive_recom/blob/main/app.py"
click node_api "https://github.com/ramkishan576/moive_recom/blob/main/api.py"
click node_recommend "https://github.com/ramkishan576/moive_recom/blob/main/api.py"
click node_catalog "https://github.com/ramkishan576/moive_recom/blob/main/movies.pkl"

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_streamlit,node_user toneBlue
class node_api,node_recommend toneAmber
class node_catalog,node_similarity toneMint
```

## Components

### User interface

- [Movie selector](https://github.com/ramkishan576/moive_recom/blob/main/app.py): `app.py`

### Recommendation service

- [FastAPI endpoints](https://github.com/ramkishan576/moive_recom/blob/main/api.py): `api.py`
- [Title matching and ranking](https://github.com/ramkishan576/moive_recom/blob/main/api.py): `api.py`

### Recommendation data

- [Movie catalog](https://github.com/ramkishan576/moive_recom/blob/main/movies.pkl): `movies.pkl`
- **Similarity matrix**

### Other components

- **User**

## Connections

- User → Movie selector: selects movie
- Movie selector → Movie catalog: loads titles
- Movie selector → FastAPI endpoints: requests recommendations
- FastAPI endpoints → Title matching and ranking: calls
- Title matching and ranking → Movie catalog: matches and reads
- Title matching and ranking → Similarity matrix: ranks with
- FastAPI endpoints → Movie selector: returns recommendations
- Movie selector → User: displays titles
