01Overview
A packaging label generator that checks labels against regulation (GS1 retail barcodes, GHS chemical hazard labels, and US FDA food labels) and cites the rule behind every finding. Claude reads photos of existing labels; a deterministic rule engine does the judging. It also runs an MCP server so AI assistants can check labels directly, using the same rules.
02Key features
- Label editor with a live preview that matches the exported PDF exactly
- 36 rules across GS1, GHS, and US food labeling, each finding linked to its regulation
- Click a finding to highlight the part of the label it refers to
- Photo audit: Claude vision reads an existing chemical label into typed fields; a person confirms each one
- Public MCP server at
/mcpwith 4 read-only tools (check_label,list_rules,ghs_statement_text,check_gtin)
03How the AI works
"The LLM reads. The rule engine judges." No verdict or citation comes from a model.
- Claude Opus 5.5 reads a label photo into a Zod-validated schema with a confidence score per field.
- Hazard codes are checked against verified tables, and a person confirms each field.
- Only then do the deterministic rules run.
- The MCP tools let assistants like Claude check labels with the same rules.
04Tech stack
- AI
- Claude Opus 5.5 (vision, structured output), Anthropic SDK, MCP TypeScript SDK
- Frontend
- Vue 3, TypeScript, Vite, Pinia, Tailwind CSS v4
- Backend
- Node.js, Express 5, Zod 4, PDFKit, bwip-js (barcodes)
- Data
- MongoDB Atlas, Mongoose
- Infra
- Docker, AWS ECS on EC2, GitHub Actions, Vitest, Playwright
05Architecture
Label editor
- Label form
- Layout engineShared core package
- SVG preview and PDF exportBoth from the same layout
- 36 rulesRun on the resolved geometry
- FindingsEach with its citation
Photo audit
- Upload
- Rate limits
- Claude visionTyped fields with confidence
- Schema validationZod
- Person confirmsThen the same rules run
06Results and evals
| Measure | Without tools | With tools |
|---|---|---|
| Sonnet: defects caught, of 30 | 27 | 30 |
| Sonnet: false clearances | 2 | 0 |
| Sonnet: answers with a wrong citation, of 36 | 33 | 20 |
| Haiku: defects caught, of 30 | 5 | 21 |
| Haiku: answers with a wrong citation, of 36 | 36 | 7 |
12 labels with planted defects, 144 conversations, $5.28. Later fixes brought Haiku with tools to 35 of 36. A photo read takes about 5 s and costs at most $0.11. 3,054 unit and 95 browser tests.
07Decisions and lessons
- Guardrail in the schema. Moving a guardrail from the prompt into the tool schema removed false clearances the prompt fix couldn't.
- Judging its own drawing. The engine once assumed a default label size. It now declines checks on values nobody stated.
- Withhold the pass. A pass is withheld when a figure can't be verified.
- Security fix. A worst-case check went from 308 s to under 1 s.
08Screenshots

