Back to Blog
FeaturedEngineering

Building aiViator Vault: Engineering a Pilot Data Platform in a Regulation-Heavy Domain

March 14, 202616 min read

Building software in aviation is different from building a typical SaaS product. When a pilot's currency status is wrong, that's not a minor bug — it's a safety issue. When flight time totals are inaccurate, that affects certificate applications, insurance, and employment. The margin for error is essentially zero.

aiViator Vault started as a vision from Christopher Veith, a CFI who saw firsthand how broken the tooling was for flight schools and individual pilots. Paper logbooks, scattered endorsements, manual compliance tracking — he knew there had to be a better way. I came on as CTO and Founding Software Engineer to build it. What started as a logbook digitization tool grew into a full pilot data platform — AI extraction, real-time FAA compliance, document signing workflows, career progression tracking, flight school operations, and an AI assistant that understands aviation. This is the story of how I built it, the architecture decisions that shaped it, and what I learned about engineering in a regulation-heavy domain.

The Domain Problem: Aviation Is Deceptively Complex

From the outside, a pilot logbook looks simple. Date, aircraft, route, flight times, landings. How hard can it be?

Then you start reading FAA Part 61.

Currency requirements alone have dozens of edge cases. Night currency requires full-stop landings, not touch-and-goes. Instrument currency has a six-calendar-month window plus a separate six-month grace period where you can still get current with an IPC instead of a full checkride. Medical certificate duration depends on your age at the time of examination AND the class of medical AND whether you're exercising private or commercial privileges.

Then there's duty time tracking. Part 135 single-pilot operations have a 14-hour duty period limit with 10-hour minimum rest. Part 121 has different limits under FAR 117. Daily, 7-day, monthly, and annual flight time limits all need tracking simultaneously.

Endorsements follow AC 61-65K, which defines specific language for each endorsement type. A solo endorsement has different requirements than a knowledge test endorsement, which is different from a practical test endorsement. Some endorsements are prerequisites for others — the system needs to understand that hierarchy.

And then there's the organizational layer. Flight schools need to track all of this across dozens of students, with multiple instructors, each with their own endorsement authority, plus document signing workflows, contract packages, fleet management, and compliance reporting.

I spent weeks mapping the regulatory domain before writing application code. That upfront investment paid for itself many times over.

Architecture: Full-Stack TypeScript with Domain-Driven Design

I chose TypeScript end-to-end — React with Vite on the frontend, Express.js on the backend, shared types between them. In a domain this complex, type safety is a lifeline.

When a flight entry object flows from a form, through an API, into a database, through a currency calculator, and back out to a status dashboard — every boundary is a place where data can get corrupted. Shared TypeScript types between client and server eliminate an entire class of bugs. When I add a new field to a flight entry, the compiler tells me every place in the codebase that needs to handle it.

The backend is organized by domain: flights, certificates, endorsements, medical, extraction, pilot-status, notifications, subscriptions, document signing, and more. Each domain owns its own storage layer, business logic, and route handlers. This keeps the codebase navigable even as it's grown to handle dozens of feature areas.

PostgreSQL with Drizzle ORM handles the data layer. The schema is heavily normalized where accuracy matters (flight entries, certificates, endorsements) and pragmatically denormalized where performance requires it (currency status caching, analytics aggregations). Redis provides caching for frequently accessed data like aircraft lookups and currency rule definitions.

The AI Extraction Pipeline

The logbook extraction feature is the most technically interesting part of the platform. The challenge: take a photo of a handwritten logbook page — potentially decades old, with faded ink, inconsistent handwriting, and non-standard column layouts — and turn it into structured flight data.

Pure OCR isn't enough. Tesseract can read text, but it doesn't understand that "KDEN" is an airport identifier, that "1.5" in the third column means 1.5 hours of PIC time, or that the squiggly mark in the remarks column is an instructor's signature.

The system uses AI with deep aviation domain knowledge to interpret logbook images. It understands that "C172" is a Cessna 172, that "3 TnG" means three touch-and-go landings, and that a route like "KAPA-KDEN-KAPA" is a round trip. Getting this right required significant investment in how we train the system to think about aviation data — that's our competitive edge, and I'll leave it at that.

An anomaly detector catches suspicious data — arrival times before departure times, flights exceeding 24 hours, pilot role times exceeding total time, missing airports. These get flagged during the review step so pilots can catch errors before committing data.

Every extraction goes through human review. The pilot sees what the AI found, corrects anything it missed, and confirms. This human-in-the-loop approach is non-negotiable in aviation.

Real-Time Compliance: The Currency Engine

Currency status needs to be current — not "as of last Tuesday." When a pilot logs a flight with three landings, their passenger currency should update immediately.

