Build Log
Hearth: Phase 4 — Invite Flow
June 22, 2026
Courtney can now join the household. Prod DB split, schema pushed, invite flow live at home.forgekits.build.
Timeline
What shipped
lib/db/schema.ts — invites table: token, householdId, role, profileId, expiresAt, status, acceptedByUserId
lib/access.ts — createInvite(): 32-byte hex token, 7-day expiry
lib/access.ts — getInvite(token): validates pending + not expired
lib/access.ts — consumeInvite(): creates householdMembers row, links profile, idempotent
app/(dashboard)/settings/actions.ts — generateInviteAction: auth bridge + createInvite + URL construction
app/(dashboard)/settings/page.tsx — real server component: auth, members list, InviteSection
components/settings/InviteSection.tsx — client: profile selector, generate button, copyable URL
app/invite/[token]/page.tsx — public accept page: invalid/expired state, sign-in redirect, join UI
app/invite/actions.ts — acceptInviteAction: Clerk displayName, consumeInvite, redirect /today
components/invite/AcceptInviteButton.tsx — client: pending state, error display
proxy.ts — /invite/(.*) added to public routes
“Courtney can join now. The household is real.”