Files
wedding-website/plans/milestone-03-admin-invitations.md
Raul Lugo 4ced446c9c
Build & Deployment / Build & Deploy (push) Failing after 5s
initial commit
2026-08-10 17:55:26 +02:00

2.5 KiB

Milestone 03 — Admin Invitation Management

Reference

Read plans/wedding-bootstrap-plan.md first. This milestone depends on Milestone 01 and Milestone 02 being complete.

Goal

Allow admins to create, list, and view invitations and invitation members from the protected admin portal.

Scope

Implement only:

  • Invitation query modules.
  • Invitation member query modules.
  • Admin invitation list page.
  • Admin create invitation page.
  • Admin invitation detail page.
  • Required shadcn/ui admin components.
  • Copy invite link affordance.
  • Language selection per invitation.

Non-goals

Do not implement:

  • Guest RSVP submission.
  • Guest-facing localized page.
  • MinIO uploads.
  • Song/toast/message guest forms.
  • CSV export unless trivial and explicitly requested later.
  • Final design polish.

Required constraints

  • Admin UI must use shadcn/ui components only.
  • The admin create/edit form must require language.
  • Use the invitation/member model from the main plan.
  • Generate unguessable invitation tokens.
  • Use Kysely query modules; do not add an ORM.
  • Keep routes protected by admin auth.

Implementation tasks

  • Add query helpers for:
    • create invitation with members
    • list invitations with derived counts/status
    • get invitation detail by id
    • update invitation metadata if included
    • add/update/remove members if included
  • Add validation schema for invitation creation.
  • Add supported language config if not already present.
  • Add /admin/guests page.
  • Add /admin/guests/new page.
  • Add /admin/guests/[id] page.
  • Use shadcn components for:
    • table
    • form
    • input
    • select
    • checkbox
    • button
    • card
    • badge
    • dropdown/action menu if needed
    • alert/toast if needed

Admin fields

Create invitation form must include:

  • display name
  • language
  • contact email
  • contact phone
  • max party size
  • allow member edits
  • notes
  • initial members

Verification

Run:

npm run lint
npm run build

Manual checks:

  • Admin can create an invitation with multiple members.
  • Language is required and saved.
  • Invitation token is generated.
  • Invite link can be copied or displayed.
  • Invitation appears in list.
  • Invitation detail page displays members and metadata.
  • Non-admin cannot access these pages.
  • Admin pages use shadcn/ui only.

Acceptance criteria

  • Admin can manage the initial invitation/member data needed for guest RSVP.
  • Invitation language exists in the UI and database.
  • The implementation does not include guest RSVP or uploads yet.