The currency calculation engine evaluates all applicable rules against the pilot's flight history and certificate status. It handles the full complexity: passenger currency with tailwheel variants, night currency with full-stop requirements, instrument currency with the six-month window plus grace period, flight review currency, medical certificate validity with age-dependent durations, and CFI renewal tracking.

For Part 135 and Part 121 pilots, the duty tracking service calculates current duty period status, flight time against daily/weekly/monthly/annual limits, rest compliance, and next required rest period. It flags when you're approaching limits with warning thresholds.

Performance matters here. A pilot with thousands of flight entries shouldn't wait seconds for their status to calculate. We've invested heavily in making this fast, even with complex regulatory logic running against large flight histories.

Server-sent events push real-time updates to the UI. Log a flight, and your status dashboard updates without a page refresh.

The Aviation Intelligence Engine

Beyond basic compliance tracking, the platform includes an intelligence engine that generates insights across multiple dimensions: career progression recommendations, compliance risk identification, personalized training suggestions, safety scoring, and efficiency analysis.

The career path system maps progress against private, commercial, ATP, and instructor tracks with milestone requirements pulled from FAR Part 61. It calculates completion percentages based on actual logged data — total hours, PIC, cross-country, night, instrument, solo — and shows what's needed for the next certificate or rating.

Document Signing and Contract Management

Flight schools need paperwork — NDAs, training agreements, enrollment contracts, liability waivers. The document signing system handles the full lifecycle:

A template builder with a rich text editor lets schools create document templates with draggable signature fields, date fields, and custom form fields positioned on the document. Signing workflows define who signs in what order, with support for multiple signers. Bulk workflow creation lets schools send the same document to dozens of students at once.

Documents get watermarked, digitally signed with PIN verification, and stored with full audit trails. A status board tracks which documents are pending, signed, or overdue. Reminder scheduling automatically nudges signers who haven't completed their documents.

Contract packages bundle multiple documents together — a school can create an "enrollment package" with an NDA, training agreement, and payment authorization, then send the whole bundle to a new student in one action.

Multi-Tenant Architecture for Flight Schools

Supporting individual pilots is one thing. Supporting flight schools with hundreds of students, multiple instructors, and organizational workflows is a different architecture entirely.

Every query that touches student data is scoped to the requesting organization. Instructors see only their assigned students. School admins see everything within their organization. Pilots always own their own data — even within a school, the logbook belongs to the pilot.

The school admin portal includes student management, instructor dashboards, endorsement approval workflows, document signing management, fleet tracking, course requirements, analytics, billing, exports, messaging, transfer credits, and webhook configuration for external integrations.

The instructor portal provides student rosters, flight review capabilities, endorsement management, and a self-onboarding flow. Students get their own portal with an onboarding checklist and progress tracking.

Google Sheets Sync

Many pilots already track their flights in Google Sheets. Rather than forcing them to abandon that workflow, aiViator Vault offers two-way sync. Changes in the app reflect in the spreadsheet and vice versa.

The sync system handles the complexity of keeping two data sources in agreement — including what happens when the same flight gets edited in both places simultaneously.

The PWA Layer

aiViator Vault is built as a Progressive Web App. It installs on any device, works offline for viewing cached data, sends push notifications for currency expirations and endorsement updates, and adapts its layout between desktop and mobile.

The mobile experience includes pull-to-refresh, a quick-log modal for fast flight entry, and a mobile-optimized flight entry form. The desktop experience provides full table views, analytics dashboards, and the document template builder.

What I Learned

Aviation software has zero tolerance for inaccuracy. Property-based testing turned out to be invaluable for the currency engine — generating random flight histories and verifying that currency status is always consistent. Unit tests alone don't catch the integration-level edge cases that emerge when regulatory rules interact.

The extraction pipeline's happy path works well. But logbooks in the wild are messy — coffee stains, torn pages, entries written sideways, multiple handwriting styles on the same page. Each edge case required its own handling, and the anomaly detection layer catches what the AI misses.

Building a multi-tenant system where data isolation is a safety requirement (not just a business requirement) changes how you think about every database query. There's no room for a query that accidentally leaks one school's student data to another.

The document signing system was more complex than expected. The interaction between template building, workflow routing, bulk operations, reminder scheduling, watermarking, and audit trails has significant surface area. But flight schools need it — paper-based onboarding doesn't scale.

The Bigger Picture

Aviation is a domain where software can genuinely improve safety. When pilots have accurate, accessible records of their flight history and currency status, they make better decisions. When flight schools can track student progress systematically, training quality improves. When endorsements are properly documented and tracked, regulatory compliance becomes natural rather than burdensome. When document workflows are digital, nothing falls through the cracks.

aiViator Vault is our contribution to that mission. It's built by a team that understands both the code and the cockpit — Christopher Veith bringing the aviation expertise and flight training insight, and me building the platform from the ground up. It's available now for pilots and flight schools ready to modernize how they manage their aviation data.