Government-portal lookups, queued, encrypted and honest about failure.
A Dockerized Playwright service that checks visa status against visa.go.kr on demand, with passport numbers encrypted at rest.
- ROLE
- Sole engineer
- COMPANY
- K-Apply
- SCOPE
- Backend · Browser automation · Security
- STACK
- AES-256-GCM
- ASYNC JOB QUEUE
- HEADLESS BROWSER
The API answers in milliseconds; a separate worker does the slow part.
The API validates and encrypts the request, persists it, and enqueues a BullMQ job. A worker process consumes the queue, drives a headless browser through the portal’s search flow, and writes the parsed result — and the issued-visa PDF — back to PostgreSQL. The client polls the job: pending → processing → completed / failed.
API and worker scale independently, and worker concurrency and job timeouts are configuration-driven.
PII encrypted at rest
Passport numbers are stored as AES-256-GCM ciphertext; plaintext exists only in memory during a job, and logs only see a masked form.
Resilient scraping
Exponential-backoff retries, attempt tracking in the DB, and per-job timeouts so a hung browser can’t stall the queue.
Selector isolation
All portal DOM selectors live in one file — when the government site changes, it’s a one-file fix.
Queue hygiene
Completed jobs expire after an hour; failures are kept 24h for debugging.
Failure honesty
A lost lookup returns failed with an error message — never a fabricated status.