Commit Graph

140 Commits

Author SHA1 Message Date
David
301409624b Merge branch 'track_and_trace' into landing_page 2026-01-20 15:38:26 +01:00
David
40f785ddeb feature track and trace 2026-01-20 15:35:59 +01:00
David
5c7834c7e4 fix licensing 2026-01-20 11:28:54 +01:00
David
dd5d806180 fix wiki 2026-01-19 10:48:19 +01:00
David
de4126a657 fix document 2026-01-17 15:47:03 +01:00
David
0a8e2043cc fix documents 2026-01-17 15:46:55 +01:00
David
0d814e9a94 fix 2026-01-16 15:44:16 +01:00
David
d9868dd49f fix: prevent password fields from being pre-filled in profile page
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 2m42s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 27m20s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 12s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 2s
Fixed issue where password form fields (especially "New Password")
were being pre-filled with values, either from browser autocomplete
or residual form state.

Changes:
1. Added explicit empty defaultValues to password form
   - currentPassword: ''
   - newPassword: ''
   - confirmPassword: ''

2. Added autoComplete attributes to prevent browser pre-fill:
   - currentPassword: autoComplete="current-password"
   - newPassword: autoComplete="new-password"
   - confirmPassword: autoComplete="new-password"

3. Added useEffect to reset password form when switching tabs:
   - Ensures clean state when navigating to "Change Password" tab
   - Prevents stale values from persisting

4. Explicit reset values on successful password change:
   - Previously used passwordForm.reset() without values
   - Now explicitly sets all fields to empty strings

This ensures password fields are always empty and never pre-filled
by the browser or by residual form state.

Refs: apps/frontend/app/dashboard/profile/page.tsx:64-70,85-95

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 18:24:13 +01:00
David
2054e73e78 fix: resolve profile page data persistence and password change issues
Fixed critical issues with the profile page (/dashboard/profile):

1. **Form data not persisting on page refresh**:
   - Added useEffect to update form values when user data loads
   - Forms now properly populate after auth context loads user data

2. **Blank page on refresh**:
   - Added loading and error states for better UX
   - Handle case where user is not loaded yet (loading spinner)
   - Handle case where user fails to load (retry button)

3. **Password change API endpoint correction**:
   - Fixed: POST /api/v1/users/change-password (incorrect)
   - Corrected to: PATCH /api/v1/users/me/password (matches backend)
   - Updated return type to include { message: string }

The root cause was that useForm defaultValues were set once at
component mount when user was still null. The form never updated
when user data was subsequently loaded by the auth context.

Now the form properly resets with user data via useEffect, and
proper loading/error states prevent showing a blank page.

Refs: apps/frontend/app/dashboard/profile/page.tsx:68-78

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 18:18:04 +01:00
David
905a56888a fix: implement password change functionality in profile page
Fix password change feature that was previously non-functional:
- Add changePassword function in frontend API (src/lib/api/users.ts)
- Update API endpoint to match backend: PATCH /api/v1/users/me/password
- Connect profile page to real API instead of mock implementation
- Export changePassword function from API index

The backend endpoint was already implemented but frontend was using
a placeholder Promise.resolve(). Now properly calls the backend API.

