Skip to content

Resume SIB v1 — Phase 1 done, pick up at U4 (Directus Cloud provisioning) #9

@dvhthomas

Description

@dvhthomas

Where you are

Phase 1 of the SIB v1 migration is done and shipped to worktree-atomic-weaving-treehouse on origin. The plan, brainstorm, and ideation docs are all aligned with the post-doc-review architectural decisions.

Unit Status Commit
U1: Pre-push git hooks (verify + Vitest + conditional Playwright) ✅ Done 6f4da5c
U2: Zod schemas at the data boundary ✅ Done 6c1cb2f
U3: DataSource interface + adapter wrap ✅ Done 71c7007
U4–U10 🟡 Pending

Tests: 185 Vitest + 322 Playwright across 3 browser projects, all green. CSS / components / layouts: zero diff (R24 preservation honored).

Goals (from the plan)

  1. Editors can independently maintain the site — either editor adds a new Location, edits one, reverts a bad save via Directus revisions, end-to-end without engineer help in a single session.
  2. The site survives schema-shape errors AND empty-data accidents — Zod validates at build; the minimum-records gate (U6) prevents silent empty-build replacing the prior good deploy.
  3. The site survives vendor outages — Directus Cloud handles primary backups; the quarterly off-vendor age-encrypted export to R2 is the cross-vendor disaster-recovery floor.
  4. The published site is unchanged in shape — same per-location URLs, same CSS, same map behaviors per docs/expectations.md. No regressions in npm run verify.
  5. Total monthly cost stays under ~$40 — ~$30 Directus Cloud + R2 + existing MapTiler. Well within $100/mo budget.

Resume tomorrow with these steps

1. Get back to the work

The worktree at .claude/worktrees/atomic-weaving-treehouse can be safely deleted — everything is on origin. Resume from anywhere:

# In the main repo:
git fetch origin
git checkout worktree-atomic-weaving-treehouse

# Or: spin up a fresh worktree pointed at the same branch
git worktree add ../sib-v1 worktree-atomic-weaving-treehouse
cd ../sib-v1
npm install   # wires up the pre-push hook via the prepare script

2. Do these external steps before invoking ce-work for U4

U4 is Directus Cloud provisioning. ce-work can't do this for you — it requires actions in browsers and cloud consoles.

  • Sign up for Directus Cloud at https://directus.cloud (free trial → General tier, ~$30/mo for 2 editor seats + 1 admin)
  • Verify SIB qualifies for the MSCL Innovation Grant (under $5M revenue AND under 50 employees — both must hold; this is the 2026 license-tier gate). Document the attestation in docs/operations/license-attestation.md when you create it.
  • Determine MapTiler commercial classification. Free tier is non-commercial only. If SIB is commercial (taking bookings, monetized, for-profit operator), budget MapTiler Flex (~$25/mo). If non-commercial, free tier holds.
  • Decide on the admin subdomain. Something like admin.changeplease-6hw.pages.dev (CNAME to the Directus Cloud project) or a custom domain you own. The public site stays on its current URL; only the admin needs a separate host.

3. Resume ce-work for U4

/ce-work docs/plans/2026-04-30-001-feat-sib-production-ready-v1-plan.md

ce-work will pick up where Phase 1 left off and begin U4 (Directus Cloud provisioning + schema + roles + MFA). Subsequent units in order: U5 (Cloudflare Workers logic tier), U6 (DirectusSource adapter + per-PR staging-build CI), U7 (build-status indicator + revisions + editor cookbook), U8 (pre-launch gates), U9 (cutover), U10 (Astro 5→6 upgrade post-cutover).

Documents (current source of truth)

Architectural reminders (so you don't have to re-read everything)

Decisions locked during ce-doc-review on the plan:

  • Directus Cloud General tier, not self-hosted on Fly. Cloud handles uptime + primary backups + Postgres entirely.
  • Cloudflare Workers logic tier: geocoding and deploy-hook debouncing live in TypeScript at workers/*.ts in this repo, version-controlled and unit-tested. Avoids the Apps-Script-reborn anti-pattern of logic-buried-in-CMS-admin-UI.
  • Pin-confirm via Directus's native Map field; geocoding uses MapTiler via the Worker.
  • Astro 5.18 stays through cutover; Astro 5→6 upgrade is U10, the LAST unit. Production migrates against the version currently working.
  • Manual entry of 3 real businesses at cutover (no migration script for 3 records). Sheet snapshot lands at data/migration-source-YYYY-MM-DD.csv for permanent off-Sheet record.
  • Per-PR CI build against a staging Directus Cloud project + minimum-records gate in DirectusSource — catches silent empty-build regressions.
  • Branch protection unavailable on this private-repo Free tier (verified via API: 403 Upgrade required). Compensated by the U1 conditional pre-push hook running Playwright when UI paths are touched.
  • age for off-vendor backup encryption (replaced GPG); two named-by-role keyholders.
  • Big-bang cutover with non-rollback acknowledged, mitigated by low-traffic window + 24h monitoring + forward-fix posture. Cutover ordering pinned: disable Apps Script triggers FIRST, then rename the deploy hook.

Related issues

Done definition for this issue

Close this issue when you've successfully invoked /ce-work and U4 is in progress. (Or close it earlier if priorities shift; the work itself is tracked in #7.)

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions