Komplettes Rework der AI-Studio-Vorlage zu einem produktiven Werkzeug fuer
deutsche AcroForm-Formulare (Reha-Antraege, Arzt-Befundberichte):
- Backend: Express spawnt headless Claude CLI ('claude -p --output-format json'
via stdin-Pipe). Prompt enthaelt die Feldnamen als Ziel-Schema plus die
Arbeitsregeln (Stichwortstil, feste Zeichen-Kaestchen ohne Leerzeichen,
Vordrucke respektieren, keine geratenen Werte, nur medizinisch).
- PDF-Handling: pdfjs-dist statt pdf-lib — pdf-lib scheitert an verschluesselten
Object-Streams in DRV-Formularen. annotationStorage + saveDocument, kein
Flatten. Worker-Patch zur Laufzeit forciert Auto-Size und schwarze Schrift.
- Multi-Source-Upload: beliebig viele PDFs/Bilder + optional Freitext.
- Design: Kanagawa Design System (Preset aus ../kanagawa-design-system),
Tailwind lokal gebaut statt CDN, Dark/Light-Toggle, Progress-Indicator.
- Deployment: Multi-Stage-Dockerfile, docker-compose in matrix_default-Netz,
Claude-Credentials vom Host per Volume. PLAN.md + AGENTS.md (Alex-Schema).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Utilize `URL.createObjectURL` for richer file previews, especially for PDFs. This approach provides better compatibility and performance compared to Base64 previews.
Introduces memory leak prevention by revoking Blob URLs when the component unmounts or the app resets.
Updates package.json and index.html to use ES Modules and Vite for development and building. This includes migrating dependencies and removing old build scripts and testing configurations.
Also, simplifies the Gemini API key handling by directly using environment variables and refactors the Gemini response schema for clearer field definitions. Updates React component imports to use ESM paths for better maintainability.
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
The previous approach was overcomplicated with LaTeX templates.
Now the system simply:
1. Detects PDF form fields (AcroForm)
2. Sends field names to Gemini for data extraction
3. Gemini returns 'key' matching exact PDF field names
4. Fields are filled directly in the original PDF
Removed:
- LaTeX template detection logic
- G2210-specific field definitions
- Complex mode switching
The fillable PDF approach is simpler and more reliable.
https://claude.ai/code/session_016pQhdznHZ74Fpkvwr3cLBq
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
- Add apiKeyService for localStorage-based API key management
- Add ApiKeyModal component for entering/updating API key
- Update geminiService to use dynamic API key
- Remove .env.example as API key is now user-provided
- Update to gemini-2.0-flash model
The API key is now stored only in the user's browser localStorage,
making the app more secure and easier to deploy.
https://claude.ai/code/session_01DBAyjuKW8Qtzixc64qn9KP
- Add serve as production server for static files
- Add start script for production deployment
- Create railway.toml with deployment settings
- Create .env.example for required environment variables
- Fix index.html to use Vite bundling instead of ESM imports
https://claude.ai/code/session_01DBAyjuKW8Qtzixc64qn9KP
Add Python script to automatically fill PDF forms with AcroForm fields:
- extract_fields(): Extract all form field names and types from PDF
- fill_pdf(): Fill PDF with values from JSON input
- Support for both list and dict JSON formats
- Checkbox values support (/On, /Off, /Ja, /Nein)
https://claude.ai/code/session_01Dq1f9hjJFq859ShW2kZ26R
Sets up the basic project structure for AutoForm AI, including:
- Vite for build tooling and development server.
- React and ReactDOM for the UI.
- TypeScript for static typing.
- Essential dependencies for PDF manipulation (jspdf, pdf-lib) and AI integration (@google/genai).
- Basic HTML structure and styling.
- Component definitions and service interfaces for future development.
- A README with local development instructions.