feat(events): add event creation, attendee management, and public event APIs#139
Open
Harxhit wants to merge 4 commits into
Open
feat(events): add event creation, attendee management, and public event APIs#139Harxhit wants to merge 4 commits into
Harxhit wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implemented the complete Event Mode REST API described in product doc section 5.3. This PR introduces event management support with Prisma models, attendee relationships, authentication and authorization logic, Zod validation, typed API responses, and integration tests for the full event lifecycle.
Closes #30
Type of Change
What Changed
EventandEventAttendeePrisma models with relational mappings, attendee tracking, and migration files.src/prismato align with repository architecture and migration workflow./api/events/:slug/attendeesbecause the issue description did not explicitly specify whether the endpoint should be public or private. Based on expected production behavior, the route may be better suited as an public endpoint and can be enabled as private easily if maintainers prefer that behavior.How to Test
pnpm --filter @devcard/backend exec prisma migrate dev --config ./src/prisma/prisma.config.tspnpm --filter @devcard/backend testVerify endpoints:
409.Checklist
pnpm -r run lintpasses).pnpm -r run typecheck).pnpm -r run test).console.logor debug statements left in the code.Proofs
Test
Schema migration
Additional Context
This feature was implemented as a greenfield addition to the backend and required designing relational Prisma models, attendee membership handling, role-based authorization, paginated queries, and full integration test coverage for the event workflow.