Commit Graph

20 Commits

Author SHA1 Message Date
b75f209c35 feat: add reCAPTCHA verification, email check, fix email service
- Add reCAPTCHA verification on registration
- Add POST /api/auth/check-email endpoint
- Fix email service lazy loading
- Add FRONTEND_URL and RECAPTCHA keys to env

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 16:37:16 +01:00
2eddd7aa1a feat: add email check endpoint and fix email service
- Add POST /api/auth/check-email endpoint for email validation
- Check if email exists in database
- Validate email domain with MX DNS records
- Fix email service transporter lazy loading
- Add detailed logging for email sending
- Add FRONTEND_URL to .env for email links

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 16:16:09 +01:00
324cd6603c feat: add welcome email for Google/Facebook OAuth registrations
- Send welcome email when users register via Google OAuth
- Send welcome email when users register via Facebook OAuth
- Only send email for new user registrations, not existing users

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 16:12:24 +01:00
7f4d4c35be feat: add email notifications for registration, account deletion, and draw winner
- Add welcome email sent on user registration
- Add account deletion confirmation email
- Add draw winner notification email with celebratory design
- Remove email verification requirement on registration
- All emails have HTML templates with responsive design

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 15:26:44 +01:00
c31480886c fix: include inactive users in draw eligible participants
Users who deleted their account (is_active=false) should still be
eligible for the grand prize draw if they have validated tickets.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 15:06:44 +01:00
9d836eeaac feat: add user archiving (soft delete) with is_active field
- Add is_active column migration for users table
- Update user.controller.js to support isActive in profile updates
- Update admin.controller.js to support isActive filtering and updates
- Add migration script for is_active column

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 14:26:20 +01:00
74a7f387c5 fix: resolve test failures in CI pipeline
- Add jest.setup.js with JWT_SECRET for test environment
- Update jest.config.js with setupFiles and increased timeout
- Fix auth middleware to return 401 (not 403) for invalid JWT tokens
- Fix errorHandler to return 'message' instead of 'error' in response
- Fix validate middleware to properly detect Zod errors in ESM
- Remove unused 'pool' import in middleware tests (lint fix)
- Update middleware tests to check next() calls with AppError

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 12:05:00 +01:00
33668e5a64 fix: resolve all ESLint warnings and update dependencies
- Remove unused variables and imports across codebase
- Use empty catch blocks where error object not needed
- Remove unused fs, path imports from apply-grand-prize-migration.js
- Remove unused OAuth2Client from oauth.controller.js
- Update dependencies to latest patch versions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 10:49:45 +01:00
a850e5dd28 feat: add HTTP metrics middleware for Prometheus monitoring
- Add custom metrics: http_requests_total, http_request_duration_seconds,
  http_errors_total, http_requests_in_progress, http_response_size_bytes
- Track method, route, and status_code labels
- Normalize routes to avoid high cardinality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:54:45 +01:00
5c8d6b9262 feat: harmonize newsletter email colors with orange theme
- Change header background from gold to vibrant orange (#f59e0b → #ea580c)
- Update welcome section to match header colors
- Change footer from dark gray to orange gradient for consistency
- Add logo icon in white circle for professional appearance
- Update game section border to orange
- Change benefit items background to orange tones (#fef3c7 → #fed7aa)
- All sections now use consistent orange/red color palette

Design improvements:
- Cohesive color scheme throughout the email
- Logo icon in white circular background with shadow
- Modern and energetic orange theme matching buttons
- Better visual hierarchy and brand consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 16:29:36 +01:00
93cd8d38ff feat: improve newsletter email design and buttons
- Change game button to redirect to /jeux instead of /register
- Improve button colors: orange/red for primary, gold for secondary
- Add hover effects with shadows and transform animations
- Remove unsubscribe section from footer
- Clean up email subject: remove emoji, keep professional format
- Increase button font size and add letter spacing for better readability

Button improvements:
- Primary button (Jouer Maintenant): vibrant orange gradient (#f59e0b → #ea580c)
- Secondary button (Visiter le Site): gold gradient matching brand colors
- Enhanced shadows and hover effects for better interactivity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 15:57:42 +01:00
0850614264 feat: redesign newsletter email with modern template
- Redesign email template with brand colors and modern layout
- Add animated welcome icon and professional styling
- Improve button design with gradient colors matching the site
- Add TLS configuration to fix SSL certificate errors
- Fix email validation regex to be more permissive
- Update email subject to include logo emoji

Design improvements:
- Logo in header with brand colors (#d4a574, #c4956a, #5a5a4e)
- Beautiful rounded buttons for "Jouer Maintenant" and "Visiter le Site"
- Responsive design with proper spacing and shadows
- Benefits section with visual icons
- Professional footer with unsubscribe link

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 14:49:40 +01:00
772202dc6e fix: configure Gmail App Password and SSL for contact form emails
- Update SMTP_PASS with Gmail App Password in all environment files
- Add TLS configuration to ignore self-signed certificate errors
- Fix email sending functionality for contact form

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 14:07:12 +01:00
6d7c536a7e feat: add contact form email functionality
- Add SMTP configuration in all .env files
- Create sendContactEmail function in email service
- Add contact controller with form validation
- Create contact API route (POST /api/contact)
- Register contact route in main index.js
- Emails sent to thetiptopgr3@gmail.com

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:38:08 +01:00
4759ce99e7 feat: add newsletter subscription feature
- Add newsletter database table migration
- Create newsletter controller with subscribe/unsubscribe endpoints
- Add newsletter routes and validation
- Implement newsletter service with email validation
- Add setup documentation and migration scripts
- Include test page for newsletter functionality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 00:07:44 +01:00
3e08a647a5 feat: add updatedAt field to user profile endpoints
- Add updated_at to SELECT query in getProfile
- Add updatedAt to response in getProfile
- Auto-update updated_at timestamp in updateProfile
- Add updated_at to RETURNING clause in updateProfile
- Include isVerified, createdAt, updatedAt in updateProfile response

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:53:31 +01:00
86ccc3ef4f feat: add getUserById endpoint for admin user details
Added GET /api/admin/users/:id endpoint to retrieve detailed user
information including contact info, personal data, and ticket statistics.
This enables the admin interface to display comprehensive user details
when clicking the "Détails" button.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 15:07:28 +01:00
e72923ec86 fix: transform pending tickets data to match frontend expectations
Updated the getPendingTickets endpoint to return nested objects for user
and prize data instead of flat SQL columns. Frontend expects structure like
ticket.user.firstName and ticket.prize.name, which now displays correctly
in the employee verification interface instead of showing N/A.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 14:30:44 +01:00
e3794e1ba8 fix: respect Docker environment variables over .env file
Changed dotenv.config({ override: true }) to { override: false }
This ensures environment variables from docker-compose.yml take precedence
over the embedded .env file, allowing proper DB configuration in containers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 22:00:39 +01:00
25c7a0b304 dev 2025-11-17 23:47:54 +01:00