- Add detailed OAuth setup instructions for Google and Facebook in README
- Include step-by-step guides with console URLs and configuration details
- Document required environment variables for OAuth
- Add deployment instructions with Docker build args
- Update Dockerfile to accept OAuth credentials as build arguments
- Support NEXT_PUBLIC_GOOGLE_CLIENT_ID and NEXT_PUBLIC_FACEBOOK_APP_ID
This enables OAuth authentication while keeping it optional for deployments.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Make GoogleOAuthProvider conditional in layout.tsx (only render if clientId exists)
- Add hasGoogleAuth and hasFacebookAuth flags in login page
- Conditionally render OAuth buttons and section only when configured
- Add fallback message when OAuth is not configured
- Prevents "Missing required parameter client_id" error when NEXT_PUBLIC_GOOGLE_CLIENT_ID is not set
This allows the app to run without OAuth credentials configured, making deployment easier when OAuth is not yet set up.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add padding (p-8) and responsive px-4 to login page Card for better layout
- Create forgot-password page to fix 404 error when clicking "Mot de passe oublié?"
- Implement basic password reset form with email validation
- Add success state showing confirmation message after email submission
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Rename handleGoogleLoginSuccess to handleGoogleLogin and update the onClick handler to use the correct function name. This fixes the client-side exception on the login page.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fix missing indentation that was causing a 500 error on the homepage. The grid div wrapper was incorrectly indented.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace Next.js default template page with a complete landing page featuring:
- Hero section with main CTA buttons
- "How to Play" section explaining the 3-step participation process
- Updated prizes showcase section
- Enhanced final CTA section with dual action buttons
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add useEffect hook to check for auth token in localStorage only on client-side, preventing "localStorage is not defined" error during static page generation. Use state variable hasToken to display token presence in the UI.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace HeadersInit type with Record<string, string> for headers object to allow index access with bracket notation. This resolves the TypeScript error "Property 'Authorization' does not exist on type 'HeadersInit'".
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Export AuthContext from AuthContext.tsx to make it available for import in hooks/useAuth.ts. This resolves the TypeScript error "Module declares 'AuthContext' locally, but it is not exported."
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add null coalescing operators to handle cases where prize.initialStock is undefined when calculating stock remaining and className condition. Default to 0 if initialStock is undefined.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove 'as const' assertion from NAV_ITEMS and add explicit type annotation with Array<'CLIENT' | 'EMPLOYEE' | 'ADMIN'> for roles property. This allows TypeScript to properly type-check the includes() method in Navbar component without requiring type assertions.
Also revert the 'as any' workaround in Navbar.tsx since the proper typing is now in place.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add 'as any' type assertion to user.role in NAV_ITEMS filter to resolve TypeScript compilation error. The 'as const' assertion on NAV_ITEMS makes the roles arrays readonly with literal types, which TypeScript cannot match with the User role type without the assertion.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove all lowercase role values ('client', 'employee', 'admin') from NAV_ITEMS array in utils/constants.ts to match the User type definition which only uses uppercase roles ('CLIENT', 'EMPLOYEE', 'ADMIN'). This fixes TypeScript compilation error in Navbar.tsx where item.roles.includes(user.role) was failing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Change role case values from lowercase to uppercase to match User type:
- 'admin' → 'ADMIN'
- 'employee' → 'EMPLOYEE'
The User type only defines uppercase role values.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The Button component only accepts: 'primary' | 'secondary' | 'outline' |
'danger' | 'success'. Changed 'default' to 'primary' as the closest equivalent.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Change role comparisons from lowercase to uppercase to match User type:
- "client" → "CLIENT"
- "employee" → "EMPLOYEE"
- "admin" → "ADMIN"
The User type only defines uppercase role values.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add null check for user.updatedAt before passing to formatDate function.
The User type defines updatedAt as optional (string | undefined), so we
need to handle the undefined case to prevent TypeScript compilation errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Change user.isEmailVerified to user.isVerified to match the User type
definition. The User type has isVerified property, not isEmailVerified.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add type assertion to handle prize types that may not exist in PRIZE_CONFIG.
This is the same fix applied to app/client/page.tsx to prevent TypeScript
compilation errors when accessing PRIZE_CONFIG with dynamic prize types
(PHYSICAL, DISCOUNT, GRAND_PRIZE).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fix property access to match the Ticket type definition:
- ticket.user_name → ticket.user?.firstName + lastName
- ticket.user_email → ticket.user?.email
- ticket.prize_name → ticket.prize?.name
- ticket.played_at → ticket.playedAt
The Ticket type uses camelCase and nested objects (user, prize),
not snake_case flat properties.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add Record<string, React.ReactElement> type to badges object to allow
dynamic string indexing in app/employe/verification/page.tsx.
This matches the fix already applied to page-new.tsx and resolves the
TypeScript compilation error.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add Record<string, React.ReactElement> type to badges object to allow
dynamic string indexing. This fixes TypeScript error where status string
parameter cannot be used to index the badges object.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Change validateTicket action parameters from lowercase "validate"/"reject"
to uppercase "APPROVE"/"REJECT" to match the function signature.
The employeeService.validateTicket function expects action type of
'APPROVE' | 'REJECT', not 'validate' | 'reject'.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove invalid comparisons against lowercase 'employee' role that don't exist
in the User type. The role type only includes uppercase 'EMPLOYEE'.
Fixed in:
- app/employe/dashboard/page.tsx (lines 42, 117)
- app/employe/layout.tsx (lines 28, 48)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add type assertion to handle prize types that may not exist in PRIZE_CONFIG
(PHYSICAL, DISCOUNT, GRAND_PRIZE). This prevents TypeScript compilation errors
when accessing the PRIZE_CONFIG object with dynamic prize types.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove lowercase 'admin' role checks that don't exist in the User type.
The role type is 'CLIENT' | 'EMPLOYEE' | 'ADMIN', so comparing against
lowercase 'admin' causes TypeScript compilation errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>