Commit graph

6 commits

Author SHA1 Message Date
378ee989bb feat(db): production seed script with the real pilot data
Adds scripts/seed-production.js (db:seed:production / db:setup:production):
the curated pilot data — 8 council members, 2 Fenja admins, 10 roadmap
items, the launch event, the pulse vote, and the welcome dispatch — so a
production DB can be built reproducibly from git instead of committing the
binary bifrost.db.

Idempotent (every insert guarded). No credentials in the repo: council
accounts get a random unusable hash; admin temp passwords are hashed at
run time from ADMIN_SEED_PASSWORD (placeholder printed if unset, change on
first login). Run on deploy as: pnpm db:setup:production.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:16:40 +02:00
fe27811d16 chore(demo): seed-demo.js + utc fix for last_seen_at
scripts/seed-demo.js — one open Pulse with realistic context, marks
"Traceability layer" as shipping with shipped_at -2 days and attributes
it to the cab user, two events (dinner in 5 weeks, office hours in 2
weeks), six hand-crafted activity rows mixing all 5 activity kinds so
the ticker has something to scroll on first load. Idempotent: skips if
any pulses exist. Backdates Lars's cab_joined_date so the greeting
renders "2 years, 4 months". Wired to db:setup and db:seed:demo.

Also fixes a parse bug on /pulse: SQL stores last_seen_at as
'YYYY-MM-DD HH:MM:SS' UTC, but new Date(string) parses that as local
time — on a non-UTC server the freshness check was wrong by the server's
offset. Coerce to UTC ISO before parsing. Manual smoke as Lars now shows
two member chips in "online now"; admin tabs all render.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 15:04:11 +02:00
fba369a36d chore(seed): one-time roadmap seed from content/roadmap.md
Parses the H2 sections (In progress / Next / Later) into roadmap_items rows.
Maps In-progress → beta (actively built, tested with pilots) and Next/Later
→ exploring with a target hint. Idempotent: skips entirely if the table is
already populated, so admin edits are never overwritten.

content/roadmap.md stays in the repo as the seed source. Once admin starts
editing via /admin, the DB is the source of truth.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 14:44:09 +02:00
Jonathan
0dc2dbd849 feat: database schema, migrations, and seed data 2026-04-18 22:43:16 +02:00
Jonathan
31070c69b2 feat: add /style-guide route for design review 2026-04-18 16:17:17 +02:00
Jonathan
a7131e0f79 wip: scaffold and index before style-guide 2026-04-18 16:09:49 +02:00