# tanouar/moviesdb architecture

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

- Interactive diagram: https://gitdiagram.com/tanouar/moviesdb
- Repository: https://github.com/tanouar/moviesdb

## Overview

MoviesDB transforms IMDb and Marvel film data into a Neo4j graph, then serves interactive graph exploration and network analysis through Streamlit. The documented data path covers IMDb preparation, MySQL loading and SQL extraction, Neo4j import, and app-driven queries and visualization; a separate wiki scraper supplies Marvel film metadata. Sampled code confirms the Streamlit module calls and loader behavior, while several pipeline stages are described only in the README, so those links cite the documentation rather than implying unsampled implementation details.

Main entry points: [`Streamlit-App/app.py`](https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/app.py) (Streamlit app), [`pipeline/run_pipeline.py`](https://github.com/tanouar/moviesdb/blob/main/pipeline/run_pipeline.py) (IMDb pipeline), [`data/tests`](https://github.com/tanouar/moviesdb/tree/main/data/tests) (Marvel import data), [`mysql`](https://github.com/tanouar/moviesdb/tree/main/mysql) (IMDb MySQL database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_prep["Data preparation"]
  node_pipeline_run["IMDb pipeline<br/>[run_pipeline.py]"]
  node_raw_data["Raw data files"]
  node_wiki_scraper["Marvel wiki scraper"]
end

subgraph group_mysql_stage["IMDb and MySQL"]
  node_mysql_db[("IMDb MySQL database")]
  node_marvel_sql["Marvel SQL extraction"]
  node_formatted_data["Marvel import data"]
end

subgraph group_graph_stage["Neo4j graph"]
  node_aura_loader["AuraDB loader"]
  node_local_loader["Local Neo4j loader<br/>[load_into_neo4j.py]"]
  node_neo4j_db[("Neo4j graph")]
end

subgraph group_exploration["Streamlit exploration"]
  node_streamlit_app["Streamlit app<br/>[app.py]"]
  node_ui_filters["Sidebar filters<br/>[ui_helpers.py]"]
  node_neo4j_connector["Graph queries<br/>[neo4j_connector.py]"]
  node_graph_analysis["Graph analysis<br/>[graph_analyzer.py]"]
  node_graph_builder["Interactive visualization<br/>[graph_builder.py]"]
end

node_imdb_data["IMDb dataset"]
node_streamlit_user(("Explorer"))

node_imdb_data -->|"downloads and prepares"| node_pipeline_run
node_pipeline_run -->|"writes raw files"| node_raw_data
node_pipeline_run -->|"loads IMDb data"| node_mysql_db
node_mysql_db -->|"queries Marvel films"| node_marvel_sql
node_marvel_sql -->|"exports import data"| node_formatted_data
node_formatted_data -->|"loads CSV data"| node_aura_loader
node_formatted_data -->|"loads CSV data"| node_local_loader
node_aura_loader -->|"creates graph data"| node_neo4j_db
node_local_loader -->|"creates graph data"| node_neo4j_db
node_wiki_scraper -->|"writes film metadata"| node_raw_data
node_streamlit_user -->|"explores graph"| node_streamlit_app
node_streamlit_app -->|"renders filters"| node_ui_filters
node_streamlit_app -->|"queries graph"| node_neo4j_connector
node_neo4j_connector -->|"runs Cypher queries"| node_neo4j_db
node_streamlit_app -->|"analyzes graph"| node_graph_analysis
node_streamlit_app -->|"builds visualization"| node_graph_builder
node_graph_builder -->|"uses community colors"| node_graph_analysis

click node_pipeline_run "https://github.com/tanouar/moviesdb/blob/main/pipeline/run_pipeline.py"
click node_raw_data "https://github.com/tanouar/moviesdb/tree/main/data/raw"
click node_wiki_scraper "https://github.com/tanouar/moviesdb/blob/main/pipeline/read_marvel_wiki.py"
click node_mysql_db "https://github.com/tanouar/moviesdb/tree/main/mysql"
click node_marvel_sql "https://github.com/tanouar/moviesdb/tree/main/mysql"
click node_formatted_data "https://github.com/tanouar/moviesdb/tree/main/data/tests"
click node_aura_loader "https://github.com/tanouar/moviesdb/blob/main/pipeline/load_into_auradb.py"
click node_local_loader "https://github.com/tanouar/moviesdb/blob/main/pipeline/load_into_neo4j.py"
click node_streamlit_app "https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/app.py"
click node_ui_filters "https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/modules/ui_helpers.py"
click node_neo4j_connector "https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/modules/neo4j_connector.py"
click node_graph_analysis "https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/modules/graph_analyzer.py"
click node_graph_builder "https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/modules/graph_builder.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_pipeline_run,node_raw_data,node_wiki_scraper toneBlue
class node_mysql_db,node_marvel_sql,node_formatted_data toneAmber
class node_aura_loader,node_local_loader,node_neo4j_db toneMint
class node_streamlit_app,node_ui_filters,node_neo4j_connector,node_graph_analysis,node_graph_builder toneRose
class node_imdb_data,node_streamlit_user toneIndigo
```

## Components

### Data preparation

- [IMDb pipeline](https://github.com/tanouar/moviesdb/blob/main/pipeline/run_pipeline.py): `pipeline/run_pipeline.py`
- [Raw data files](https://github.com/tanouar/moviesdb/tree/main/data/raw): `data/raw`
- [Marvel wiki scraper](https://github.com/tanouar/moviesdb/blob/main/pipeline/read_marvel_wiki.py): `pipeline/read_marvel_wiki.py`

### IMDb and MySQL

- [IMDb MySQL database](https://github.com/tanouar/moviesdb/tree/main/mysql): `mysql`
- [Marvel SQL extraction](https://github.com/tanouar/moviesdb/tree/main/mysql): `mysql`
- [Marvel import data](https://github.com/tanouar/moviesdb/tree/main/data/tests): `data/tests`

### Neo4j graph

- [AuraDB loader](https://github.com/tanouar/moviesdb/blob/main/pipeline/load_into_auradb.py): `pipeline/load_into_auradb.py`
- [Local Neo4j loader](https://github.com/tanouar/moviesdb/blob/main/pipeline/load_into_neo4j.py): `pipeline/load_into_neo4j.py`
- **Neo4j graph**

### Streamlit exploration

- [Streamlit app](https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/app.py): `Streamlit-App/app.py`
- [Sidebar filters](https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/modules/ui_helpers.py): `Streamlit-App/modules/ui_helpers.py`
- [Graph queries](https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/modules/neo4j_connector.py): `Streamlit-App/modules/neo4j_connector.py`
- [Graph analysis](https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/modules/graph_analyzer.py): `Streamlit-App/modules/graph_analyzer.py`
- [Interactive visualization](https://github.com/tanouar/moviesdb/blob/main/Streamlit-App/modules/graph_builder.py): `Streamlit-App/modules/graph_builder.py`

### Other components

- **IMDb dataset**
- **Explorer**

## Connections

- IMDb dataset → IMDb pipeline: downloads and prepares
- IMDb pipeline → Raw data files: writes raw files (evidence: `pipeline/run_pipeline.py`)
- IMDb pipeline → IMDb MySQL database: loads IMDb data
- IMDb MySQL database → Marvel SQL extraction: queries Marvel films
- Marvel SQL extraction → Marvel import data: exports import data
- Marvel import data → AuraDB loader: loads CSV data (evidence: `pipeline/load_into_auradb.py`)
- Marvel import data → Local Neo4j loader: loads CSV data (evidence: `pipeline/load_into_neo4j.py`)
- AuraDB loader → Neo4j graph: creates graph data (evidence: `pipeline/load_into_auradb.py`)
- Local Neo4j loader → Neo4j graph: creates graph data (evidence: `pipeline/load_into_neo4j.py`)
- Marvel wiki scraper → Raw data files: writes film metadata (evidence: `pipeline/read_marvel_wiki.py`)
- Explorer → Streamlit app: explores graph
- Streamlit app → Sidebar filters: renders filters (evidence: `Streamlit-App/app.py`)
- Streamlit app → Graph queries: queries graph (evidence: `Streamlit-App/app.py`)
- Graph queries → Neo4j graph: runs Cypher queries (evidence: `Streamlit-App/modules/neo4j_connector.py`)
- Streamlit app → Graph analysis: analyzes graph (evidence: `Streamlit-App/app.py`)
- Streamlit app → Interactive visualization: builds visualization (evidence: `Streamlit-App/app.py`)
- Interactive visualization → Graph analysis: uses community colors (evidence: `Streamlit-App/modules/graph_builder.py`)
