Certificate of Analysis Generator: Sign Off Every Batch with Confidence
Pull each batch's lab results, auto pass/fail every property against its spec, draft the Certificate of Analysis, and block release on any out-of-spec result — until your QC manager reviews, signs, and releases the CoA PDF that ships with the product.
An internal web tool where you select a batch, pull its lab results, auto-grade every tested property against its spec range, draft the Certificate of Analysis, let your QC manager review and sign — with release hard-blocked if anything is out of spec — and export a formatted CoA PDF plus a release record.
Before you start
- A Supabase account (free)
- A Vercel account (free)
- A test-results export you already have: a CSV/Sheet of lab results per batch (property, method, spec min/max, result)
- Your product spec sheets and the CoA layout you ship today
- Claude Code or any AI coding agent
The problem this kills
Every batch that ships needs a Certificate of Analysis — the document that says, property by property, what you tested, what the spec range is, what the lab actually measured, and whether it passed. Your customers' receiving docks won't accept the product without it, and your own quality system requires it on file.
Today, building one is a copy-paste minefield. A tech opens last batch's CoA, swaps in the new lot number, and hand-types each result off a lab printout — pH, viscosity, assay, moisture, whatever the product needs. One transposed digit and you've certified a number you never measured. Someone has to remember the right spec range for this product, eyeball each result against it, and catch the one value that's just outside. And the worst failure mode of all: a batch that's actually out of spec gets a "pass" CoA and ships anyway, because the check was a tired human at the end of a long day.
You don't need a six-figure LIMS to fix this. You can build the CoA generator yourself, this afternoon — and bake the out-of-spec block right into it.
What you'll build
An internal web tool your QC lab logs into. You import your lab results per batch — every tested property with its method, units, spec min/max, and the actual result — plus the product, customer, and lot details. You pick a batch, and the tool does the grading: it lines each result up against its spec range and stamps pass or fail automatically, with the method and units kept on every line.
If everything passes, the tool drafts a clean, formatted Certificate of Analysis. If anything is out of spec, release is hard-blocked — the batch can't be certified until someone with authority records a disposition (rework, re-test, concession, or reject). Your QC manager reviews the draft, sees the math on every line, and signs. Only then does the tool export the CoA PDF that ships with the order, plus a release record for your files. It even handles the messy reality: duplicate-batch guards so the same lot can't be certified twice, properties with a min-only or max-only spec, and a "no LIMS" path that runs entirely on the CSV you already export.
What's inside the Implementation Plan
The downloadable plan is a single markdown file you paste into an AI coding agent. It opens by interviewing you about your own QC process — what you call a batch vs. a lot, the exact properties and units you test, how your spec ranges are written, your sign-off chain, and your out-of-spec disposition rules — and then it reads a short spec back for your thumbs-up before it builds anything. That's the difference between a CoA shaped to your products and a generic template you have to wrestle into compliance.
From there it walks the agent through the data model (products, specs, batches, test results, certificates), the importers, the duplicate guard, the pass/fail grading engine, the out-of-spec release block, the CoA draft, the QC-manager sign-off gate, and the PDF + release-record export. Every step ends with a ready-to-copy prompt. There's a full "No API yet?" path: import a test-results CSV, export a formatted CoA PDF — and you never have to touch your LIMS API to ship.
The governance it includes (this is the point)
In QC, the controls are the product — auditors will ask. The plan builds them in: a login so only your lab and quality team can use it; row-level security so each organization only ever sees its own batches and certificates; a complete audit trail of who imported, graded, signed, and released, and when; a hard human-in-the-loop sign-off gate so no CoA is released until your QC manager reviews and signs; and a duplicate guard (on product + batch/lot number) so the same lot can't be certified twice. And the critical one: any out-of-spec property physically blocks release until a disposition is recorded by someone with authority. That's the audit story your quality manager and your customers' auditors want to hear.
Who it's for
QC lab technicians, quality coordinators, and the shipping team in batch-process plants — chemical, food, cosmetic, nutraceutical, coatings, or any material product that ships with a CoA. If you can explain to a new hire how a batch gets tested, graded against spec, and released, you can build this — no developer required.
You've got this — open the plan, paste the first prompt, answer a few questions about how your lab actually runs, and you'll watch your first batch grade itself and draft its own certificate.