crkayes
← Projects
VisaDB icon, a white database symbol on a dark navy square

VisaDB

Building

Visa rules, fees and forms as an API, traced back to the official source

The AI candidate review queue, showing how many candidates were approved automatically and a list of candidate rules with confidence scores and statuses, using invented sample data
AI candidate review queue, with invented sample data
A finished site crawl, with each captured page labelled as visa rule, eligibility, fee, document or irrelevant, and relevant pages sent on for extraction, using invented sample data
A site crawl with every page labelled, with invented sample data
An eligibility rule with its conditions, outcome and the evidence it came from, for a fictional country called Arcadia
An eligibility rule and its evidence, for a fictional country
A visa application form captured from an official site, listing each field with its type, whether it is required and its validation, using invented sample data
A captured application form, with invented sample data
Diagram of the VisaDB pipeline in four stages: crawler finds, AI suggests, human approves, API publishes
How VisaDB turns official pages into an API

VisaDB is a visa data platform for travel businesses: booking sites, airlines, travel agencies and visa services. It answers the questions they keep asking. Does this traveler need a visa? Which kind? What does it cost? Which documents are needed? What does the official application form ask for? Every answer can be traced back to the official page it came from.

It works by one rule: crawler finds, AI suggests, human approves, API publishes.

How it works

  1. Crawler finds. Official government pages are added to a source registry, each with a trust level. The crawler maps a whole site from one starting page, following its sitemaps and links. It reads plain pages, pages that need a real browser to render, and PDFs. It respects robots.txt and never tries to get past logins, CAPTCHAs or bot protection. Every captured page is kept as evidence, including the fields of any application form on it.
  2. AI suggests. A fast AI model labels each page as a visa rule, eligibility, fee, document or irrelevant, so only useful pages go further. A stronger model then turns those pages into candidate rules, each with a confidence score.
  3. Human approves. High-confidence candidates from primary official sources are approved automatically. Everything else waits in a review queue, and a person can override any automatic approval. Approved rules are versioned and linked to the evidence behind them.
  4. API publishes. Publishing is its own step: preview the change, skip anything that hasn't changed, keep every version, and roll back if needed.

The API only reads published data and its cache. It never crawls or calls AI while a client is waiting.

The API

Clients can check:

  • Eligibility: visa-free, eVisa, eTA, visa on arrival, embassy visa, or not eligible, for a traveler's nationality, passport, purpose and trip.
  • Government fees and required documents for a visa.
  • Travel readiness and whole multi-stop itineraries, leg by leg.
  • Application forms: the fields an official form asks for, with types and validation.

Each answer includes the sources behind it and when the data was published.

For customers

API keys with limited scopes and optional IP allow-lists, plans with usage limits, usage-based billing with invoices, and webhooks. Customers get their own portal with an API playground, usage, invoices, webhook settings and two-factor sign-in.

How it's built

VisaDB is a Turborepo monorepo:

  • API: NestJS with Prisma on PostgreSQL, in 37 modules.
  • Admin and customer portal: two Next.js apps on a shared design system, with lint rules that stop one-off styles creeping in.
  • Worker: BullMQ jobs for crawling and AI, with Playwright for pages that need a browser.
  • Storage: Redis for cache, rate limits and queues, and S3-compatible storage for crawl evidence.

Nothing business-specific is hardcoded. Countries, fees, plans and limits all live in data or settings, with ISO codes for countries and currencies. The code has 75 data models, about 90 admin and portal screens, and 119 test files.

About the screenshots

The admin screenshots were taken from a copy of the admin app fed with invented sample data. The destination, "Arcadia", is a fictional country using XA, an ISO code reserved for private use, so no real visa rule appears on this page.

Status

VisaDB isn't public yet. Phases 1 to 31 were built between 26 and 31 May 2026. Still to come before launch: developer docs, an SDK, and embeddable widgets.

Built with

  • NestJS
  • Next.js
  • React
  • TypeScript
  • Prisma
  • PostgreSQL
  • Redis
  • BullMQ
  • Playwright
  • Tailwind CSS
  • Turborepo
  • Vitest

Changelog

  1. Phases 29–31

    AI page classification ahead of extraction, capture of official application forms into structured form data served by the API, and automatic approval for high-confidence candidates from official sources, with tiered human review for the rest.

  2. Phase 28

    A site-wide crawler that maps a whole official site from one starting page, following sitemaps and links and respecting robots.txt.

  3. Phases 18–27

    Security hardening, PDF and browser-rendered crawling, AI extraction into candidate rules, the human approval step, and a publish workflow with version history and rollback.

  4. Phases 1–17

    The foundation, built from 26 May: reference data, the source registry, evidence snapshots, eligibility, fee and document rules, review, publishing and the client API, followed by API keys, plans, usage billing with invoices, webhooks, and a customer portal with two-factor sign-in.

Posts about VisaDB

Started 26 May 2026