# aokighora/netflix-recommendation-system architecture

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

- Interactive diagram: https://gitdiagram.com/aokighora/netflix-recommendation-system
- Repository: https://github.com/aokighora/netflix-recommendation-system

## Overview

This repository combines a Netflix-rating batch recommender pipeline with a routed React dashboard. The CLI workflow parses ratings into train/test splits, fits a bias-aware latent-factor model, evaluates it, and generates ranked recommendations. The dashboard routes users to recommendation, discovery, cold-start, and evaluation views. The graph reflects the files present in the supplied tree; README-described UI capabilities are grouped at their visible router rather than assigned to missing page files. No backend or UI-to-model wiring is shown in the sampled sources.

Main entry points: [`App.tsx`](https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx) (App Router), [`evaluate_model.ts`](https://github.com/aokighora/netflix-recommendation-system/blob/main/evaluate_model.ts) (Model Evaluation), [`main.tsx`](https://github.com/aokighora/netflix-recommendation-system/blob/main/main.tsx) (React Entry), [`data_processing.ts`](https://github.com/aokighora/netflix-recommendation-system/blob/main/data_processing.ts) (Rating Preprocessing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Dashboard"]
  node_entry["React Entry<br/>[main.tsx]"]
  node_router["App Router<br/>[App.tsx]"]
  node_dashboard["Dashboard Analytics<br/>[App.tsx]"]
  node_discovery["Movie Discovery<br/>[App.tsx]"]
  node_recommendation_views["Recommendation Views<br/>[App.tsx]"]
  node_model_views["Model Views<br/>[App.tsx]"]
end

subgraph group_pipeline["Recommendation Pipeline"]
  node_preprocess["Rating Preprocessing<br/>[data_processing.ts]"]
  node_training["SVD Training<br/>[train_model.ts]"]
  node_evaluation["Model Evaluation<br/>[evaluate_model.ts]"]
  node_inference["Top-N Inference"]
end

subgraph group_artifacts["Data Artifacts"]
  node_ratings["Netflix Ratings"]
  node_splits[("Train Test Splits")]
  node_weights[("Model Weights")]
  node_metrics["Evaluation Metrics"]
  node_movie_titles["Movie Titles"]
end

subgraph group_contracts["Domain Types"]
  node_domain_types["Recommendation Types<br/>[types.ts]"]
end

node_user(("Dashboard User"))

node_user -->|"opens"| node_entry
node_entry -->|"renders"| node_router
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_discovery
node_router -->|"routes to"| node_recommendation_views
node_router -->|"routes to"| node_model_views
node_ratings -->|"reads"| node_preprocess
node_preprocess -->|"writes"| node_splits
node_splits -->|"loads"| node_training
node_training -->|"writes"| node_weights
node_splits -->|"loads test split"| node_evaluation
node_weights -->|"loads"| node_evaluation
node_evaluation -->|"writes"| node_metrics
node_weights -->|"loads"| node_inference
node_movie_titles -->|"loads when present"| node_inference

click node_entry "https://github.com/aokighora/netflix-recommendation-system/blob/main/main.tsx"
click node_router "https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx"
click node_dashboard "https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx"
click node_discovery "https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx"
click node_recommendation_views "https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx"
click node_model_views "https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx"
click node_preprocess "https://github.com/aokighora/netflix-recommendation-system/blob/main/data_processing.ts"
click node_training "https://github.com/aokighora/netflix-recommendation-system/blob/main/train_model.ts"
click node_evaluation "https://github.com/aokighora/netflix-recommendation-system/blob/main/evaluate_model.ts"
click node_inference "https://github.com/aokighora/netflix-recommendation-system/blob/main/generate_recommendations.ts"
click node_domain_types "https://github.com/aokighora/netflix-recommendation-system/blob/main/types.ts"

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_entry,node_router,node_dashboard,node_discovery,node_recommendation_views,node_model_views,node_user toneBlue
class node_preprocess,node_training,node_evaluation,node_inference toneAmber
class node_ratings,node_splits,node_weights,node_metrics,node_movie_titles toneMint
class node_domain_types toneRose
```

## Components

### Dashboard

- [React Entry](https://github.com/aokighora/netflix-recommendation-system/blob/main/main.tsx): `main.tsx`
- [App Router](https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx): `App.tsx`
- [Dashboard Analytics](https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx): `App.tsx`
- [Movie Discovery](https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx): `App.tsx`
- [Recommendation Views](https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx): `App.tsx`
- [Model Views](https://github.com/aokighora/netflix-recommendation-system/blob/main/App.tsx): `App.tsx`

### Recommendation Pipeline

- [Rating Preprocessing](https://github.com/aokighora/netflix-recommendation-system/blob/main/data_processing.ts): `data_processing.ts`
- [SVD Training](https://github.com/aokighora/netflix-recommendation-system/blob/main/train_model.ts): `train_model.ts`
- [Model Evaluation](https://github.com/aokighora/netflix-recommendation-system/blob/main/evaluate_model.ts): `evaluate_model.ts`
- [Top-N Inference](https://github.com/aokighora/netflix-recommendation-system/blob/main/generate_recommendations.ts): `generate_recommendations.ts`

### Data Artifacts

- **Netflix Ratings**
- **Train Test Splits**
- **Model Weights**
- **Evaluation Metrics**
- **Movie Titles**

### Domain Types

- [Recommendation Types](https://github.com/aokighora/netflix-recommendation-system/blob/main/types.ts): `types.ts`

### Other components

- **Dashboard User**

## Connections

- Dashboard User → React Entry: opens (evidence: `README.md`)
- React Entry → App Router: renders (evidence: `main.tsx`)
- App Router → Dashboard Analytics: routes to (evidence: `App.tsx`)
- App Router → Movie Discovery: routes to (evidence: `App.tsx`)
- App Router → Recommendation Views: routes to (evidence: `App.tsx`)
- App Router → Model Views: routes to (evidence: `App.tsx`)
- Netflix Ratings → Rating Preprocessing: reads (evidence: `data_processing.ts`)
- Rating Preprocessing → Train Test Splits: writes (evidence: `data_processing.ts`)
- Train Test Splits → SVD Training: loads (evidence: `train_model.ts`)
- SVD Training → Model Weights: writes (evidence: `train_model.ts`)
- Train Test Splits → Model Evaluation: loads test split (evidence: `evaluate_model.ts`)
- Model Weights → Model Evaluation: loads (evidence: `evaluate_model.ts`)
- Model Evaluation → Evaluation Metrics: writes (evidence: `evaluate_model.ts`)
- Model Weights → Top-N Inference: loads (evidence: `generate_recommendations.ts`)
- Movie Titles → Top-N Inference: loads when present (evidence: `generate_recommendations.ts`)
