-
Notifications
You must be signed in to change notification settings - Fork 2
feat(hackathons): Add registration management with API endpoints and dashboard page #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…dashboard page - Create GET endpoint to fetch hackathon registrations with search, filtering, and pagination support - Implement CSV export functionality for hackathon registrations with proper authorization checks - Add registrations dashboard page for hackathon management - Support filtering by registration status and payment status - Include search capability across registration fields (name, email, phone, institution) - Implement proper authorization checks to ensure only company members can access registrations - Use service role client for master_registrations table to bypass RLS policies - Add pagination support with limit and offset parameters - Generate timestamped CSV exports with all registration details
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughThis PR adds comprehensive hackathon registration management across three new files: a GET/PATCH API endpoint for retrieving and updating registrations with filtering, pagination, and user enrichment; a CSV export endpoint; and a dashboard UI page for viewing, filtering, and managing registrations with real-time status updates. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Dashboard
participant API GET
participant DB
participant Supabase Auth
User->>Dashboard: Load registrations page
Dashboard->>API GET: GET /api/hackathons/[id]/registrations?search=X&status=Y
API GET->>Supabase Auth: Verify session
alt Not authenticated
API GET-->>Dashboard: 401 Unauthorized
else
API GET->>DB: Query hackathon by slug
alt Hackathon not found
API GET-->>Dashboard: 404 Not Found
else
API GET->>DB: Verify user company membership
alt Not authorized
API GET-->>Dashboard: 403 Forbidden
else
API GET->>DB: Fetch master_registrations with filters & pagination
API GET->>DB: Fetch user profiles for enrichment
API GET->>API GET: Enrich registrations with profile data
API GET-->>Dashboard: {registrations[], total, hackathon}
Dashboard->>Dashboard: Render table with filters & stats
end
end
end
sequenceDiagram
participant User
participant Dashboard
participant API PATCH
participant API Export
participant DB
participant Stream
User->>Dashboard: Click update status dropdown
Dashboard->>API PATCH: PATCH /api/hackathons/[id]/registrations {registration_id, status}
API PATCH->>DB: Update master_registrations record
alt Success
API PATCH-->>Dashboard: {updated registration}
Dashboard->>Dashboard: Refresh registrations list
else Error
API PATCH-->>Dashboard: 400/500 Error
end
User->>Dashboard: Click "Export to CSV"
Dashboard->>API Export: GET /api/hackathons/[id]/registrations/export
API Export->>DB: Fetch all registrations for hackathon
API Export->>API Export: Build CSV with headers & rows
API Export-->>Stream: Stream CSV file (text/csv)
Stream-->>User: Download hackathon-slug-YYYY-MM-DD.csv
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Authored by: @akshay0611
Summary by CodeRabbit