131 Commits

Author SHA1 Message Date
a886ab6c0c fix: Add missing rsvpStatus column and RSVP/profile fields migration
- Create migration to add rsvpStatus enum and all missing Guest columns
- Add RsvpStatus enum (PENDING, ACCEPTED, DECLINED)
- Add RSVP Core fields: rsvpStatus, houseRulesAcknowledged, houseRulesAcknowledgedAt, declineReason
- Add Party Details: attendingAlone, plusOnesCount
- Add Profile Phase 2 fields: profileCompleted, whosWhoOptIn, relationshipDetails, etc.
- Add Analytics fields: ipCountryCode, ipCity, ipData
- Improve error detection in guest creation to catch all Prisma schema drift errors
- Migration uses IF NOT EXISTS to be safe for production

Fixes production error: 'The column rsvpStatus does not exist in the current database'
2026-01-22 09:54:45 +02:00
4f28f9c70a fix: handle schema drift for rsvpStatus column in guest creation
- Add defensive create with try-catch to handle missing rsvpStatus column
- Use raw SQL fallback when Prisma create fails due to schema drift
- Generate guest ID using PostgreSQL gen_random_uuid() function
- Fetch created guest with defensive select to handle missing columns
- This fixes 'column rsvpStatus does not exist' error when adding guests
2026-01-22 09:21:56 +02:00
c4b863a1f0 fix: move requestId definition before try block for proper error logging
- Define requestId before try block to ensure it's available in catch block
- This prevents undefined requestId errors that could cause malformed JSON responses
- Ensures all error responses are properly logged with request ID
2026-01-22 00:21:44 +02:00
bb9381421a fix: safely handle non-JSON error responses in admin guest creation
- Update handleSendInvite to safely parse error responses
- Check content-type before attempting JSON parse
- Handle empty responses and non-JSON error messages gracefully
- This fixes 'JSON data line 1 error' when server returns non-JSON responses
2026-01-22 00:18:43 +02:00
8cbb995e3a fix: simplify email validation to use union type for better compatibility
- Use z.union to explicitly handle string email, empty string, null, and undefined
- Transform all falsy/empty values to null for consistent database storage
- This ensures validation works correctly in all scenarios (with email, without email, empty string)
2026-01-21 23:28:59 +02:00
90e5e867c2 fix: improve error logging in admin guests POST route
- Add requestId to error logs for better traceability
- Include error details in development mode for debugging
- This will help identify the root cause of 500 errors when adding guests
2026-01-21 23:24:35 +02:00
e727929b6c fix: correct email validation schema for optional guest email
- Fix GuestCreateSchema email validation to properly handle empty strings
- Use refine with transform to allow null/empty email while validating format when provided
- This fixes 500 error when adding guests without email addresses

The previous schema was failing validation on empty strings because .email()
validator was being applied before checking for empty values.
2026-01-21 23:24:23 +02:00
f323816cbe fix: resolve build errors and schema drift issues
- Fix import paths in admin-rsvp-on-behalf component (use-toast and csrf-client)
- Add defensive Prisma selects to prevent schema drift errors in production
- Update guest/auth route to use explicit selects instead of include
- Update guest/load route with defensive selects and fallbacks
- Add getCSRFToken helper function to admin-rsvp-on-behalf component

