# hutgrabber/mcu architecture

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

- Interactive diagram: https://gitdiagram.com/hutgrabber/mcu
- Repository: https://github.com/hutgrabber/mcu

## Overview

MCU Helper is a static Marvel watch-list and story guide. Visitors browse release and in-universe orders, summaries, charts and upcoming releases, then track watched titles, compare or share lists, and optionally sync preferences across devices. The main page is assembled from content and chart data; ratings are refreshed separately from OMDb and included in the built page. Sync is an optional Firebase-backed capability, with Firestore rules protecting each user’s document. The template implementation was not sampled, so browser-side feature links rely on README documentation.

Main entry points: [`index.html`](https://github.com/hutgrabber/mcu/blob/main/index.html) (Published pages), [`src/build.py`](https://github.com/hutgrabber/mcu/blob/main/src/build.py) (Static-site builder), [`scripts/ratings.py`](https://github.com/hutgrabber/mcu/blob/main/scripts/ratings.py) (Ratings fetcher), [`src/data.json`](https://github.com/hutgrabber/mcu/blob/main/src/data.json) (Title content)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Guide content"]
  node_content_data["Title content<br/>[data.json]"]
  node_guide["Long-form guide<br/>[watch-guide.md]"]
  node_chart_defs["Chart definitions<br/>[charts.py]"]
  node_chart_data["Chart data<br/>[charts.json]"]
end

subgraph group_build["Page generation"]
  node_page_template["Page template<br/>[template.html]"]
  node_builder["Static-site builder<br/>[build.py]"]
  node_published_page["Published pages<br/>[index.html]"]
  node_shared_page["Shared-list entry<br/>[index.html]"]
  node_calendar_files["Release calendars"]
end

subgraph group_watch["Watch-list experience"]
  node_watch_guide["Watch-order guide<br/>[template.html]"]
  node_story_charts["Story charts<br/>[template.html]"]
  node_checklist["Watched checklist<br/>[template.html]"]
  node_compare["List comparison<br/>[template.html]"]
  node_search["Title search<br/>[template.html]"]
  node_sharing["Share links<br/>[template.html]"]
  node_calendar_actions["Calendar actions<br/>[template.html]"]
end

subgraph group_sync["Account sync"]
  node_firebase_auth["Google sign-in<br/>[template.html]"]
  node_sync_logic["Sync and merge<br/>[template.html]"]
  node_firestore[("User watch data")]
  node_rules["Firestore rules<br/>[firestore.rules]"]
end

subgraph group_ratings["Ratings"]
  node_imdb_ids["IMDb identifiers<br/>[imdb.json]"]
  node_ratings_fetch["Ratings fetcher<br/>[ratings.py]"]
  node_ratings_data["Saved ratings<br/>[ratings.json]"]
end

node_visitor(("Visitor"))
node_omdb["OMDb"]

node_guide -.->|"source material"| node_content_data
node_content_data -->|"included in build"| node_builder
node_chart_defs -->|"writes charts"| node_chart_data
node_chart_data -->|"included in build"| node_builder
node_page_template -->|"filled by"| node_builder
node_builder -->|"writes page"| node_published_page
node_builder -->|"writes redirect page"| node_shared_page
node_builder -->|"writes calendars"| node_calendar_files
node_visitor -->|"opens"| node_published_page
node_published_page -->|"presents"| node_watch_guide
node_published_page -->|"presents"| node_story_charts
node_published_page -->|"tracks titles"| node_checklist
node_published_page -->|"compares lists"| node_compare
node_published_page -->|"searches titles"| node_search
node_published_page -->|"creates shared links"| node_sharing
node_shared_page -->|"redirects to"| node_published_page
node_published_page -->|"offers calendar actions"| node_calendar_actions
node_calendar_actions -->|"downloads event"| node_calendar_files
node_published_page -->|"loads on sign-in"| node_firebase_auth
node_firebase_auth -->|"enables sync"| node_sync_logic
node_sync_logic -->|"reads and writes"| node_firestore
node_rules -->|"protects documents"| node_firestore
node_imdb_ids -->|"provides identifiers"| node_ratings_fetch
node_ratings_fetch -->|"fetches scores"| node_omdb
node_ratings_fetch -->|"writes ratings"| node_ratings_data
node_ratings_data -->|"included in build"| node_builder

click node_content_data "https://github.com/hutgrabber/mcu/blob/main/src/data.json"
click node_guide "https://github.com/hutgrabber/mcu/blob/main/src/watch-guide.md"
click node_chart_defs "https://github.com/hutgrabber/mcu/blob/main/src/charts.py"
click node_chart_data "https://github.com/hutgrabber/mcu/blob/main/src/charts.json"
click node_page_template "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_builder "https://github.com/hutgrabber/mcu/blob/main/src/build.py"
click node_published_page "https://github.com/hutgrabber/mcu/blob/main/index.html"
click node_shared_page "https://github.com/hutgrabber/mcu/blob/main/w/index.html"
click node_calendar_files "https://github.com/hutgrabber/mcu/tree/main/cal"
click node_watch_guide "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_story_charts "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_checklist "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_compare "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_search "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_sharing "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_calendar_actions "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_firebase_auth "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_sync_logic "https://github.com/hutgrabber/mcu/blob/main/src/template.html"
click node_rules "https://github.com/hutgrabber/mcu/blob/main/firebase/firestore.rules"
click node_imdb_ids "https://github.com/hutgrabber/mcu/blob/main/src/imdb.json"
click node_ratings_fetch "https://github.com/hutgrabber/mcu/blob/main/scripts/ratings.py"
click node_ratings_data "https://github.com/hutgrabber/mcu/blob/main/src/ratings.json"

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_content_data,node_guide,node_chart_defs,node_chart_data toneBlue
class node_page_template,node_builder,node_published_page,node_shared_page,node_calendar_files toneAmber
class node_watch_guide,node_story_charts,node_checklist,node_compare,node_search,node_sharing,node_calendar_actions toneMint
class node_firebase_auth,node_sync_logic,node_firestore,node_rules toneRose
class node_imdb_ids,node_ratings_fetch,node_ratings_data,node_visitor,node_omdb toneIndigo
```

## Components

### Guide content

- [Title content](https://github.com/hutgrabber/mcu/blob/main/src/data.json): `src/data.json`
- [Long-form guide](https://github.com/hutgrabber/mcu/blob/main/src/watch-guide.md): `src/watch-guide.md`
- [Chart definitions](https://github.com/hutgrabber/mcu/blob/main/src/charts.py): `src/charts.py`
- [Chart data](https://github.com/hutgrabber/mcu/blob/main/src/charts.json): `src/charts.json`

### Page generation

- [Page template](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`
- [Static-site builder](https://github.com/hutgrabber/mcu/blob/main/src/build.py): `src/build.py`
- [Published pages](https://github.com/hutgrabber/mcu/blob/main/index.html): `index.html`
- [Shared-list entry](https://github.com/hutgrabber/mcu/blob/main/w/index.html): `w/index.html`
- [Release calendars](https://github.com/hutgrabber/mcu/tree/main/cal): `cal`

### Watch-list experience

- [Watch-order guide](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`
- [Story charts](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`
- [Watched checklist](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`
- [List comparison](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`
- [Title search](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`
- [Share links](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`
- [Calendar actions](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`

### Account sync

- [Google sign-in](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`
- [Sync and merge](https://github.com/hutgrabber/mcu/blob/main/src/template.html): `src/template.html`
- **User watch data**
- [Firestore rules](https://github.com/hutgrabber/mcu/blob/main/firebase/firestore.rules): `firebase/firestore.rules`

### Ratings

- [IMDb identifiers](https://github.com/hutgrabber/mcu/blob/main/src/imdb.json): `src/imdb.json`
- [Ratings fetcher](https://github.com/hutgrabber/mcu/blob/main/scripts/ratings.py): `scripts/ratings.py`
- [Saved ratings](https://github.com/hutgrabber/mcu/blob/main/src/ratings.json): `src/ratings.json`

### Other components

- **Visitor**
- **OMDb**

## Connections

- Long-form guide → Title content: source material (evidence: `README.md`)
- Title content → Static-site builder: included in build (evidence: `README.md`)
- Chart definitions → Chart data: writes charts (evidence: `README.md`)
- Chart data → Static-site builder: included in build (evidence: `README.md`)
- Page template → Static-site builder: filled by (evidence: `README.md`)
- Static-site builder → Published pages: writes page (evidence: `src/build.py`)
- Static-site builder → Shared-list entry: writes redirect page (evidence: `src/build.py`)
- Static-site builder → Release calendars: writes calendars (evidence: `src/build.py`)
- Visitor → Published pages: opens (evidence: `README.md`)
- Published pages → Watch-order guide: presents (evidence: `README.md`)
- Published pages → Story charts: presents (evidence: `README.md`)
- Published pages → Watched checklist: tracks titles (evidence: `README.md`)
- Published pages → List comparison: compares lists (evidence: `README.md`)
- Published pages → Title search: searches titles (evidence: `README.md`)
- Published pages → Share links: creates shared links (evidence: `README.md`)
- Shared-list entry → Published pages: redirects to
- Published pages → Calendar actions: offers calendar actions (evidence: `README.md`)
- Calendar actions → Release calendars: downloads event
- Published pages → Google sign-in: loads on sign-in (evidence: `README.md`)
- Google sign-in → Sync and merge: enables sync (evidence: `README.md`)
- Sync and merge → User watch data: reads and writes (evidence: `README.md`)
- Firestore rules → User watch data: protects documents (evidence: `README.md`)
- IMDb identifiers → Ratings fetcher: provides identifiers (evidence: `scripts/ratings.py`)
- Ratings fetcher → OMDb: fetches scores (evidence: `scripts/ratings.py`)
- Ratings fetcher → Saved ratings: writes ratings (evidence: `scripts/ratings.py`)
- Saved ratings → Static-site builder: included in build (evidence: `README.md`)
