Commit Graph

204 Commits

Author SHA1 Message Date
bee7c7f93c docs: add descriptive titles and comments to Jenkinsfile
- Add header documentation explaining all pipeline stages
- Add detailed comments for each stage explaining purpose and actions
- Add emoji icons to stage names for better visibility in Jenkins UI
- Add success/failure banners with configuration details

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 15:21:26 +01:00
b36d71abcd test: add generateId fallback tests for SSR environments
Cover all branches of generateId function:
- window.crypto (browser)
- globalThis.crypto (Node.js)
- timestamp fallback (no crypto)

helpers.ts coverage: 96.96% lines, 78.72% branches

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:37:07 +01:00
e488fa3299 test: add error handling tests for storage helpers
Cover localStorage error catch blocks to improve coverage.
helpers.ts coverage: 93.93% (lines)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:26:58 +01:00
e6769d507f fix: improve test coverage and SonarQube configuration
- Add getToken tests and improve token helper coverage
- Exclude API routes and lib from coverage analysis (infrastructure code)
- Coverage on helpers.ts: 88.88%

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:18:30 +01:00
830b810c9d fix: exclude React components from SonarQube coverage analysis
React components/pages are tested with E2E tests, not unit tests.
Focus coverage requirements on utility code (utils, services, hooks).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:05:12 +01:00
a31999a037 test: add unit tests for utils/helpers.ts with 87% coverage
- Install Jest and testing dependencies
- Configure Jest with coverage reporting (lcov for SonarQube)
- Add comprehensive tests for all helper functions
- Update package.json test script to run with coverage

Test coverage:
- 42 tests passing
- 87.87% line coverage on helpers.ts
- 84.78% statement coverage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:50:13 +01:00
de643c17d0 fix: remove Math.random() completely from generateId
Use globalThis.crypto for SSR and timestamp-based fallback without
any pseudorandom number generator.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:01:51 +01:00
8bd2f95f25 fix: resolve SonarQube security vulnerabilities
- Fix ReDoS vulnerability in email regex with length limit and safer pattern
- Replace Math.random() with crypto.getRandomValues() for secure ID generation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 12:54:22 +01:00
ae03eb7eed fix: resolve SonarQube and Next.js warnings
- Add tsconfig.sonar.json with moduleResolution: "node" for SonarQube compatibility
- Update sonar-project.properties to use tsconfig.sonar.json
- Add metadataBase to metadata export for Open Graph images

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 12:46:07 +01:00
a09f274e50 ci: trigger pipeline verification
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 12:36:08 +01:00
3e36284146 feat: add Prometheus HTTP metrics for frontend
- Add metrics middleware for request tracking
- Add /api/metrics endpoint
- Add /api/track endpoint for async tracking

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 13:42:03 +01:00
d636578761 fix: use singleton pattern and force nodejs runtime for metrics route
- Add runtime = 'nodejs' to ensure Node.js environment
- Add dynamic = 'force-dynamic' to prevent static optimization
- Use singleton pattern to avoid duplicate metric registration
- Add error logging for debugging

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 16:24:33 +01:00
5f2f71e539 fix: use sonar-project.properties for SonarQube config 2025-11-25 15:49:24 +01:00
c4ba5bda9a perf: optimize pipeline with npm cache and parallel stages 2025-11-25 15:35:45 +01:00
1fdd0dccf3 fix: update SonarQube config - comment out missing tests folder 2025-11-25 15:23:17 +01:00
86d90c8f3e feat: add Prometheus metrics endpoint
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 15:17:56 +01:00
194470aeb1 fix: update SonarQube project key to match 2025-11-25 14:58:39 +01:00
e683be6771 feat: add SonarQube analysis stage to pipeline
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 14:19:10 +01:00
8a39e5a401 feat: add Google Analytics tracking
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 09:34:31 +01:00
765a944c11 feat: add user dropdown menu in admin and employee headers
- Add dropdown menu with user avatar, name, and email in admin header
- Add dropdown menu with user avatar, name, and email in employee header
- Create admin profile page at /admin/profil
- Create employee profile page at /employe/profil
- Remove Profil link from admin sidebar (now in dropdown)
- Fix header public display: hide for admin/employee on all pages
- Use router.replace() instead of router.push() for login redirects to avoid history pollution
- Simplify employe dashboard page: remove redundant auth checks handled by layout
- Add click-outside-to-close functionality for dropdown menus

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 01:24:21 +01:00
854724ed14 feat: add official social media links and update contact email
- Update Facebook link to official page (id: 61584261567579)
- Update Instagram link to @thetiptopgr3
- Update footer email to thetiptopgr3@gmail.com
- Keep existing Pinterest link

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 12:16:45 +01:00
4329dad720 fix: remove GamePeriod date props to match component signature
- Remove purchaseStartDate, purchaseEndDate, gameStartDate, gameEndDate props
- GamePeriod component no longer accepts date parameters
- Fixes TypeScript build error

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:55:59 +01:00
152563b5e5 feat: add contact form API integration and UI improvements
- Connect contact form to backend API endpoint
- Add email thetiptopgr3@gmail.com to contact and about pages
- Replace about page gradient with actual image
- Change Thé bio icon from emoji to Leaf component
- Remove dates from game period sections
- Add proper error handling for contact form

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:40:41 +01:00
048db0b2a6 feat: add prize and contest images
- Add infuseur.png (60% prize - tea infuser)
- Add the-detox.png (20% prize - detox tea)
- Add the-signature.png (10% prize - signature tea)
- Add coffret-39.png (6% prize - discovery box)
- Add coffret-69.jpg (4% prize - prestige box)
- Add grand-prix.png (grand prize - 1 year of tea)
- Add acceuil.png (about contest hero image)
- Add about-img.jpg (additional about image)
2025-11-24 01:44:40 +01:00
86628e0f60 feat: add NEWSLETTER endpoints to API_ENDPOINTS
- Add NEWSLETTER.SUBSCRIBE endpoint
- Add NEWSLETTER.UNSUBSCRIBE endpoint
- Add NEWSLETTER.SUBSCRIBERS endpoint
- Add NEWSLETTER.COUNT endpoint
2025-11-24 01:27:32 +01:00
988296ba39 feat: add newsletter service for subscription functionality
This service was missing from the repository, causing build failures.
2025-11-24 01:20:00 +01:00
44e2952fa1 fix: ensure Next.js build completes successfully in Dockerfile
- Remove build error tolerance that was hiding failures
- Add explicit check that .next directory exists after build
- Force build to fail if .next is not created

