MCU Timeline
A watch order is a graph problem wearing a list costume
- Role
- Solo build
- When
- 2026
- Status
- Live
Context
Every Marvel viewing-order article is a numbered list, and every numbered list is one person’s opinion presented as fact. The interesting question is not "what is number 12", it is "if I want to watch this one tonight, what do I actually need to have seen first, and why".
The problem
Release order is derived from dates and chronological order is editorial, but prerequisites are a real structure: a directed acyclic graph. Hand-numbering any of the three orders guarantees they drift apart the moment a title is added.
Approach
Edges are the source of truth
The catalog holds 54 titles and 80 hand-written prerequisite edges, each carrying a note explaining why the dependency exists. Array position is the chronological order and release order is derived from dates, so neither is hand-numbered and neither can drift.
A graph engine that knows nothing about the web
backend/app/core/graph.py does Kahn topological sort with deterministic tie-breaking, cycle detection, transitive closure with longest-path depth, and order validation. It imports nothing from SQLAlchemy or FastAPI, which is why its tests run in milliseconds with no fixtures.
Let the loader catch the authoring mistakes
On load, the curated chronology is asserted to be a valid topological sort of the edges. One check, and most bad edits fail at startup instead of shipping as a wrong answer.
Longest path, not shortest
Prerequisite depth is measured by longest path to the target. Shortest path would draw a title earlier than something it actually depends on, which is the one thing the diagram exists to prevent.
How it fits together
Catalog
- 54 titles
- 80 prerequisite edges, each with a note
Validate on load
- curated chronology asserted to be a valid topo sort
Graph engine
- Kahn topological sort
- cycle detection
- transitive closure, longest path
Queries
- release order
- chronological order
- prerequisite chain
Tech stack
- Frontend
- React
- Vite
- Tailwind CSS
- Backend
- FastAPI
- SQLAlchemy
- PostgreSQL
- Auth
- JWT
- Platform
- Vercel
Outcome
- Live at marvel.bittobyte.qzz.io.
- Release, chronological, and custom orders all derived from one dataset rather than maintained separately.
- Pick any title and get its full prerequisite chain, with a stated reason on every edge.
More case studies
- BitToByte Design System: Four sites, one navbar, no version drift
- Hack the Hill III: One queue for every utility request, from the first call to the closed ticket
- ACRA Provenance Verifier: Making "Made in Canada" something a buyer can check