Spec, research decisions, implementation plan, data model, API contract, and task breakdown for the RSVP feature. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.1 KiB
3.1 KiB
Quickstart: RSVP to an Event (008)
What this feature adds
-
Backend: New
POST /api/events/{eventToken}/rsvpsendpoint that accepts an RSVP (guest name) and returns anrsvpToken. Populates the existingattendeeCountfield inGET /events/{token}with real data. -
Frontend: Bottom sheet RSVP form on the event detail page. Sticky bottom bar with CTA (or status after RSVP). localStorage persistence of RSVP data.
Implementation order
- Token value objects — Create
EventToken,OrganizerToken,RsvpTokenrecords. RefactorEventdomain model and all layers (service, controller, repository, persistence adapter, tests) to use typed tokens instead of raw UUID. - OpenAPI spec — Add
CreateRsvpRequest,CreateRsvpResponse, and thePOST /events/{eventToken}/rsvpsendpoint. - Liquibase migration — Create
rsvpstable (003-create-rsvps-table.xml). - Domain model —
Rsvpentity usingRsvpToken. - Ports —
CreateRsvpUseCase(in),RsvpRepository(out). - Persistence adapter —
RsvpJpaEntity,RsvpJpaRepository,RsvpPersistenceAdapter. - Service —
RsvpServiceimplementingCreateRsvpUseCase. - Controller — Add
createRsvp()toEventController. - Attendee count — Wire
RsvpRepository.countByEventId()into the GET event flow. - Frontend composable — Extend
useEventStoragewithrsvpToken/rsvpName. - Frontend UI — Bottom sheet component, sticky bar, RSVP form.
- E2E tests — RSVP submission, expired event guard, localStorage verification.
Key files to touch
Backend (new)
domain/model/EventToken.javadomain/model/OrganizerToken.javadomain/model/Rsvp.javadomain/model/RsvpToken.javadomain/port/in/CreateRsvpUseCase.javadomain/port/out/RsvpRepository.javaapplication/service/RsvpService.javaadapter/out/persistence/RsvpJpaEntity.javaadapter/out/persistence/RsvpJpaRepository.javaadapter/out/persistence/RsvpPersistenceAdapter.javadb/changelog/003-create-rsvps-table.xml
Backend (modified)
domain/model/Event.java— UUID → EventToken/OrganizerTokenapplication/service/EventService.java— use typed tokensadapter/in/web/EventController.java— typed tokens + wire attendee count + createRsvp()adapter/in/web/GlobalExceptionHandler.java— handleEventExpiredException(409)adapter/out/persistence/EventPersistenceAdapter.java— map typed tokensdomain/port/out/EventRepository.java— typed token in signatureopenapi/api.yaml— new endpoint + schemasdb/changelog/db.changelog-master.xml— include new migration- All existing tests — update to use typed tokens
Frontend (new)
src/components/BottomSheet.vue— reusable bottom sheetsrc/components/RsvpBar.vue— sticky bottom bar (CTA or status)e2e/event-rsvp.spec.ts— E2E tests
Frontend (modified)
src/views/EventDetailView.vue— integrate RSVP bar + bottom sheetsrc/composables/useEventStorage.ts— add rsvpToken/rsvpName fieldssrc/api/schema.d.ts— regenerated from OpenAPI