This fixes the 'column not available' Prisma errors and build-time module resolution errors.
2026-01-21 22:13:03 +02:00
54028bd355 feat: enhance guest data retrieval by implementing defensive selection to handle schema drift, ensuring robust fallback for missing fields in API responses 2026-01-21 21:55:11 +02:00
7fe3f5aa81 feat: improve guest invitation handling by refining email validation, enhancing error messaging, and adding RSVP on behalf functionality in the admin dashboard 2026-01-21 21:51:43 +02:00
ac4f0620a9 feat: enhance admin user management by integrating Supabase Auth for user creation, updates, and deletions, improving session handling, and refining CSRF protection across admin routes 2026-01-21 20:17:20 +02:00
4ea53320a7 feat: enhance CSRF protection and improve guest management by implementing token handling in various components, updating API routes for better error handling, and refining guest invite code processing 2026-01-21 18:42:12 +02:00
428ccffd28 feat: improve service worker and proxy configurations by adding support for Server-Sent Events, refining Content Security Policy for public routes, and enhancing guest display name handling in the dashboard 2026-01-21 09:13:00 +02:00
a451ab0205 feat: introduce new NotificationSettings model to Prisma schema, enhance user preferences management, and implement real-time notification updates 2026-01-21 08:02:15 +02:00
85fe751efb feat: add SecurityGateSecret and RateLimitSetting models to Prisma schema, enhance admin dashboard with tribute management and real-time check-in updates, and implement rate limit configuration features 2026-01-21 07:13:06 +02:00
e793b0aa97 feat: enhance RSVP functionality by implementing dynamic deadline handling, improving invite code normalization, and adding new animations for RSVP countdown and marquee effects 2026-01-21 05:42:31 +02:00
f85e2f7308 feat: enhance proxy and guest management features by adding dynamic Content Security Policy for Supabase and improving guest fetching logic with selective fields and check-in options 2026-01-21 04:08:53 +02:00
75076e82eb fix: enhance entrypoint script to handle Prisma migration failures with auto-resolution for specific errors 2026-01-21 03:16:36 +02:00
b0ab139ef6 chore: update Dockerfile to set npm log level to error and streamline dependency copying for Prisma 2026-01-21 02:36:44 +02:00
88f86167b4 chore: update Dockerfile to reduce npm output in CI builds and streamline dependency installation 2026-01-21 02:19:50 +02:00
34ae90e181 fix: update Dockerfile and entrypoint script to improve Prisma CLI handling and add necessary runtime libraries 2026-01-21 02:06:54 +02:00
084d7426ca feat: enhance Dockerfile and Prisma configuration for improved runtime support and migration handling 2026-01-21 01:50:31 +02:00
986f514ea3 feat: enhance RSVP and guest management features by adding check-in fields, improving test exclusions, and refining session handling logic 2026-01-20 02:09:54 +02:00
e8dc972972 refactor: migrate dashboard pages from (auth) to (dashboard) route group and update dashboard view logic. 2026-01-19 02:11:50 +02:00
3f364593da feat: introduce multi-step RSVP flow and initial dashboard pages with guestbook, profile, and "who's who" sections. 2026-01-19 00:49:34 +02:00
bdc3e7cc18 fix: Prioritize legacy guest session verification before attempting manual iron-session unseal and refine error logging. 2026-01-18 23:51:45 +02:00
86ffeb077f fix: Ensure comprehensive session cookie cleanup by introducing a dedicated deletion helper and correctly handling multi-part TLDs. 2026-01-18 23:31:34 +02:00
fecb5caeab fix: Improve session cookie cleanup by simplifying host-only deletion and enhancing root-domain cookie removal logic with multiple domain attempts. 2026-01-18 22:55:33 +02:00
216258bdbe fix: Centralize and enhance session cookie cleanup into a new utility to prevent authentication loops. 2026-01-18 19:32:20 +02:00
83c67d6e14 fix: Clear invalid session cookies on CSRF token or guest authentication failures. 2026-01-18 19:00:58 +02:00
26e9a1892e chore: Enhance logging for guest session verification and CSRF token handling with detailed cookie information and request IDs. 2026-01-18 18:42:39 +02:00
90c8e3089f fix: Improve iron-session cookie parsing and unsealing fallback, and enhance CSRF verification logging. 2026-01-18 18:28:13 +02:00
ee78be6801 fix: Correctly unseal chunked iron-session cookies and refine unseal error logging. 2026-01-18 18:03:24 +02:00
0946f8c8b6 refactor: Improve guest session retrieval by directly unsealing iron-session data and cleaning cookie values. 2026-01-18 17:41:32 +02:00
01223954c8 refactor: Centralize guest session verification in supabase-auth with a fallback to the legacy auth module. 2026-01-18 16:41:26 +02:00
43d5967aaa feat: Allow rate limiter to gracefully fallback to in-memory in production if Redis is unavailable. 2026-01-18 16:10:48 +02:00
78824044b8 refactor: update verifyAdminSession import path from lib/auth to lib/supabase-auth. 2026-01-18 15:09:58 +02:00
2df3ed1992 chore: simplify Prisma datasource configuration and specify client engine type. 2026-01-18 14:44:59 +02:00
66615c5309 feat: Configure Prisma with directUrl, reclassify env.ts default secret warnings, and enable database connection test output. 2026-01-18 14:12:41 +02:00
d15726b019 feat: Exclude WebSocket paths from proxying and enhance environment validation to categorize critical errors and non-critical warnings. 2026-01-18 13:57:58 +02:00
fd5b98ff03 feat: Implement a metrics store and integrate it with the metrics API and middleware for enhanced tracking. 2026-01-18 13:42:34 +02:00
f06531722b Refactor: Structure error logging for failed email attempts to include explicit details. 2026-01-18 12:55:38 +02:00
7828037c01 antigravity fix 2026-01-18 12:50:00 +02:00
04011f1ad5 Update src/app/api/admin/emails/route.ts 2026-01-18 11:44:39 +02:00
6f25083bf9 Update src/app/api/webhooks/resend/route.ts 2026-01-18 11:34:27 +02:00
809f01f770 Update src/app/api/admin/emails/[emailId]/status/route.ts 2026-01-18 11:33:50 +02:00
9ee7e5d84c Update src/app/api/admin/magic-link/send-email/route.ts 2026-01-18 11:33:07 +02:00
f8e90ad124 Update src/app/api/admin/guests/route.ts 2026-01-18 11:28:20 +02:00
1ec8222ba8 Update src/app/api/admin/guests/export/route.ts 2026-01-18 11:12:09 +02:00
82b186866c Update src/app/api/admin/guests/export/route.ts 2026-01-18 11:02:07 +02:00