Skip to content

frontend/04: Pennsic Planner build-through tutorial - #51

Open
jbeshir wants to merge 3 commits into
mainfrom
tutorial/frontend-pennsic-planner
Open

frontend/04: Pennsic Planner build-through tutorial#51
jbeshir wants to merge 3 commits into
mainfrom
tutorial/frontend-pennsic-planner

Conversation

@jbeshir

@jbeshir jbeshir commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Entry 04 in the progressive tutorials/frontend/ curriculum, for the pennsic-planner widget — https://pennsic-planner.widgets.beshir.org

Built through the demesne frontend-tutorial pipeline (research → outline → 9 concurrent section drafts → stitch → review, 2 rounds → PASS). Markdown only; ~60 code excerpts verified verbatim against widgets/pennsic-planner/ source.

Stacked on #40 (frontend/03). This branch is based on a merge of main + #40's frontend/03 so its outline could read the real ## Concepts introduced ledger. The diff therefore currently shows 03-japanese-verb-tower.md as well; merge #40 first and this PR collapses to just the two 04 files. The forward link to ../design/04-pennsic-planner.md (#50) resolves once that sibling merges.

New ground (reference-only for anything 01–03 own)

  • External store / observer seam (headline) — a PlanStore interface + singleton RemotePlanStore living outside the component tree, subscribe/emit bridged into useState via a useEffect.
  • Remote persistence with optimistic concurrency — debounced PUT with If-Match: <rev>, writing/dirty single-flight coalescing, 409 → reload-and-notify, pagehide + keepalive flush.
  • Hash routing & capability URLs — secret in the fragment (never sent to the server), the AppMode discriminated-union state machine, and the applyRouteRef latest-closure pattern.
  • Client-side .ics generation & download — RFC 5545 + self-contained VTIMEZONE, octet-aware folding; Blob → object URL → <a download>.
  • Layout geometry computed in JS — minute-of-day → proportional top/height, greedy lane packing, findConflicts; cross-linked to the design tutorial for the CSS half.
  • Plus Cloudflare D1 as the new storage layer.

Already-covered concepts (hooks, lifting state, composition, URL-as-state, the Workers SPA+API model, domain-logic-outside-components, debounce, ResizeObserver→postMessage) are named-and-linked to [01]/[02]/[03], not re-taught.

Files: tutorials/frontend/04-pennsic-planner.md (+1317), one new tutorials/frontend/README.md row. The 01/02/03 files are untouched.

🤖 Generated with Claude Code

jbeshir and others added 3 commits June 21, 2026 18:20
Build-through tutorial covering the pure algorithmic conjugation engine,
a Cloudflare Worker AI backend (run_worker_first + Workers AI), debounced
abortable fetch with graceful degradation, lazy code-split corpus loading,
bidirectional URL state, and romaji input transformation. Adds the README
track row. Progressive: references frontend 01 and 02 for known concepts.
Build-through tutorial for the pennsic-planner widget as entry 04 in the
progressive tutorials/frontend/ curriculum. Teaches the external observable
store seam, remote persistence with optimistic concurrency, capability-URL
hash routing, JS-computed layout geometry, and client-side .ics generation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant