Spec, research, data model, API contract, implementation plan, and task breakdown for the public event detail page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Quickstart: View Event Landing Page (007)
What this feature does
Adds a public event detail page at /events/:token. Guests open a shared link and see:
- Event title, date/time (with IANA timezone), description, location
- Count of confirmed attendees (no names)
- "Event has ended" state for expired events
- "Event not found" for invalid tokens
- Skeleton shimmer while loading
Prerequisites
- US-1 (Create Event) is implemented — Event entity, JPA persistence, POST endpoint exist.
- No RSVP model yet — attendee count returns 0 until RSVP feature is built.
Key changes
Backend
- OpenAPI: Add
GET /events/{token}endpoint +GetEventResponseschema. Addtimezonefield toCreateEventRequest,CreateEventResponse, andGetEventResponse. - Domain: Add
timezone(String) toEvent.java. - Persistence: Add
timezonecolumn toEventJpaEntity, Liquibase migration. - Use case: New
GetEventUseCase(inbound port) + implementation inEventService. - Controller:
EventControllerimplementsgetEvent()— maps toGetEventResponse, computesexpiredandattendeeCount.
Frontend
- API types: Regenerate
schema.d.tsfrom updated OpenAPI spec. - EventDetailView.vue: New view component — fetches event by token, renders detail card.
- Router: Replace
EventStubViewimport at/events/:tokenwithEventDetailView. - States: Loading (skeleton shimmer), loaded, expired, not-found, server-error (retry button).
- Create form: Send
timezonefield (auto-detected viaIntl.DateTimeFormat).
Testing
- Backend: Unit tests for
GetEventUseCase, controller tests for GET endpoint (200, 404). - Frontend: Unit tests for EventDetailView (all states).
- E2E: Playwright tests with MSW mocks for all states (loaded, expired, not-found, error).