feat: content module, local-first state, and vendored calendar #62

Merged
manlycucumber merged 1 commit from feat/content-state-calendar into develop 2026-07-06 18:18:29 +00:00
manlycucumber commented 2026-07-06 18:17:26 +00:00 (Migrated from github.com)

What & why

Completes v0.1.0 Core — the flagship invariants proven on real code.

Content module (src/lib/content)

  • Zod frontmatter schema (topic = folder: index.md + tier-1/2/3.md).
  • A build-time virtual-content Vite plugin applies the doctrine gate at build time: in a production build, non-approved topics are never written into the bundle — metadata and tier bodies alike. Pending doctrine is excluded, not merely hidden.
  • Three dummy topics (two approved, one pending with a sentinel) + a minimal /library listing prove it. pnpm guard:content (a CI step) asserts exclusion in the real build/; a preview build (CONTENT_PREVIEW=1) includes it.

Local-first, sync-ready state (src/lib/state)

  • The single $lib/state boundary: profiles, prefs (localStorage), collections (IndexedDB), a versioned migration runner, timestamp change-tracking, export/import backup, and a SyncAdapter seam (default NoopSyncAdapter). Opt-in parent-gated sync (v1.1.0) attaches here with no feature change.
  • Tested with in-memory fakes + fake-indexeddb.

Vendored calendar (src/lib/calendar, scripts/calendar)

  • 2026 calendar.json projected from introibo Core's public contract() (CC0 corpus), generated out-of-band (PHP via WSL) — CI needs no PHP, just reads the committed file.
  • Zod-validated with golden spot-checks: St John Bosco (Jan 31, white), Christmas (white), the movable Easter (2026-04-05, eastertide), Advent violet ferias.

Offline + docs

  • Reusable static server + Node offline smoke (pnpm guard:offline, a CI step) + a Playwright e2e harness (local/pre-release).
  • Architecture docs: offline invariant, state & sync, static-output (Docker-ready) contract.

Verified locally: pnpm check (0/0), lint, build, guard:external, guard:content, guard:offline, and 31 unit tests all green.

Release-As: 0.1.0

## What & why Completes **v0.1.0 Core** — the flagship invariants proven on real code. ### Content module (`src/lib/content`) - Zod frontmatter schema (topic = folder: `index.md` + `tier-1/2/3.md`). - A **build-time virtual-content Vite plugin** applies the doctrine gate at build time: in a production build, non-`approved` topics are never written into the bundle — metadata and tier bodies alike. Pending doctrine is *excluded*, not merely hidden. - Three dummy topics (two approved, one `pending` with a sentinel) + a minimal `/library` listing prove it. `pnpm guard:content` (a CI step) asserts exclusion in the real `build/`; a preview build (`CONTENT_PREVIEW=1`) includes it. ### Local-first, sync-ready state (`src/lib/state`) - The single `$lib/state` boundary: profiles, prefs (localStorage), collections (IndexedDB), a versioned migration runner, timestamp change-tracking, export/import backup, and a `SyncAdapter` seam (default `NoopSyncAdapter`). Opt-in parent-gated sync (v1.1.0) attaches here with no feature change. - Tested with in-memory fakes + `fake-indexeddb`. ### Vendored calendar (`src/lib/calendar`, `scripts/calendar`) - 2026 `calendar.json` projected from introibo Core's public `contract()` (CC0 corpus), generated **out-of-band** (PHP via WSL) — CI needs no PHP, just reads the committed file. - Zod-validated with **golden spot-checks**: St John Bosco (Jan 31, white), Christmas (white), the movable Easter (2026-04-05, eastertide), Advent violet ferias. ### Offline + docs - Reusable static server + **Node offline smoke** (`pnpm guard:offline`, a CI step) + a Playwright e2e harness (local/pre-release). - Architecture docs: offline invariant, state & sync, static-output (Docker-ready) contract. Verified locally: `pnpm check` (0/0), `lint`, `build`, `guard:external`, `guard:content`, `guard:offline`, and 31 unit tests all green. Release-As: 0.1.0
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Bosco/bosco!62
No description provided.