Commit graph

8 commits

Author SHA1 Message Date
Claude
a3b36d5c74
fix: Job-Polling statt Langläufer-Request gegen "Failed to fetch"
POST /api/process hielt die HTTP-Verbindung 30–120s+ offen, während
claude -p lief. Jeder Reverse-Proxy (und kurze Netz-Hänger) kappt so
eine Verbindung, der Browser sieht nur "Failed to fetch" — ununterscheidbar
von einem echten Claude-Fehler.

- Server: POST registriert einen Job und antwortet sofort mit 202 {jobId};
  claude läuft im Hintergrund, Ergebnis/Fehler landen im Job-Store
  (TTL 15min, periodische Bereinigung). Neuer GET /api/process/:jobId
  liefert pending/done/error in kurzen, proxy-sicheren Requests.
- Frontend: pollt den Job alle 2s; ein transienter Netzfehler beim Pollen
  wird erneut versucht statt die ganze Analyse abzubrechen. Echte
  Claude-Fehler werden jetzt mit Klartext angezeigt statt "Failed to fetch".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P7fRh8N5kQsicT7q4gSnua
2026-06-19 10:15:36 +00:00
3c669fb003 feat: AcroForm-Fill via Claude CLI, Multi-Source, Kanagawa, Docker-Deploy
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>
2026-04-20 22:48:32 +02:00
Kenearos
778caa8a45 refactor: Migrate to ESM and Vite for modern build
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.
2026-02-06 14:03:50 +01:00
Claude
458d3f9b64
fix: Implement fillPdf function that was returning empty array
The fillPdf function was a stub that returned an empty Uint8Array.
Implemented proper PDF form filling using pdf-lib to handle both
text fields and checkboxes.

https://claude.ai/code/session_01SYhhaVHw6we1P6Y2kqLnDe
2026-01-31 10:09:29 +00:00
Claude
f7f899dce7
fix: Simplify PDF filling - use fillable fields directly
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
2026-01-29 19:00:18 +00:00
Claude
19e96ef59b
feat: Add LaTeX template-based form filling for G2210-11
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
2026-01-29 18:29:22 +00:00
Claude
b23daec6e5
feat: Store API key locally in browser instead of build-time
- 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
2026-01-28 19:07:38 +00:00
Kenearos
d2ea8a0cd4 feat: Initialize AutoForm AI project structure
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.
2026-01-28 19:23:47 +01:00