# team9-cs435/movie-sentiment-recommender architecture

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

- Interactive diagram: https://gitdiagram.com/team9-cs435/movie-sentiment-recommender
- Repository: https://github.com/team9-cs435/movie-sentiment-recommender

## Overview

This repository contains a small Spark application that reads review and movie-metadata JSONL datasets, filters and reshapes verified reviews, cleans metadata, joins the datasets, and displays selected fields. The README describes sentiment-shift analysis and distributed recommendation models, but the only source file shown does not implement those capabilities, so they are not represented as runtime components. The graph reflects only the observed preparation workflow; the input dataset locations are referenced in code but are not repository files.

Main entry points: [`project/app.py`](https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py) (Dataset join)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_spark["Spark session<br/>[app.py]"]
node_reviews["Review dataset"]
node_review_clean["Review cleanup<br/>[app.py]"]
node_metadata["Metadata dataset"]
node_metadata_clean["Metadata cleanup<br/>[app.py]"]
node_join["Dataset join<br/>[app.py]"]
node_display["Sample display<br/>[app.py]"]

node_spark -->|"reads"| node_reviews
node_spark -->|"reads"| node_metadata
node_reviews -->|"filters and reshapes"| node_review_clean
node_metadata -->|"selects and renames"| node_metadata_clean
node_review_clean -->|"joins by movie"| node_join
node_metadata_clean -->|"joins by movie"| node_join
node_join -->|"shows sample"| node_display

click node_spark "https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py"
click node_review_clean "https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py"
click node_metadata_clean "https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py"
click node_join "https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py"
click node_display "https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.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_spark,node_metadata_clean,node_join,node_display toneTeal
class node_reviews,node_review_clean toneBlue
class node_metadata toneIndigo
```

## Components

### Other components

- [Spark session](https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py): `project/app.py`
- **Review dataset**
- [Review cleanup](https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py): `project/app.py`
- **Metadata dataset**
- [Metadata cleanup](https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py): `project/app.py`
- [Dataset join](https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py): `project/app.py`
- [Sample display](https://github.com/team9-cs435/movie-sentiment-recommender/blob/main/project/app.py): `project/app.py`

## Connections

- Spark session → Review dataset: reads (evidence: `project/app.py`)
- Spark session → Metadata dataset: reads (evidence: `project/app.py`)
- Review dataset → Review cleanup: filters and reshapes (evidence: `project/app.py`)
- Metadata dataset → Metadata cleanup: selects and renames (evidence: `project/app.py`)
- Review cleanup → Dataset join: joins by movie (evidence: `project/app.py`)
- Metadata cleanup → Dataset join: joins by movie (evidence: `project/app.py`)
- Dataset join → Sample display: shows sample (evidence: `project/app.py`)
