Enterprise-grade AI-powered aircraft spares certificate repository for Approved Maintenance Organisations. EASA Form 1, FAA 8130-3, COC, CRS extraction with role-based access, audit trails, and compliance tooling.
AMO CertVault is a production-grade certificate management system designed for aviation AMOs. It uses AI to extract, validate, and organise aircraft spares certificates — EASA Form 1, FAA 8130-3, COC, CRS, and more.
AMO CertVault digitises the certificate management workflow for Aircraft Approved Maintenance Organisations. Upload a PDF certificate, and the AI engine automatically extracts part numbers, serial numbers, suppliers, dates, and certificate types — even from multi-item documents with dozens of line items, including kit/overhaul sub-components.
Why CertVault? Aviation AMOs handle hundreds of certificates monthly. Manual data entry is slow, error-prone, and non-auditable. CertVault automates extraction with 92%+ accuracy using Gemini AI, with a regex fallback ensuring zero data loss.
Navigate to /auth and create an account with your email and password. You will receive a Visitor role by default.
Use your company email — administrators can identify and approve your account faster.
2
Await Admin Approval
An administrator will review your account and assign an appropriate role (Quality Manager, Store Personnel, or Auditor). You will be redirected to a Pending Approval screen until activated.
Do not create multiple accounts — duplicate sign-ups will be flagged and may delay approval.
3
Upload Your First Certificate
Go to Upload Certificate from the sidebar. Drag and drop a PDF or use the Camera Scanner to capture a physical certificate directly from your device.
Supported formats: PDF (text-based or scanned). Maximum file size: 10MB per document.
4
Review AI Extraction
The system will automatically extract certificate data using Gemini AI. Review the extracted fields — part number, serial number, description, supplier, certificate type, and date. Edit any inaccuracies and save.
Use the Certificates page to search by part number, description, serial number, or supplier. Full-text search is powered by PostgreSQL tsvector with trigram fuzzy matching.
Gemini 2.5 Flash extracts structured data from PDFs using tool-calling. Supports EASA Form 1, FAA 8130-3, COC, CRS, and 37+ certificate type mappings. Regex fallback ensures zero data loss.
Multi-Item Certificates
Certificates with multiple line items are parsed into individual records — each with its own part number, serial number, quantity, and condition. Supports 100+ items per certificate.
Kit Sub-Item Extraction
Overhaul kits, gasket sets, and assembly items with sub-components are automatically detected. Sub-items use decimal line numbering (14.1, 14.2) to preserve parent-child relationships.
Role-Based Access (RBAC)
Five-tier RBAC: Admin, Quality Manager, Store Personnel, Auditor, and Visitor. Row-Level Security (RLS) enforced at the database level — no client-side bypasses possible.
Camera Scanning
Capture certificates directly from your device camera with real-time preview, crop overlay, and flash toggle. The image is uploaded and processed through the same AI extraction pipeline.
Batch Upload
Upload multiple PDFs simultaneously. Each file is processed independently with live progress tracking, error reporting, and searchable batch history.
Certificate Cart and Bulk Print
Add certificates to a cart from search results or the duplicates page. Bulk print PDFs or export selected certificates as CSV for external reporting and audits.
Duplicate Detection
Dedicated duplicate management page groups certificates by part number across the entire system. View, compare, delete, or add duplicates to cart with role-restricted actions.
AI Chat Assistant
Streaming AI chat assistant for aviation certificate questions. Renders responses with Markdown formatting — headers, tables, code blocks, bold/italic, and clickable links.
PDF Compression
Structural PDF compression using pdf-lib’s object stream optimisation. Anomaly detection automatically flags suspiciously high compression ratios (below 0.2).
Complete Audit Trail
Every create, update, and delete action is logged with user ID, certificate ID, timestamp, and action details in JSON format. Fully queryable and exportable.
Full-Text Search
PostgreSQL tsvector-based search across certificates and items. Trigram similarity matching handles typos and partial matches. Debounced input for responsive UX.
The application is a React SPA backed by Lovable Cloud, providing authentication, PostgreSQL database, file storage, and serverless edge functions — no separate backend to manage.
The extraction pipeline is fully automated — upload a PDF and the system handles file storage, AI extraction, type normalisation, duplicate checking, and database persistence without manual intervention.
The primary extraction path uses Gemini 2.5 Flash with structured tool-calling:
1. Download PDF from storage → base64 encode2. Call Gemini 2.5 Flash with extraction tool schema3. Parse tool_calls response → structured JSON4. Normalize certificate_type against 37 pattern mappings5. Normalize all dates to ISO 8601 format6. Detect kit/overhaul items by keyword matching7. Sort kit sub-items by decimal line_number (14.1, 14.2...)8. Re-sequence to integer line numbers for storage9. Validate part numbers with aviation regex patterns10. Compute per-item confidence score (0.0 – 1.0)
The AI prompt explicitly instructs Gemini to extract unnumbered rows beneath kit/overhaul/set items as sub-components with decimal line numbers.
When AI extraction fails (rate limits, malformed PDFs), the system falls back to pattern-based extraction:
1. Parse BT/ET (Begin Text / End Text) blocks from raw PDF bytes2. Detect aviation keywords against 36 known patterns3. Require >= 2 keyword matches to classify as certificate4. Extract fields via tiered regex patterns: - Part Number: 8 patterns (P/N, PN, Part No., etc.) - Serial Number: 6 patterns (S/N, SN, Serial, etc.) - Supplier: 7 patterns (MFR, Manufacturer, etc.) - Description: 5 patterns (DESC, Item, etc.) - Date: 6 patterns with ISO normalisation5. Multi-item detection via repeating pattern groups6. Tiered confidence: High (>=0.8), Medium (0.5–0.79), Low (<0.5)
Regex extraction typically achieves 60–75% accuracy compared to AI’s 92%+. Always review regex-extracted certificates manually.
Kit certificates (overhaul kits, gasket sets, hardware assemblies) contain a parent item with multiple sub-components listed beneath it. CertVault automatically detects and preserves these relationships.
From the Certificates page or Duplicates page, click the cart icon on any certificate item. The cart state persists via React Context across navigation.
You can add items from multiple certificates — the cart is not limited to a single document.
2
Review Cart
Navigate to the Cart page to see all selected items with part numbers, descriptions, and source certificate references. Remove unwanted items individually or clear the entire cart.
3
Bulk Print PDFs
Click Print All to open all selected certificate PDFs in new tabs for printing. Each PDF links to the original uploaded document in storage.
4
Export to CSV
Click Export CSV to download a spreadsheet containing part number, description, serial number, quantity, condition, and source certificate for each selected item.
The CSV export is compatible with Excel, Google Sheets, and most ERP/inventory systems.
The Duplicates page identifies certificates that share the same part number across different uploads, enabling quick review and cleanup.
Destructive Action: Deleting a duplicate removes the certificate item permanently from the database. This action is restricted to Admin and Quality Manager roles and is logged in the audit trail with full details.
FUNCTION detectDuplicates(): groups <- GROUP certificate_items BY LOWER(part_number) duplicates <- FILTER groups WHERE COUNT > 1 FOR EACH group IN duplicates: SORT items BY upload_date DESC DISPLAY with certificate metadata: - Part number, description, serial number - Source certificate ID and type - Upload date and uploader - Available actions (View, Cart, Delete) RETURN duplicates WITH search filtering
Duplicates are matched by part number only (case-insensitive). Different serial numbers with the same part number are flagged as duplicates — the same part from different batches should be reviewable together.
The AI Assistant provides streaming responses about aviation certificates and compliance, rendered with full Markdown formatting.
The chat uses the cert-ai-chat edge function connecting to Gemini AI via the Lovable AI Gateway. No API key configuration is required — it works out of the box.
Principle of Least Privilege: Each role has only the minimum permissions required. The admin dashboard includes an interactive permissions matrix for visual reference. Actual enforcement is at the database level via RLS policies.
Row-Level Security (RLS) is enforced on every table:
-- Only active, non-visitor users can view certificatesCREATE POLICY "Authenticated users can view certificates"ON public.certificates FOR SELECT TO authenticatedUSING ( public.has_role(auth.uid(), 'admin') OR public.has_role(auth.uid(), 'quality_manager') OR public.has_role(auth.uid(), 'store_personnel') OR public.has_role(auth.uid(), 'auditor'));
The has_role() function is defined as SECURITY DEFINER to prevent recursive RLS evaluation. Never store roles on the profiles table — they are isolated in user_roles to prevent privilege escalation.
All tables use UUID primary keys, automatic timestamps, and Row-Level Security. The search_vector columns enable PostgreSQL full-text search with automatic updates via triggers.
A flagged: true response indicates the compression ratio is suspiciously high (below 0.2), meaning 80%+ size reduction. The original is always preserved.
cert-ai-chat — Streaming AI Chat
Method:POST Authentication: Bearer token (anon key)Streaming AI chat for aviation certificate questions using Server-Sent Events (SSE).Request Body
{ "messages": [ { "role": "user", "content": "What fields are on FAA Form 8130-3?" } ]}
Response (SSE Stream)
data: {"choices":[{"delta":{"content":"FAA Form 8130-3 contains..."}}]}data: {"choices":[{"delta":{"content":" the following blocks:\n\n"}}]}data: [DONE]
The response follows the OpenAI-compatible delta streaming format. The frontend uses ReadableStream with chunk-by-chunk parsing for real-time display.
For image-only PDFs, use the Camera Scanner which handles image processing
The method field in extraction results indicates whether AI or regex was used. Regex results warrant manual review.
Duplicate detection shows unexpected results
By design, duplicates are matched by part number only (case-insensitive):
Different serial numbers with the same part number are flagged as duplicates
The same part from different certificates is flagged as a duplicate
This is intentional for inventory reconciliation
Use the Duplicates page to review groups and decide which entries to keep, delete, or export.
User cannot access system after sign-up
New accounts receive the Visitor role by default and are placed on a Pending Approval screen. To resolve:
An Admin must navigate to User Management
Locate the user in the table
Change their role from visitor to an operational role
Ensure the Active toggle is enabled
Users with the visitor role or is_active: false cannot access any protected routes. This is enforced by both frontend route guards and database RLS policies.
PDF compression flags an anomaly
Compression ratios below 0.2 (80%+ size reduction) are flagged as potentially suspicious:
May indicate the PDF contains very little actual content
May indicate excessive metadata or duplicate objects
The original PDF is always preserved alongside the compressed version
Flagged compression is informational only — the certificate is still saved and accessible. Review flagged certificates to ensure content integrity.
Batch upload shows errors for some files
Individual files in a batch can fail independently:
Invalid PDF: Corrupted or non-PDF files are rejected
Extraction failure: AI and regex both failed to extract meaningful data
Duplicate detected: A certificate with the same part number already exists (skipped, not error)
Check Batch History for detailed per-file status, error messages, and confidence scores.
Camera scanner not working
Browser permissions required:
Allow camera access when prompted
Ensure HTTPS connection (camera API requires secure context)
On iOS, use Safari — other browsers may not support the camera API
Camera scanning is not supported on desktop browsers without a webcam. Use the standard Upload page for desktop workflows.