Skip to content

Feature: Join / leave events

Summary

Users can attend or leave an event; attendee count reflected.

User story

As a user, I want to join or leave events so my plans are tracked.

Scope

  • Backend: POST /events/:id/attend, POST /events/:id/unattend, GET /me/attending.
  • Prevent duplicate attend; handle not attending on unattend.
  • Frontend: buttons on event page; “My attending” page.

Tasks

  • Endpoints + controller logic.
  • Tests (happy + edge cases).
  • Frontend buttons, attending view, optimistic UI.
  • Update documentation.

Acceptance criteria

  • Authenticated user can attend once; duplicate returns 400.
  • Unattend removes user; not attending returns 400 or no-op (decide & document).
  • “My attending” lists only events the user joined.

Test notes

  • 401 when unauthenticated; 404 when event not found.

Dependencies

  • Depends on: “Secure authentication via JWT”.
  • Relates to: “Create, update, delete, and list events”.