Inspiration
For a small manufacturer, an ISO 9001 audit usually means a week of digging through shared drives, binders, and email threads. An auditor picks a batch, say AB-1042, and asks: which caliper measured this part, and was it in calibration on that day? Answering that one question can take hours, and a single expired certificate becomes a nonconformity. Big companies use expensive QMS suites for this. Shops with 20 to 50 people mostly use spreadsheets. We wanted a tool small enough for a small shop that still holds up when the auditor shows up.
What it does
AuditBench is a shared workspace that follows each piece of evidence from the inspection record to the auditor's sample:
- Assign missing evidence. A quality lead links an inspection batch to its equipment (e.g. digital caliper C-017), names an owner, and sets a due date.
- Upload the original. The operator uploads the calibration certificate with its ID and validity period.
- Review against the original. The lead sees the certificate PDF next to the inspection record. AuditBench only lets a record be approved when the certificate's validity window covers the inspection date:
$$\text{valid_from} \le \text{inspected_on} \le \text{valid_until}$$
- Share verified records. Auditors get a read-only audit room that the lead opens and closes. In it they can search by batch and open approved originals.
Each record moves through missing → review → ready (or returned with a note), and every action is logged as an event, so there's an audit trail for the audit itself.
There are four roles (Administrator, Quality Lead, Operator, Auditor), and each one sees only what it needs. The landing page has isolated demo portals where you can walk one record through every role. Start with batch AB-1042.
How we built it
- Frontend: React 19 + Vite, with Lucide icons. The landing page has an animated Three.js "evidence scan" scene. Certificates are previewed in the browser with pdf.js, and pdf-lib generates the sample certificate used in the demos.
- Backend: One Cloudflare Worker serves both the static site (Workers Static Assets) and the JSON API.
- Data: Cloudflare D1 (SQLite) holds workspaces, users, memberships, records, invitations, and the event log. Uploaded certificates go in a private R2 bucket. The Worker checks role and workspace membership before it streams any file.
- Auth: We built our own. Passwords are hashed with PBKDF2-SHA256 (100k iterations). Sign-in uses a first-party authorization-code flow with S256 PKCE, and sessions live in
__Host-HttpOnly cookies. Login is rate-limited, invite links are tied to an email address, and each account gets a one-time recovery code for password resets.
Challenges we ran into
- Modeling the domain correctly. The hard part of audit prep is not storing files. It's proving that the right certificate was valid on the right date. We had to enforce the date-window check on the server, not only in the UI.
- Access control across four roles. Operators can only upload to records assigned to them. Auditors can only see approved records, and only while the audit room is open. Every API route and every file download needed workspace and role checks.
- Concurrent edits. Records have a version number, so two reviewers can't silently overwrite each other.
- Demos that don't leak. Each demo session gets its own isolated sample workspace, so judges can click around freely without touching real data.
- Rendering PDFs in a Worker-served SPA with pdf.js, while keeping the R2 bucket private.
What we learned
- How ISO 9001 evidence and calibration traceability actually work, and why a tool has to model the date validity of a certificate, not just whether one was uploaded.
- How to build a full-stack app on Cloudflare's edge (Workers + D1 + R2) with no separate server.
- How to implement PKCE, secure cookies, and password hashing using only the Web Crypto API.
What's next
- OCR to pull the certificate ID and validity dates out of uploaded PDFs automatically
- Expiry reminders before equipment falls out of calibration
- Exportable audit packs (a PDF bundle per batch)
- Support for other standards (AS9100, IATF 16949, ISO 13485)