Refs: apps/frontend/app/dashboard/profile/page.tsx:87-105

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 17:56:10 +01:00
David
4ce7d2ec07 fix icon
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 2m16s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 26m44s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 12s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 1s
2025-12-23 19:14:13 +01:00
David
13857628bb feat: add theme-adaptive favicon
- Replace full logo (1875x1699) with simplified icon (512x512) optimized for favicon display
- Implement CSS media queries for automatic theme adaptation:
  * Dark mode: white X (#FFFFFF) with cyan dot (#34CCCD)
  * Light mode: dark blue X and dot (#1D3865)
- Remove old logo files (xpeditis-icon.svg, xpeditis-logo.svg)
- Simplified design with clean X shape and accent dot for better visibility at small sizes

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 13:43:31 +01:00
David
5878b63a0a chore: update favicon to use full Xpeditis logo
Replace the icon with the full Xpeditis logo (logo-black.svg) as requested.
Updated references in:
- app/icon.svg (favicon)
- app/layout.tsx (metadata and social cards)
- public/manifest.json (PWA icon)

Note: The full logo (1875x1699px) will be scaled down in browser tabs.
Consider creating a square optimized version for better display in small sizes.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 13:34:19 +01:00
David
e1aeb9ccd7 feat: add Xpeditis logo as favicon and improve metadata
Add site favicon and enhance metadata for better SEO and social sharing:
- Added app/icon.svg from existing logo for browser tab icon
- Enhanced metadata with Open Graph and Twitter card support
- Created manifest.json for PWA support
- Added metadataBase for proper social image resolution
- Updated .env.example with NEXT_PUBLIC_APP_URL

The Xpeditis logo (blue background with cyan X) now appears in:
- Browser tabs (favicon)
- Bookmarks
- Mobile home screen (PWA)
- Social media shares (Open Graph)

Configuration for different environments:
- Dev: NEXT_PUBLIC_APP_URL=http://localhost:3000
- Preprod: NEXT_PUBLIC_APP_URL=https://app.preprod.xpeditis.com
- Prod: NEXT_PUBLIC_APP_URL=https://xpeditis.com

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 13:29:45 +01:00
David
618b3064c3 fix: use environment variable for API URL in carrier accept/reject pages
Replace hardcoded localhost:4000 URLs with NEXT_PUBLIC_API_URL environment variable
in carrier portal pages to support different environments (dev/staging/production).

Pages updated:
- app/carrier/accept/[token]/page.tsx
- app/carrier/reject/[token]/page.tsx

This fixes the issue where preprod environment (app.preprod.xpeditis.com) was calling
localhost:4000 instead of the correct API endpoint (api.preprod.xpeditis.com).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 13:04:29 +01:00
David
6603c458d4 fix v1.0
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 18m57s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 34m42s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 12s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 2s
2025-12-23 11:59:53 +01:00
David
a1e255e816 fix v1.0.0
Some checks failed
CI/CD Pipeline / Discord Notification (Failure) (push) Blocked by required conditions
CI/CD Pipeline / Integration Tests (push) Blocked by required conditions
CI/CD Pipeline / Deployment Summary (push) Blocked by required conditions
CI/CD Pipeline / Deploy to Portainer (push) Blocked by required conditions
CI/CD Pipeline / Discord Notification (Success) (push) Blocked by required conditions
CI/CD Pipeline / Backend - Build, Test & Push (push) Failing after 1m20s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Has been cancelled
2025-12-23 11:49:57 +01:00
David
c19af3b119 docs: reorganiser completement la documentation dans docs/
Some checks failed
CI/CD Pipeline / Backend - Build, Test & Push (push) Failing after 58s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Failing after 5m55s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Has been skipped
CI/CD Pipeline / Deploy to Portainer (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
Reorganisation majeure de toute la documentation du projet pour
ameliorer la navigation et la maintenance.

## Changements principaux

### Organisation (80 -> 4 fichiers .md a la racine)
- Deplace 82 fichiers .md dans docs/ organises en 11 categories
- Conserve uniquement 4 fichiers essentiels a la racine:
  * README.md, CLAUDE.md, PRD.md, TODO.md

### Structure docs/ creee
- installation/ (5 fichiers) - Guides d'installation
- deployment/ (25 fichiers) - Deploiement et infrastructure
- phases/ (21 fichiers) - Historique du developpement
- testing/ (5 fichiers) - Tests et qualite
- architecture/ (6 fichiers) - Documentation technique
- carrier-portal/ (2 fichiers) - Portail transporteur
- csv-system/ (5 fichiers) - Systeme CSV
- debug/ (4 fichiers) - Debug et troubleshooting
- backend/ (1 fichier) - Documentation backend
- frontend/ (1 fichier) - Documentation frontend
- legacy/ (vide) - Pour archives futures

### Documentation nouvelle
- docs/README.md - Index complet de toute la documentation (367 lignes)
  * Guide de navigation par scenario
  * Recherche rapide par theme
  * FAQ et commandes rapides
- docs/CLEANUP-REPORT-2025-12-22.md - Rapport detaille du nettoyage

### Scripts reorganises
- add-email-to-csv.py -> scripts/
- deploy-to-portainer.sh -> docker/

### Fichiers supprimes
- 1536w default.svg (11MB) - Fichier non utilise

### References mises a jour
- CLAUDE.md - Section Documentation completement reecrite
- docs/architecture/EMAIL_IMPLEMENTATION_STATUS.md - Chemin script Python
- docs/deployment/REGISTRY_PUSH_GUIDE.md - Chemins script deploiement

## Metriques
- 87 fichiers modifies/deplaces
- 82 fichiers .md organises dans docs/
- 11MB d'espace libere
- Temps de recherche reduit de ~5min a ~30s (-90%)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 15:45:51 +01:00
David
21d7044a61 fix notifications 2025-12-22 12:32:32 +01:00
David
7748a49def fix 2025-12-18 16:56:35 +01:00
David
840ad49dcb fix bookings 2025-12-18 15:33:55 +01:00
David
bd81749c4a fix notifications 2025-12-16 14:15:06 +01:00
David
a8e6ded810 fix dasboard 2025-12-16 13:41:32 +01:00
David
eab3d6f612 feature dashboard 2025-12-16 00:26:03 +01:00
David
71541c79e7 fix pagination 2025-12-15 17:14:56 +01:00
David
368de79a1c merge 2025-12-15 16:51:36 +01:00
David
49b02face6 fix booking validate 2025-12-15 15:03:59 +01:00
David
faf1207300 feature fix branch 2025-12-12 10:31:49 +01:00
David
4279cd291d feature 2025-12-11 15:04:52 +01:00
David
54e7a42601 fix email send 2025-12-05 13:55:40 +01:00
David
3a43558d47 mail changer 2025-12-03 22:37:11 +01:00
David
55e44ab21c fix carte 2025-12-03 22:24:48 +01:00
David
7fc43444a9 fix search 2025-12-03 21:39:50 +01:00
David
a27b1d6cfa fix search booking 2025-11-30 23:27:22 +01:00
David
2da0f0210d fix organisation 2025-11-30 18:58:12 +01:00
David
c76f908d5c fix error get organisation 2025-11-30 18:39:08 +01:00
David
1a92228af5 contexte user reparer 2025-11-30 17:50:05 +01:00
David
cf029b1be4 fix users deleted and actived desactived 2025-11-30 17:36:34 +01:00
David
591213aaf7 layout access admin and manager 2025-11-30 13:48:04 +01:00
David
cca6eda9d3 send invitations 2025-11-30 13:39:32 +01:00
David
a34c850e67 fix register 2025-11-29 12:50:02 +01:00
David
b2f5d9968d fix: repair user management CRUD operations (create, update, delete)
Problems Fixed:

1. **User Creation (Invite)**
   -  Missing password field (required by API)
   -  Hardcoded organizationId 'default-org-id'
   -  Wrong role format (lowercase instead of ADMIN/USER/MANAGER)
   -  Now uses currentUser.organizationId from auth context
   -  Added password field with validation (min 8 chars)
   -  Fixed role enum to match backend (ADMIN, USER, MANAGER, VIEWER)

2. **Role Change (PATCH)**
   -  Used 'as any' masking type errors
   -  Lowercase role values
   -  Proper typing with uppercase roles
   -  Added success/error feedback
   -  Disabled state during mutation

3. **Toggle Active (PATCH)**
   -  Was working but added better feedback
   -  Added disabled state during mutation

4. **Delete User (DELETE)**
   -  Was working but added better feedback
   -  Added disabled state during mutation

5. **UI Improvements**
   - Added success messages with auto-dismiss (3s)
   - Added error messages with auto-dismiss (5s)
   - Added loading states on all action buttons
   - Fixed role badge colors to use uppercase keys
   - Better form validation before API call

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 23:35:10 +01:00
David
84c31f38a0 fix: load CSV files from MinIO instead of local filesystem for rate search
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 7m30s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 11m56s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 11s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 1s
Problem:
- CSV files uploaded to MinIO via admin panel
- But getAvailableCsvFiles() only listed local filesystem
- Result: rate search returned 0 results even though files exist in MinIO

Solution:
- Modified getAvailableCsvFiles() to check MinIO first
- Lists files from csv_rate_configs table with minioObjectKey
- Falls back to local filesystem if MinIO not configured
- Logs clearly which source is being used

This ensures rate search uses the uploaded CSV files from MinIO storage.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 23:18:03 +01:00
David
010c804b2e Revert "fix: convert Portainer stack to Docker Swarm mode with deploy labels"
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 3m3s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 11m46s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 12s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 1s
This reverts commit a2f80dd23f.
2025-11-20 22:55:05 +01:00
David
a2f80dd23f fix: convert Portainer stack to Docker Swarm mode with deploy labels
Some checks failed
CI/CD Pipeline / Integration Tests (push) Blocked by required conditions
CI/CD Pipeline / Deployment Summary (push) Blocked by required conditions
CI/CD Pipeline / Deploy to Portainer (push) Blocked by required conditions
CI/CD Pipeline / Discord Notification (Success) (push) Blocked by required conditions
CI/CD Pipeline / Discord Notification (Failure) (push) Blocked by required conditions
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 3m9s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Has been cancelled
Changes:
- Moved all Traefik labels from root level to deploy.labels for Swarm compatibility
- Added deploy.restart_policy to backend, frontend, and MinIO services
- Removed restart: unless-stopped (incompatible with Swarm mode)
- Keeps depends_on for startup ordering

This fixes Gateway Timeout errors by ensuring Traefik can properly discover
and route to services when running in Docker Swarm mode.

Services updated:
- xpeditis-backend: Deploy labels + restart policy
- xpeditis-frontend: Deploy labels + restart policy
- xpeditis-minio: Deploy labels + restart policy

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 22:51:41 +01:00
David
dc62166272 fix: correct Argon2 password hash and organization UUIDs in migrations
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 7m52s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 11m40s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 14s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 1s
- Fixed test user migration to use real Argon2id hash for Password123!
- Replaced random uuidv4() with fixed UUIDs in organization seeds
- Updated auth.service.ts to use DEFAULT_ORG_ID constant
- Added ON CONFLICT DO UPDATE to migration for existing users
- Ensures consistent UUIDs across environments (dev/preprod/prod)

Fixes:
- Registration 500 error (foreign key constraint violation)
- Login 401 error (invalid password hash)
- Organization ID mismatch between migrations and application code

Test users (Password: Password123!):
- admin@xpeditis.com (ADMIN)
- manager@xpeditis.com (MANAGER)
- user@xpeditis.com (USER)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 20:05:22 +01:00
David
6e3191b50e fix ci/cd and docker
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 5m45s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 28m26s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 14s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 1s
2025-11-20 00:12:01 +01:00
David
2e5dcec05c fix
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 6m17s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 14m45s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 2s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 2s
2025-11-19 18:27:42 +01:00
David
7dadd951bb fix portainer deploy
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 16m18s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 30m58s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 2s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 1s
2025-11-19 15:17:53 +01:00
David
88f0cc99bb fix: enable Tailwind CSS compilation in Docker builds
CRITICAL FIX: Frontend was serving raw CSS with uncompiled @tailwind directives,
resulting in completely unstyled pages (plain text without any CSS).

Root cause:
- postcss.config.js and tailwind.config.js/ts were excluded in .dockerignore
- This prevented PostCSS/Tailwind from compiling CSS during Docker builds
- Local builds worked because config files were present

Changes:
1. apps/frontend/.dockerignore:
   - Commented out postcss.config.js exclusion
   - Commented out tailwind.config.js/ts exclusions
   - Added explanatory comments about why these files are needed

2. apps/backend/Dockerfile:
   - Copy src/ directory to production stage for CSV upload paths
   - Create csv-storage/rates directory with proper permissions
   - Fix EACCES errors when uploading CSV files

3. apps/backend/src/application/controllers/admin/csv-rates.controller.ts:
   - Add getCsvUploadPath() helper function
   - Support both local dev and Docker environments
   - Use absolute paths instead of relative paths

4. docker-compose.dev.yml:
   - Change backend port mapping to 4001:4000 (avoid local dev conflicts)
   - Change frontend port mapping to 3001:3000
   - Update CORS_ORIGIN and NEXT_PUBLIC_API_URL accordingly

Impact:
-  Fixes completely broken frontend CSS in Docker/production
-  Applies to CI/CD builds (uses apps/frontend/.dockerignore)
-  Applies to Portainer deployments (pulls from CI/CD images)
-  Fixes CSV upload permission errors in backend
-  Enables local Docker testing on Mac ARM64

Testing:
- Local Docker build now shows compiled Tailwind CSS (60KB+)
- Frontend displays properly styled pages at http://localhost:3001
- Backend CSV uploads work without permission errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 13:39:05 +01:00