A comprehensive flight safety and compliance management platform for general aviation. LoggerAi provides intelligent flight legality audits, automated logbook parsing, and probabilistic risk analysis to help pilots and operators ensure safe, compliant flights.
- Flight Legality Audits - Automatically generates GO/CAUTION/NO-GO status based on FAA compliance checks (14 CFR Part 91 & Part 61)
- Intelligent Logbook Parsing - Uses Reducto AI to parse handwritten and PDF logbooks with OCR support
- Maintenance Tracking - Monitors annual inspections, transponder checks, 100-hour inspections, altimeter/static system, VOR, ELT, and airworthiness directives
- Comprehensive Risk Analysis - Probabilistic safety scoring combining weather, pilot currency, aircraft condition, and route familiarity
- Fleet Management - Manage multiple aircraft with detailed maintenance histories, POH data, V-speeds, weight/balance, and MEL/KOEL configurations
- Pilot Management - Track certifications, medical status, flight reviews, endorsements, and flight experience (total, PIC, night, IFR, recent)
- Weather Integration - Real-time METAR/TAF data from aviationweather.gov with density altitude calculations and hazard identification
- Email Notifications - Automated pre-flight alerts, audit reports, and mechanic/pilot notifications via Resend
- Document Management - Upload, parse, and extract data from PDFs, flight plans, and aviation documents with AI-powered smart import
- Interactive Flight Map - Leaflet-based map with flight route visualization and playback
- FAA Registry Lookup - Look up aircraft data directly from the FAA registry
- Command Palette - Quick-access command menu for navigating the application
| Layer | Technologies |
|---|---|
| Framework | Next.js 14, React 18, TypeScript |
| Styling | Tailwind CSS, Class Variance Authority |
| State Management | TanStack React Query |
| Database | MongoDB, Mongoose |
| Authentication | NextAuth (v5 beta) with Google OAuth |
| AI Services | OpenRouter (Claude, Gemini, GPT), Reducto AI (document parsing) |
| Maps & Charts | Leaflet / React-Leaflet, Recharts |
| Resend | |
| Web Scraping | Firecrawl (POH data extraction) |
| Validation | Zod |
| Icons | Lucide React |
- Node.js 18+
- MongoDB (local or MongoDB Atlas)
- Google OAuth credentials (for authentication)
- API keys for: OpenRouter, Reducto AI, Resend
-
Clone the repository
git clone <repository-url> cd LoggerAi
-
Install dependencies
npm install
-
Configure environment variables
cp .env.example .env.local
Edit
.env.localwith your values (see.env.examplefor the full list):# Database MONGODB_URI=mongodb://localhost:27017/aviation-intelligence # Authentication GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret AUTH_SECRET=your_auth_secret # generate with: openssl rand -base64 32 NEXTAUTH_URL=http://localhost:3001 # AI & API Services OPENROUTER_API_KEY=your_openrouter_api_key REDUCTO_API_KEY=your_reducto_api_key RESEND_API_KEY=your_resend_api_key FIRECRAWL_API_KEY=your_firecrawl_api_key # optional -
Seed sample data (optional)
npm run seed
-
Start the development server
npm run dev
Open http://localhost:3000 in your browser.
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build for production |
npm start |
Start production server |
npm run lint |
Run ESLint checks |
npm run seed |
Populate database with sample data |
npm run migrate:denormalize |
Backfill aircraft/pilot denormalized fields |
LoggerAi/
├── app/ # Next.js App Router
│ ├── page.tsx # Dashboard (fleet overview, stats)
│ ├── layout.tsx # Root layout with providers & navigation
│ ├── aircraft/ # Aircraft management pages
│ ├── pilots/ # Pilot management pages
│ ├── flights/ # Flight planning & audits
│ ├── maintenance/ # Maintenance tracking
│ ├── files/ # Document management
│ ├── login/ # Authentication page
│ └── api/ # Backend API routes
│ ├── aircraft/ # Aircraft CRUD + analysis endpoints
│ ├── pilots/ # Pilot CRUD + safety endpoints
│ ├── flights/ # Flight CRUD + safety analysis
│ ├── audit/ # Flight legality audit engine
│ ├── documents/ # Document upload & AI parsing
│ ├── weather/ # METAR/TAF data
│ ├── auth/ # NextAuth authentication
│ ├── cron/ # Scheduled tasks (hourly checks, alerts)
│ └── actions/ # Email actions (pilot/mechanic)
├── components/ # React components
│ ├── FlightMap.tsx # Interactive Leaflet map
│ ├── FlightPlayback.tsx # Flight route playback
│ ├── LogbookUI.tsx # Logbook upload & parsing
│ ├── MagicImport.tsx # AI-powered document import
│ └── ui/ # Base UI components
├── lib/ # Shared utilities & backend logic
│ ├── models/ # Mongoose schemas (Aircraft, Pilot, Flight, etc.)
│ ├── services/ # Business logic services
│ │ ├── legalityService.ts # FAA compliance audit engine
│ │ ├── reductoService.ts # Document parsing via Reducto AI
│ │ ├── comprehensiveSafetyService.ts # Risk analysis
│ │ ├── weatherService.ts # Weather data & analysis
│ │ ├── emailService.ts # Email notifications
│ │ └── ... # Additional services
│ ├── db.ts # MongoDB connection
│ ├── auth.ts # NextAuth configuration
│ ├── hooks.ts # React Query hooks
│ ├── types.ts # TypeScript type definitions
│ └── faaRegulations.ts # FAA regulatory constants
├── scripts/ # Utility & migration scripts
├── middleware.ts # Authentication middleware
└── next.config.js # Next.js configuration
GET/POST /api/aircraft- List/create aircraftGET/PUT/DELETE /api/aircraft/[id]- Manage aircraftGET /api/aircraft/[id]/analyze- Generate AI safety analysisGET /api/aircraft/[id]/audit- Run maintenance auditGET /api/aircraft/lookup- FAA registry lookupPOST /api/aircraft/magic-add- AI-powered aircraft addition
GET/POST /api/pilots- List/create pilotsGET/PUT/DELETE /api/pilots/[id]- Manage pilotsGET /api/pilots/[id]/ai-safety- AI safety analysis
GET/POST /api/flights- List/create flightsGET/PUT/DELETE /api/flights/[id]- Manage flightsGET /api/flights/[id]/safety-analysis- Comprehensive safety analysisGET /api/audit/[flightId]- Run legality audit
POST /api/documents/upload- Upload documentsPOST /api/documents/smart-upload- AI-powered upload with parsingPOST /api/documents/[id]/parse- Parse an uploaded documentPOST /api/documents/[id]/discover-aircraft- Extract aircraft data from document
GET /api/weather/[airport]- Get METAR/TAF data
POST /api/actions/email-pilot- Send pilot alertPOST /api/actions/email-mechanic- Send mechanic notification
GET /api/cron/hourly-check- Hourly maintenance checksGET /api/cron/pre-flight-alert- Pre-flight reminders
LoggerAi implements compliance checking against Title 14 of the Code of Federal Regulations (14 CFR), the primary body of FAA regulations governing civil aviation in the United States. Every legality check cites the specific FAR section it enforces.
| Check | Regulation | Interval | Description |
|---|---|---|---|
| Annual Inspection | 14 CFR 91.409(a) | 12 calendar months | Must be performed by IA holder or repair station |
| 100-Hour Inspection | 14 CFR 91.409(b) | 100 hours time-in-service | Required for aircraft used for hire; 10-hr overfly allowed |
| Transponder Check | 14 CFR 91.413 | 24 calendar months | ATC transponder tests and inspections |
| Altimeter/Static System | 14 CFR 91.411 | 24 calendar months | Required for IFR in controlled airspace |
| VOR Equipment Check | 14 CFR 91.171 | 30 days | Required for IFR; VOT +/-4°, ground +/-4°, airborne +/-6° |
| ELT Inspection | 14 CFR 91.207 | 12 calendar months | Battery replacement at 50% life or 1 hr cumulative use |
| Airworthiness Directives | 14 CFR Part 39 | As specified | Mandatory compliance; aircraft not airworthy if non-compliant |
| Check | Regulation | Requirement | Description |
|---|---|---|---|
| Medical Certificate | 14 CFR 61.23 | Class-dependent | 1st class: 12/6 mo; 2nd: 12 mo; 3rd: 60/24 mo (under/over 40) |
| BasicMed | 14 CFR 61.23(c)(3) | 48-month physical | Alternative to 3rd class; max 6 seats, 6,000 lbs, FL180, 250 KIAS |
| Flight Review | 14 CFR 61.56 | 24 calendar months | 1 hr flight + 1 hr ground; WINGS program is acceptable alternative |
| Day Landing Currency | 14 CFR 61.57(a) | 3 landings / 90 days | Same category, class, type; required to carry passengers |
| Night Landing Currency | 14 CFR 61.57(b) | 3 full-stop / 90 days | 1 hr after sunset to 1 hr before sunrise; required for night pax |
| IFR Currency | 14 CFR 61.57(c) | 6 months | 6 approaches + holding + intercepting/tracking; IPC after grace period |
Per 14 CFR 61.5, the system tracks the following certificate levels:
- Student Pilot
- Recreational Pilot
- Private Pilot (PPL)
- Commercial Pilot (CPL)
- Airline Transport Pilot (ATP)
- Sport Pilot
- Flight Instructor (CFI / CFII / MEI)
- Remote Pilot (Part 107)
| Class | Required For | Duration (Under 40) | Duration (Over 40) |
|---|---|---|---|
| 1st Class | ATP privileges | 12 months | 6 months |
| 2nd Class | Commercial privileges | 12 months | 12 months |
| 3rd Class | Private/recreational | 60 months | 24 months |
| BasicMed | Private (with limitations) | 48-month physical exam cycle | 48-month physical exam cycle |
| Endorsement | Regulation | Description |
|---|---|---|
| High Performance | 14 CFR 61.31(f) | Aircraft with engine >200 HP |
| Complex | 14 CFR 61.31(e) | Retractable gear, flaps, controllable prop |
| High Altitude | 14 CFR 61.31(g) | Pressurized aircraft >25,000 ft MSL |
| Tailwheel | 14 CFR 61.31(i) | Tailwheel aircraft PIC |
| Solo | 14 CFR 61.87 | Student solo endorsement |
| Solo Cross-Country | 14 CFR 61.93 | Student solo XC endorsement |
| Checkride | 14 CFR 61.39 | Practical test endorsement |
| Knowledge Test | 14 CFR 61.35 | Written test endorsement |
The system validates equipment against the FAA-required instrument lists:
- VFR Day (A-TOMATO-FLAMES mnemonic): Airspeed, Tachometer, Oil pressure, Manifold pressure, Altimeter, Temperature, Oil temp, Fuel gauge, Landing gear indicator, Anti-collision lights, Magnetic compass, ELT, Safety belts
- VFR Night (add FLAPS): Fuses, Landing light (for hire), Anti-collision, Position lights, Source of electrical energy
- IFR (add GRABCARD): Generator, Radios, Altimeter (sensitive), Ball, Clock, Attitude indicator, Rate-of-turn, DME/RNAV, Directional gyro
- VFR weather minimums per airspace class (14 CFR 91.155)
- Special VFR requirements (14 CFR 91.157)
- IFR alternate airport requirements (14 CFR 91.169 - "1-2-3 rule")
- Fuel reserve requirements: VFR day 30 min, VFR night 45 min, IFR 45 min (14 CFR 91.151/91.167)
| Variable | Required | Description |
|---|---|---|
MONGODB_URI |
Yes | MongoDB connection string |
GOOGLE_CLIENT_ID |
Yes | Google OAuth client ID |
GOOGLE_CLIENT_SECRET |
Yes | Google OAuth client secret |
AUTH_SECRET |
Yes | NextAuth JWT secret (generate with openssl rand -base64 32) |
NEXTAUTH_URL |
Yes | Authentication callback URL (e.g., http://localhost:3001) |
OPENROUTER_API_KEY |
Yes | OpenRouter API key for AI models |
REDUCTO_API_KEY |
Yes | Reducto AI API key for document parsing |
RESEND_API_KEY |
Yes | Resend email API key |
SAFETY_EMAIL_RECIPIENT |
No | Email address for safety alert notifications |
FIRECRAWL_API_KEY |
No | Firecrawl web scraping key (POH data) |
PORT |
No | Server port (default: 3000) |
NODE_ENV |
No | Environment (development / production) |
This software is provided as a decision-support tool for general aviation pilots and operators. It is NOT a certified aviation product under any FAA Technical Standard Order (TSO), and has NOT been approved or endorsed by the FAA.
- All regulatory references cite 14 CFR (Title 14, Code of Federal Regulations) as published by the FAA
- Pilots remain solely responsible for compliance with all applicable FARs
- Always verify currency, airworthiness, and weather with official FAA sources
- This tool does not replace proper flight planning, pre-flight inspections, or pilot judgment
- Regulatory information may not reflect the most recent amendments to 14 CFR
MIT License - see LICENSE for details.
This project is open source under the MIT License, which permits use, modification, and distribution for both private and commercial purposes with attribution.