FAIR Checker
FAIR Checker is a web app I built for a precision machine shop's quality team. It reviews First Article Inspection Reports (FAIRs) against their supporting certs and inspection data, flags what's wrong, suggests the fix, and produces the signed, customer-ready report.
The Problem
A FAIR is the paperwork that proves the first part off a new production run matches its design. In aerospace it follows the AS9102 standard: three forms covering the part's identity, its materials and special processes, and every measured characteristic, each backed by mill certs, finishing certs, and inspection reports.
Reviewing one by hand means cross-checking dozens of fields across those forms and a stack of PDFs. The typical mistakes are small and easy to miss: a lot number with two digits swapped, a spec typed as AMS 4072 instead of AMS 4027, a measured value copied wrong, a blank date. Each one can bounce a report back from the customer.
The goal was a tool that does the cross-checking, shows the reviewer exactly where each problem is, and makes fixing it a click instead of a hunt.
The Workflow
A review moves through five steps, mirroring how the shop already works: one person prepares the FAIR, and a second reviews and approves it.
1. Pull the job. Search Google Drive by job number. The tool finds the FAIR spreadsheet and every cert and report in the job folder and pulls them in. Uploading files by hand still works too.
2. Process. In the background, the tool reads all three forms, reads each cert, and runs the checks. A few minutes later the review is ready.
3. Review. Findings appear in a list, sorted into what needs attention and what's just a note. Clicking one shows the FAIR and the source document side by side, with the problem highlighted in both. The reviewer accepts the suggested fix, writes their own, or rejects the finding.
4. Sign. The preparer signs Field 20 and the approver signs Field 22, each with a stored signature. By default, export stays locked until two different people have signed.
5. Export. One click produces the corrected Excel file and a PDF that matches the shop's FAIR template, with both signatures placed beside the printed names. Corrections can optionally be written back to Drive.
How It Works
Rules do the checking, and AI and OCR read the documents. The backend extracts Forms 1 through 3 by their labels, has Claude read the values off each cert while local OCR finds where those values sit on the page, runs the AS9102 rules engine, and uses AI to judge free-text fields only. Every finding comes from the rules engine, and the reviewer approves each fix before anything is signed or exported.
What the Reviewer Sees
Three panes: the findings, the FAIR itself, and the source document. Everything is built around one idea: never make the reviewer go looking for the evidence.
Plain-language findings. Each card says what's wrong in one sentence, like a lot number that doesn't appear on the cert for its PO. A "More detail" toggle opens the full reasoning, plus the AI's commentary when it has any.
The evidence, highlighted. Selecting a finding highlights the exact cell in the FAIR and the exact text on the cert or inspection report. Clicking any FAIR cell jumps to that fact in its document.
Suggested fixes with a live preview. Corrections come from the documents themselves, like the lot printed on the cert or the value the inspection report measured. Picking one previews it in the FAIR cell before anything is saved.
Choices where the answer is ambiguous. An out-of-tolerance result can mean a copying mistake or a real nonconformance. The reviewer picks "result recorded wrong" or "add the NCR," and the edit box changes to match.
Linked findings. When two findings are really one typo seen from both sides, they point to each other, and fixing one closes both.
Everything reversible. Hand edits are marked and can be undone. Resolved findings collapse into a list that stays available for reference.
Design Decisions
Rules first, AI second. The core is a deterministic rules engine that encodes the shop's real review standards: cross-form consistency, tolerance checks, cert-to-FAIR matching, sequence gaps, and missing sign-offs. AI only handles what rules can't, like judging whether a written explanation is adequate. When both flag the same problem, they merge into one finding.
Exact highlighting, not guesses. Early versions relied on an AI model's estimate of where a value sat on a scanned cert, which was often a line off. Now each scanned page is read locally with OCR, the actual words are found, and the highlight is drawn on them. Those positions are saved, so each document is only read once.
Tuned to cut noise. A reviewer stops trusting a tool that cries wolf. Conditions that are normal for this shop, like a mill cert covering several material lots or a typed name awaiting signature, aren't flagged. A value sitting exactly on a tolerance limit gets a small marker on the cell instead of a finding card.
Careful with controlled data. Engineering drawings are export-controlled and are never uploaded or processed, and every review's scope notes say so. Accounts, reviews, and signatures stay on the shop's own computer.
Two-person sign-off by default. Export requires signatures from two different people, the preparer and the approver. The requirement can be switched off for a single FAIR when needed.
Tech Stack
Web app: React and Vite, for the review screen, sign-off, export, and settings.
API server: Python and FastAPI, running the pipeline and serving the app on the shop network.
Rules engine: Python, for the deterministic AS9102 checks.
Cert reading: Claude vision (Anthropic API) pulls lot, spec, and PO values off cert images.
Text locating: RapidOCR (running locally) and pdfplumber find the exact words on scanned pages for highlighting.
AI review: Claude (Anthropic API) judges the free-text fields the rules can't.
PDF export: openpyxl, ReportLab, and pypdf draw the corrected workbook as the shop's template, signatures included.
Storage: SQLite and SQLAlchemy for reviews, edits, sign-offs, and accounts.
Integrations: Google Drive API for job search and pull, plus optional write-back.
Testing and Status
An automated suite of 180 tests covers extraction, every rule, export, and the API, and runs on every change.
The most useful testing has been on real jobs. Each new FAIR run through it has surfaced something: a multiplier like "4X .0799" misread as 4.0799, form fields that shift when a part list grows, spreadsheets with tabs named Sheet1 instead of FORM 1. To test the fix suggestions, I seeded a copy of a real FAIR with six deliberate mistakes. The first run caught three of them. The gaps it exposed were fixed, and now all six are caught, each with the correct fix suggested.
It runs on the shop's network and is being trialed on live jobs. Next up: a side-by-side trial on 10 to 20 jobs reviewed both by hand and by the tool, and checks for sub-tier FAIR and SPC requirements.