Flask API was using PORT env variable which Railway also assigns to
the frontend static server. Both services were competing for the same
port, causing the container to fail health checks.
Changed Flask to use FLASK_PORT (default 5000) so it runs independently
from the Railway-assigned PORT used by the serve command.
https://claude.ai/code/session_01YEMFAbGgf8K7as4Uqgjv3R
Replace unreliable visual overlay mode with precise LaTeX templates:
- Add LaTeX template for G2210-11 (Ärztlicher Befundbericht der WAG)
- Create Python Flask backend for LaTeX compilation (latex_service.py, server.py)
- Add frontend latexService.ts for API communication
- Update ReviewPanel with LaTeX mode toggle and preview
- Enhance Gemini prompts with G2210-11 specific field extraction
- Add Dockerfile with TeX Live for Railway deployment
- Update railway.toml to use Docker builder
The LaTeX approach ensures accurate field placement and proper
formatting for German medical/insurance forms.
https://claude.ai/code/session_016pQhdznHZ74Fpkvwr3cLBq