# poojapatelll/cinescope-movie-analytics-system architecture

> Architecture diagram of the GitHub repository poojapatelll/cinescope-movie-analytics-system, 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/poojapatelll/cinescope-movie-analytics-system
- Repository: https://github.com/poojapatelll/cinescope-movie-analytics-system

## Overview

CineScope is a Streamlit dashboard for TMDB movie releases and Netflix Top 10 performance. Users browse home metrics, daily and weekly releases, and Netflix leaderboards and show trends; they can load a CSV and request TMDB title matching. TMDB data is fetched on demand or by the daily scheduler, then dashboard pages read stored data from SQLite. The supplied excerpts document these paths; implementation details of unsampled modules are not assumed.

Main entry points: [`database.py`](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/database.py) (Database queries), [`pages/3_Show_Analysis.py`](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/pages/3_Show_Analysis.py) (Show analysis), [`title_matcher.py`](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/title_matcher.py) (Title matcher), [`tmdb_fetch.py`](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/tmdb_fetch.py) (TMDB fetches)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_home["Home overview<br/>[app.py]"]
  node_daily_page["Daily releases"]
  node_weekly_page["Weekly releases"]
end

subgraph group_netflix["Netflix Analysis"]
  node_analysis_page["Show analysis<br/>[3_Show_Analysis.py]"]
  node_loader["CSV loader<br/>[netflix_loader.py]"]
  node_matcher["Title matcher<br/>[title_matcher.py]"]
end

subgraph group_tmdb["TMDB Data"]
  node_scheduler["Daily scheduler<br/>[scheduler.py]"]
  node_fetch["TMDB fetches<br/>[tmdb_fetch.py]"]
end

subgraph group_storage["Persistence"]
  node_db_code["Database queries<br/>[database.py]"]
  node_sqlite[("SQLite database")]
end

node_user(("Dashboard user"))
node_csv["Netflix CSV<br/>[netflix_data.csv]"]
node_tmdb_api{{"TMDB API"}}

node_user -->|"opens"| node_home
node_user -->|"opens"| node_daily_page
node_user -->|"opens"| node_weekly_page
node_user -->|"opens"| node_analysis_page
node_home -->|"reads metrics"| node_db_code
node_home -->|"starts scheduler"| node_scheduler
node_home -->|"requests refresh"| node_fetch
node_daily_page -->|"reads releases"| node_db_code
node_weekly_page -->|"reads releases"| node_db_code
node_analysis_page -->|"reads analysis"| node_db_code
node_analysis_page -->|"loads CSV"| node_loader
node_csv -->|"provides rows"| node_loader
node_loader -->|"upserts rows"| node_db_code
node_analysis_page -->|"requests matching"| node_matcher
node_matcher -->|"reads unmatched titles"| node_db_code
node_matcher -->|"searches title"| node_fetch
node_matcher -->|"saves match"| node_db_code
node_analysis_page -->|"reads enrichment"| node_matcher
node_scheduler -->|"runs daily fetches"| node_fetch
node_fetch -->|"requests movie data"| node_tmdb_api
node_fetch -->|"stores releases and logs"| node_db_code
node_db_code -->|"reads and writes"| node_sqlite

click node_home "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/app.py"
click node_daily_page "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/pages/1_Daily_Releases.py"
click node_weekly_page "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/pages/2_Weekly_Releases.py"
click node_analysis_page "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/pages/3_Show_Analysis.py"
click node_csv "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/data/netflix_data.csv"
click node_loader "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/netflix_loader.py"
click node_matcher "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/title_matcher.py"
click node_scheduler "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/scheduler.py"
click node_fetch "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/tmdb_fetch.py"
click node_db_code "https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/database.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_home,node_daily_page,node_weekly_page,node_user toneBlue
class node_analysis_page,node_loader,node_matcher toneAmber
class node_scheduler,node_fetch,node_tmdb_api toneMint
class node_db_code,node_sqlite toneRose
class node_csv toneTeal
```

## Components

### Dashboard

- [Home overview](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/app.py): `app.py`
- [Daily releases](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/pages/1_Daily_Releases.py): `pages/1_Daily_Releases.py`
- [Weekly releases](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/pages/2_Weekly_Releases.py): `pages/2_Weekly_Releases.py`

### Netflix Analysis

- [Show analysis](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/pages/3_Show_Analysis.py): `pages/3_Show_Analysis.py`
- [CSV loader](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/netflix_loader.py): `netflix_loader.py`
- [Title matcher](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/title_matcher.py): `title_matcher.py`

### TMDB Data

- [Daily scheduler](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/scheduler.py): `scheduler.py`
- [TMDB fetches](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/tmdb_fetch.py): `tmdb_fetch.py`

### Persistence

- [Database queries](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/database.py): `database.py`
- **SQLite database**

### Other components

- **Dashboard user**
- [Netflix CSV](https://github.com/poojapatelll/cinescope-movie-analytics-system/blob/main/data/netflix_data.csv): `data/netflix_data.csv`
- **TMDB API**

## Connections

- Dashboard user → Home overview: opens
- Dashboard user → Daily releases: opens
- Dashboard user → Weekly releases: opens
- Dashboard user → Show analysis: opens
- Home overview → Database queries: reads metrics
- Home overview → Daily scheduler: starts scheduler
- Home overview → TMDB fetches: requests refresh
- Daily releases → Database queries: reads releases
- Weekly releases → Database queries: reads releases
- Show analysis → Database queries: reads analysis
- Show analysis → CSV loader: loads CSV
- Netflix CSV → CSV loader: provides rows
- CSV loader → Database queries: upserts rows
- Show analysis → Title matcher: requests matching
- Title matcher → Database queries: reads unmatched titles
- Title matcher → TMDB fetches: searches title
- Title matcher → Database queries: saves match
- Show analysis → Title matcher: reads enrichment
- Daily scheduler → TMDB fetches: runs daily fetches
- TMDB fetches → TMDB API: requests movie data
- TMDB fetches → Database queries: stores releases and logs
- Database queries → SQLite database: reads and writes