This ensures the Docker image always contains a valid Next.js build.
2025-11-24 01:13:38 +01:00
0605e6a1ae chore: trigger Jenkins rebuild 2025-11-24 00:44:27 +01:00
3d8d598792 feat: update prize displays and improve layout consistency
- Update prize titles to include prices (39€, 69€) on lots page
- Replace emoji icons with actual product images on homepage
- Add Grand Prize (1 an de thé) to homepage prize grid
- Standardize image padding and alignment across all prize cards
- Ensure all prize cards have equal heights for better visual alignment
- Update AboutContest component to use real image (acceuil.png)
- Add official Pinterest link to footer

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:56:19 +01:00
614116e2ee feat: apply new styling to contact page 2025-11-23 23:52:41 +01:00
51a3875993 feat: apply new content to rules-about page 2025-11-23 23:24:45 +01:00
7492f6bc7a Featured app legal in app/legal/page.tsk 2025-11-23 18:56:44 +01:00
0ade13d50d feat: apply golden/beige theme across all pages and fix header layout
Design Updates:
- Apply consistent golden/beige color scheme to all pages
- Update client dashboard, contact, FAQ, history, game, lots, profile, rules, terms, and privacy pages
- Replace green/orange colors with golden palette (#d4a574, #c4956a)
- Add golden gradient backgrounds and borders throughout

Header Improvements:
- Fix button layout to maintain proper form when page is zoomed
- Remove hover:scale-105 effects that caused deformation
- Add whitespace-nowrap to prevent text wrapping
- Add flex-shrink-0 to prevent element shrinking
- Add gap-4 to main header container for proper spacing
- Fix user info card with text ellipsis for long names/emails
- Improve spacing between "Participer" button and user card

Profile Page Updates:
- Remove "Dernière modification" field
- Update all colors to golden theme

API Endpoints:
- Fix user profile endpoint from /user/profile to /users/profile

Statistics Icons:
- Update dashboard statistics icons with distinct colors
- Total Participations: blue
- Gains réclamés: green
- En attente: yellow
- Rejetés: red

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 23:44:49 +01:00
aee6658cd7 fix: resolve React Hook dependency warnings in useEffect
Fixed all 5 ESLint warnings by wrapping functions with useCallback and adding proper dependencies:
- app/admin/tirages/page.tsx: checkExistingDraw, loadParticipants
- app/admin/utilisateurs/[id]/page.tsx: loadUserDetails
- app/historique/page.tsx: loadUserTickets, filterTickets
- app/mes-lots/page.tsx: loadTickets
- components/admin/UserManagement.tsx: loadUsers

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 01:48:26 +01:00
00776a1d74 chore: remove SonarQube stages from Jenkins pipeline
- Remove SonarQube Analysis stage
- Remove Quality Gate stage
- Keep configuration files for future use (sonar-project.properties, .sonarignore)

The SonarQube integration requires additional Jenkins plugin configuration.
Configuration files are preserved for when the plugin is properly set up.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 01:30:21 +01:00
7febb137e9 feat: add SonarQube integration, cookie consent, and authentication improvements
- Add SonarQube configuration for code quality analysis
  - sonar-project.properties with TypeScript/Next.js settings
  - .sonarignore to exclude build artifacts and dependencies
  - npm run sonar script
  - Jenkins pipeline stages for SonarQube analysis and quality gate

- Implement cookie consent banner
  - New CookieConsent component with matching site colors
  - localStorage persistence for user choice
  - Accept/Reject buttons with proper styling
  - Link to cookies policy page

- Add strict authentication protection for game page
  - Redirect unauthenticated users to login from /jeux
  - Clean up redundant auth checks and UI elements
  - Preserve redirect parameter for post-login navigation

- Implement smart navigation with auth-aware redirects
  - "Jouer maintenant" button redirects based on auth status
  - "Participer au jeu" footer link with conditional routing
  - Authenticated users go to /jeux, others to /register

- UI improvements and cleanup
  - Remove "Voir les lots" button from homepage
  - Remove "Gestion des cookies" from footer
  - Remove "À propos" from footer navigation
  - Consistent design across components

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 01:23:50 +01:00
c8fdd59553 feat: enhance login/register pages with animated backgrounds and unified design
- Add animated tea icon backgrounds to login and register pages (35 icons)
- Update color scheme from green to golden/beige theme matching header
- Change header navigation text from "Loto à gagner" to "Lots à gagner"
- Update form placeholders to lowercase French (prénom, nom, email, etc.)
- Standardize Facebook login button style to match Google button
- Update all focus rings and button colors to #d4a574 (golden) theme

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 21:35:57 +01:00
7e079dfede fix: restart icon animations from top on page refresh
Add animation restart mechanism using React key prop to ensure tea icons
always begin their falling animation from the top of the viewport when
the page is refreshed, providing a consistent user experience.

Changes:
- Add useState and useEffect to manage animation restart
- Set unique key based on timestamp on component mount
- Icons container remounts on each page load, resetting CSS animations
- All 35 tea icons now restart their descent from -100vh on refresh

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 20:11:08 +01:00
510eab7794 feat: enhance homepage with animated tea icons and improve branding
Add animated tea icons background with 35 falling icons, update styling to match theme, and streamline branding across header and footer.

Changes:
- Add 35 animated tea icons with falling animation (no rotation)
- Create fallDown animation with gentle horizontal oscillation
- Add new homepage components (CountdownTimer, GamePeriod, GrandPrize, AboutContest)
- Include tea icon images (teapot-green, tea-cup, gift-box, tea-leaves, teapot-pink)
- Remove "Thé Tip Top" text branding from header and footer (keep logo only)
- Add Pinterest social media icon to footer
- Update button color scheme to match golden/beige theme (#d4a574, #c4956a)
- Increase icon opacity to 50% for better visibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 16:46:57 +01:00
99b5db71ab fix: put copyright and student notice on same line in footer
Moved "Site étudiant" to the same line as the copyright text instead of
being on a separate line. Both are now displayed inline for a more compact
footer design.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:55:14 +01:00
9d1bb2cfe5 refactor: simplify footer by removing trust badges and adding student notice
Removed the trust/marketing badges (paiement sécurisé, livraison rapide,
certifié RGPD) from the footer and replaced them with a simple "Site étudiant"
notice centered below the copyright. This makes it clear the site is for
educational purposes.

Changes:
- Removed 🔒 Paiement sécurisé badge
- Removed 📦 Livraison rapide badge
- Removed ✓ Certifié RGPD badge
- Added "Site étudiant" notice centered in footer
- Simplified footer layout to center-aligned

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:45:13 +01:00
815af82eba feat: remove winners page and navigation link
Completely removed the /gagnants page and its navigation link from the
header menu. This simplifies the application structure by removing the
winners showcase functionality.

Changes:
- Deleted app/gagnants/page.tsx and entire directory
- Removed "Gagnants" link from Header navigation
- Build verified successfully without the page

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:30:36 +01:00
1d55571017 refactor: remove winners list table from winners page
Removed the detailed winners list table showing individual winners with
dates, names, prizes, and boutiques. The page now only displays:
- Summary statistics (total winners, active days, cities)
- Winner testimonials
- Call-to-action section

This simplifies the page while maintaining social proof through
testimonials and statistics.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:14:01 +01:00
a3e0227e41 fix: improve Facebook login error handling and add setup documentation
Enhanced error handling for Facebook Login to provide clearer messages when
the service is unavailable. Added comprehensive setup documentation for
configuring Facebook OAuth properly.

Changes:
- Improved error messages in Facebook SDK for unavailable service
- Updated login page to display specific error messages to users
- Added FACEBOOK_LOGIN_SETUP.md with step-by-step configuration guide
- Documented alternatives (email/Google login) while Facebook is being configured

This addresses the "Fonctionnalité indisponible" error users are seeing
when attempting to use Facebook Login.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 15:44:21 +01:00
22553e5c89 fix: add ticket statistics properties to User type
Added optional ticketsCount, pendingTickets, and claimedTickets properties
to User interface to fix TypeScript build error in user details page. These
properties are populated by the getUserById API endpoint.

Fixes: TypeScript compilation error preventing deployment

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 15:27:18 +01:00
3456657ae5 feat: add user details page and getUserById service method
Created comprehensive user details page at /admin/utilisateurs/[id] that
displays contact information, personal data, account status, and ticket
statistics. Added getUserById method to admin service to fetch detailed
user information from the backend API. Fixes the "Détails" button that
was previously navigating to a non-existent page.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 15:09:00 +01:00
9e55042d1f style: change 'Voir les lots' button to green on homepage
- Update button color from orange to green (#1a4d2e)
- Add hover effect to darker green (#2d5a3d)
- 'Participer maintenant' stays orange for CTA emphasis

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 03:28:57 +01:00
6be8c9f20d fix: remove price display from client dashboard
- Remove prize value display in client page tickets table
- Keep only prize name for consistency with history page

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 03:27:19 +01:00
d0ef196c0d style: apply modern design to remaining pages
- Update about, contact, FAQ, forgot-password, lots, register, rules pages
- Apply consistent styling with bg-gray-50 and modern cards
- Update footer and layout with new design
- Add gagnants (winners) page

All pages now have consistent modern design matching homepage and dashboard

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 03:18:43 +01:00
5d5375ff6b fix: force fresh builds to prevent cache issues between localhost and deployed site
- Add --no-cache flag to Docker build to force complete rebuild
- Clean .next and node_modules cache before each build
- Generate unique build ID with timestamp for each deployment
- Configure onDemandEntries to reduce cache duration

This ensures deployed site always matches localhost by preventing:
- Docker layer caching
- Next.js build cache
- Browser cache of stale assets

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 03:09:51 +01:00