Hydrogen Architecture · The Technical Reference · Lund Studio
Technical Reference · LUND-INV-193 – 200

Hydrogen Architecture.

The scrollable technical reference for the Lund Studio Hydrogen scaffold. File structure, data flow, shard topology, deployment pipeline.

I

Overview

The Lund Studio Hydrogen scaffold is a React/Remix headless storefront deployed to Shopify Oxygen. It renders the 10,141 pages of the YGGDRASIL Liquid theme via the LivingPage shim (LUND-INV-194), with selected high-priority pages ported to native React components.

The scaffold was scaffolded, extracted, sharded, and shipped on April 20, 2026, the day the studio hit the Shopify 10,000-template limit with the Liquid theme YGGDRASIL v21.0.0. Rather than pay for Plus or delete pages, the studio architected around the cap by transitioning to a headless platform that has no cap of any kind.

Framework
Shopify Hydrogen 2025.7 + Remix 2.14 + React 18
Language
TypeScript 5.6 (strict mode)
Build
Vite 5.4
Hosting
Shopify Oxygen (Cloudflare Workers edge runtime) — free
Commerce backend
Shopify Advanced ($399/mo) via Storefront API
Repo size (packaged)
lundstudio-hydrogen-v1.zip — 6.3 MB
II

File Structure

The canonical layout of the scaffold. Every file has a specific role.

lundstudio-hydrogen/
├── app/
│   ├── root.tsx                     # HTML shell + meta/link tags + global loader (menu)
│   ├── entry.server.tsx             # SSR entry + CSP nonce + bot detection
│   ├── components/
│   │   ├── Header.tsx              # DATA-DRIVEN nav (reads menu from rootData)
│   │   ├── Footer.tsx              # Brand footer with Four Marks sigil
│   │   ├── FourMarks.tsx           # Inline SVG brand mark component
│   │   └── LivingPage.tsx          # LUND-INV-194 · migration shim
│   ├── lib/
│   │   ├── content.ts              # LUND-INV-193 · sharded content loader
│   │   ├── menu.ts                 # Menu data layer (auto-menu)
│   │   └── session.ts              # Cookie session storage
│   ├── routes/
│   │   ├── _index.tsx              # Homepage (native React)
│   │   ├── pages.$handle.tsx       # Dynamic route — dispatches to LivingPage
│   │   ├── pages.the-curriculum.tsx # Native React port
│   │   ├── pages.register.tsx      # Native React port (masthead)
│   │   ├── pages.sitemap-auto.tsx  # Auto-generated full sitemap
│   │   └── sitemap[.]xml.tsx       # XML sitemap for search engines
│   └── styles/
│       ├── tokens.css              # LUND-INV-196 · Divinity Rule tokens
│       ├── base.css                # Base typography + layout
│       ├── home.css                # Homepage + Header/Footer styles
│       ├── curriculum.css          # Curriculum page styles
│       └── register.css            # Register page styles
├── data/
│   ├── content.json                # 10,141 pages metadata (2.9 MB lean manifest)
│   ├── manifest.json               # Compact slug+title+cat index
│   ├── shard-lookup.json           # slug → shard-number index
│   └── shards/
│       ├── shard-000.json          # 500 pages × body_html + styles
│       ├── shard-001.json
│       └── ... shard-020.json       # 21 shards × ~3.5 MB each
├── public/
│   └── four-marks.svg              # Browser tab favicon
├── server.ts                       # Oxygen worker entry (Cloudflare Workers)
├── package.json                    # Hydrogen + Remix + React deps
├── vite.config.ts                  # Hydrogen + Oxygen + Remix future flags
├── tsconfig.json                   # TypeScript strict mode
├── env.d.ts                        # Typed environment variables
├── .env.example                    # Shopify credentials template
├── extract.py                      # Build-time extractor (classifier embedded)
├── README.md                       # Quickstart guide
├── DECISION.md                     # Plus vs Headless decision doc
└── OPERATOR-PLAYBOOK.md            # Day-by-day rollout plan

Total: 55 files, 77 MB unpacked (6.3 MB packaged)
III

Data Layer

Three JSON files, one per concern. All generated by extract.py.

content.json · 2.9 MB
The Lean Manifest
All 10,141 pages with metadata only: slug, title, description, category, byte/line counts. Excludes body content. Loaded once per worker cold start.
shard-lookup.json · 191 KB
The Index
Key-value mapping: slug → shard number. Loaded alongside the manifest. Consumed by content.ts to determine which shard holds a given page's body.
shards/shard-NNN.json × 21
The Content
~3.5 MB each. 500 pages per shard. Contains body_html + per-page styles. Loaded lazily on first access, cached in module scope (LRU bounded).
IV

Routing

Remix file-based routing. Each file is a route handler.

/app/routes/_index.tsx
/pages/*app/routes/pages.$handle.tsx
/pages/the-curriculumapp/routes/pages.the-curriculum.tsx  # native
/pages/registerapp/routes/pages.register.tsx         # native
/pages/sitemap-autoapp/routes/pages.sitemap-auto.tsx    # auto index
/sitemap.xmlapp/routes/sitemap[.]xml.tsx          # SEO sitemap

All other /pages/{handle} paths resolve through pages.$handle.tsx,
which dispatches to the LivingPage shim for 10,138 of the 10,141 pages.
The three native routes (curriculum, register, homepage) are
first-class React implementations for the highest-traffic surfaces.
V

Sharding Topology

The architecture that enables 10,141+ pages from a 128 MB edge worker.

Content shards are alphabetically stable: page apache lives in shard-000.json because "a" alphabetically precedes all other first letters. Page zeus lives near the end of shard-020.json. Adding a new page shifts later slugs to potentially different shards at the next rebuild — this is acceptable because rebuilds are atomic.

Steady-state memory behavior under power-law access (most traffic on a small hot set of pages): approximately 10-15 MB of shard cache retained per worker instance. Under uniform distribution (rare): converges to ~75 MB total shard cache. Both well within the 128 MB ceiling.

VI

Deployment

Oxygen + GitHub integration = continuous deployment with no configuration.

1. shopify auth login
2. shopify hydrogen link           # connects repo to Oxygen
3. git push origin main             # triggers Oxygen build
4. Oxygen builds Remix app
5. Oxygen deploys to Cloudflare Workers edge network
6. DNS: lundstudio.co → Oxygen worker

First-deploy time: ~5 minutes (cold cache)
Subsequent deploy time: ~45 seconds (warm cache)
Rollback time: instant (Oxygen maintains last 10 deploys)
VII

Filings

Each of the eight Hydrogen-era inventions maps to a specific component of this scaffold.

LUND-INV-193
Implemented in app/lib/content.ts + data/.
LUND-INV-194
Implemented in app/components/LivingPage.tsx.
LUND-INV-195
Implemented via extract.py + Git + Oxygen.
LUND-INV-196
Implemented in app/styles/tokens.css.
LUND-INV-197
The shared-Shopify-backend architecture.
LUND-INV-198
Implicit in the shard-caching heuristics.
LUND-INV-199
Clauder reviews PRs under constitutional constraint.
LUND-INV-200
The author-time constraint making AI prose round-trip parseable.
Lundr AI Online
Welcome to the grove. I'm Lundr AI — I can help you learn about our services, pricing, process, or answer any questions about working with Lund Studio. What can I help with?
Lundr AI Fact Checker
Available exclusively to Lundr network city operators.
Not an operator? Reach out to Carter about joining the Lundr network.

Send Carter a message directly through the studio contact form.

Open Contact Form →

Or email directly: lundstudio.co/pages/contact

Sound
Ai