~/projects/visa-docs
Visa Document Automation
An internal system that reads passport and ticket scans with OCR and an LLM, then generates the full document set for a Japanese visa application.


The problem
Visa paperwork was made by hand from scans: about 60 minutes per traveller. Now it takes 15 minutes, and even a 30-person tour gets all its documents at once, as soon as everyone has filled in the form.
Documents for one traveller, for example
- Visa application form (2 copies, with photo)
- Schedule of stay
- Power of attorney (when submitted by a proxy)
- Sponsor letter (for minors)
- Letter for a multiple-entry visa
- Visa centre application
- Submission checklist
Depending on the traveller's situation, one person can need about 10 PDF and Word files — and all of them were made by hand.

Before and now
Before
- Travellerfills in a Word form by hand
- Staffretypes everything from the scans
- ~10 documentsPDF and Word, one at a time
Everything was typed by hand, so one misspelt name or a wrong date was enough for the documents to be rejected — human error could hold up the whole process.
Now
- Online formtravellers fill it in themselves
- Admin panelstaff only check
- AI (OCR + LLM)reads the scans, returns JSON
- ~10 ready filesfor the whole group at once
As soon as everyone in the group has filled in the form, the whole set is generated in one go.
Architecture
- Browseradmin panel · traveller form
- Traefik → nginxTLS · React SPA · /api proxy
- Go backendone binary · chi
- PostgreSQL
- Yandex CloudAI
- Pythongenerates DOCX and PDF
A layered monolith with one-way dependencies, shipped as a single binary.
Technical highlights
- AI only where it is neededRules live in Go code, and the code always has the last word.
- Failures handled on purposeA failed translation stops generation; a failed declension only warns.
- Personal data stays at homePersonal data may not leave the country, so Claude and ChatGPT were out: I used YandexGPT and made up for the weaker model with prompting.
Outcome
Today the system is part of everyday work.
Freed from the paperwork, the staff have more time for the tours themselves.
A visa is not part of the tour, but without it the trip never starts, which is why this matters.
