Skip to content

feat: add event service, dashboard activity, rsvp tracking, and date packages#110

Merged
kevinrutledge merged 2 commits intodevelopfrom
feat/event-service
Apr 5, 2026
Merged

feat: add event service, dashboard activity, rsvp tracking, and date packages#110
kevinrutledge merged 2 commits intodevelopfrom
feat/event-service

Conversation

@kevinrutledge
Copy link
Copy Markdown
Collaborator

Developer

Kevin Rutledge

What changed?

Added the event feature backend - service layer, server actions, Zod schemas, dashboard activity service, and three date packages.

  1. Event service (src/services/event.ts) - full CRUD for events plus calendar queries. createEvent, updateEvent, deleteEvent, getEventById (with RSVP count), getEventsByOwner, getAllEvents, getUpcomingEvents (dashboard), getEventsForMonth (calendar month view), getEventsForWeek (calendar week view), getEventsByGroup, isEventOwner (authorization), rsvpToEvent (upsert), getEventRsvps (with member names via member API), getEventRsvpCounts (going/maybe/declined counts). Uses a shared queryEventSummaries helper to avoid repeating the select/map pattern.

  2. Dashboard activity service (src/services/dashboard.ts) - getRecentActivity() queries recent messages from Message table and recent events from Event table, merges them sorted by timestamp. Covers "Message sent to X Members" and "Event Created: Title" activity types. "New Member Joined" is omitted because the member API has no join date field.

  3. Event server actions (src/actions/event.ts) - createEventAction, updateEventAction, deleteEventAction with owner/admin authorization. rsvpAction for member RSVPs. fetchEventDetail returns event + RSVPs with authorization. fetchDashboardData aggregates total members, upcoming events, recent activity, and recent messages for the dashboard page.

  4. Zod schemas (src/schema/event.ts) - CreateEventSchema with date coercion for string-to-Date conversion, eventType enum validation (social/networking/volunteer/meeting). UpdateEventSchema as partial. RsvpSchema with status enum (going/maybe/declined).

  5. Packages installed - date-fns for date manipulation and calendar range queries, date-fns-tz for Pacific timezone handling (TCPA compliance), react-day-picker for the frontend calendar component (Tailwind-native, shadcn/ui compatible, 2.5KB).

How to test

  1. Run npm test - 342 tests pass (39 new)
  2. Run npm run build - succeeds
  3. Run npm run lint - no errors

Checklist

@kevinrutledge kevinrutledge self-assigned this Apr 5, 2026
@kevinrutledge kevinrutledge requested a review from suesuee April 5, 2026 17:59
@kevinrutledge kevinrutledge merged commit f6e1dc7 into develop Apr 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants