2 Commits

Author SHA1 Message Date
Matt
1bf06a2a68 Add comprehensive server-side logging to QR code generation API
Some checks failed
Build and Push Docker Images / docker (push) Has been cancelled
2025-11-03 21:15:03 +01:00
Matt
09eb2d3781 Add comprehensive QR code system for carbon calculator
Some checks failed
Build and Push Docker Images / docker (push) Failing after 2m11s
Implements complete QR code generation and decoding system for pre-filling calculator data:

- Add qrcode npm dependency (v1.5.4) and zod validation (v3.24.1)
- Create QR generation API endpoint at /api/qr-code/generate
- Implement Base64 URL-safe encoding/decoding utilities
- Add Zod validation schemas for all calculator types (fuel, distance, custom)
- Create QRCalculatorLoader wrapper component with loading/error states
- Add useQRDecoder custom hooks for automatic URL parameter processing
- Modify TripCalculator to accept initialData prop for pre-filling
- Integrate QRCalculatorLoader into main App routing
- Create test page at /qr-test for API testing and QR code visualization
- Support all three calculator types with proper validation
- Include vessel information (name, IMO) in QR data
- Add 30-day expiration for generated QR codes
- Provide PNG and SVG download options in test interface

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

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