API endpoints now return 401 Unauthorized instead of redirecting to login page when session is invalid. JavaScript detects 401 and redirects the browser to login.
This fixes the 'Unexpected token DOCTYPE' error when session expires.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Images were returning 404 because URL path was missing the Automation_LR directory segment.
Fixed: /hm-ems-report/images/{year}/{campaign}/{img}
To: /hm-ems-report/images/{year}/{campaign}/Automation_LR/{img}
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changed application path from /hm-ems/ to /hm-ems-report/ to match production URL structure. Updated all references to use HTTPS and correct domain.
Changes:
- Path prefix: /hm-ems/ → /hm-ems-report/
- Production URL: https://ai-sandbox.oliver.solutions/hm-ems-report/
- Created apache/hm-ems-report.conf with full Apache configuration
- Updated all API and image paths in frontend and backend
- Updated documentation with correct URLs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Configured application for deployment with Apache reverse proxy and systemd service. The app runs without Docker, using Python venv and Gunicorn.
Key changes:
- deploy.sh: Idempotent deployment script with backup, health checks
- systemd/hm-ems.service: Systemd unit for auto-start/restart
- DEPLOY.md: Complete deployment and troubleshooting guide
- .env.example: Configuration template
- Updated API paths: /api/* → /hm-ems/api/* for Apache routing
- Updated image URLs: /images/* → /hm-ems/images/* for Apache alias
- Updated CLAUDE.md: Added production deployment section
Architecture:
- Flask/Gunicorn on localhost:5000 (systemd service)
- Apache reverse proxy for /hm-ems/api/*
- Apache serves static files from /var/www/html/hm-ems-report/
- Apache serves images from /opt/hm-ems-data/campaign_images/
- Data persistence in /opt/hm-ems-data/ (JSON + images)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added Flask-based web application for reviewing and editing H&M product data across multiple languages. Includes inline editing, approval workflow, change logging, and multi-image support.
Key components:
- server.py: Flask API with thread-safe JSON read/write
- html_generator.py: Standalone HTML generator with language utilities
- static/index.html: Interactive review UI with dynamic column management
- CLAUDE.md: Comprehensive development guide
- Sample campaign data (1022A, 2023) with images
- Updated .gitignore for Python projects
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>