DocketFlow
A Document Intelligence Workflow for Invoices, Contracts and Forms, with Human Review
A concept study: we worked up this product, its architecture and its screens as an example of how we would approach it. The screens use fictional demo data and are design concepts, not screenshots of a live product, and this is not a client project.

About the Project
DocketFlow is a design concept for a document intake platform used by accounts payable, procurement and legal operations teams. Invoices, contracts and forms arrive by email, upload, shared folder or API in many layouts and several languages. Staff retype them into an ERP (enterprise resource planning) system or a contract tracker, and typing errors, duplicate invoices and wrong tax numbers follow.
The concept treats reading a document as a pipeline with gates. A layout parser and a language model fill a typed schema, and plain rules decide what passes: totals must add up, GSTIN (Goods and Services Tax Identification Number) values must pass a format and check digit test, and a changed bank account is held. Anything the rules cannot settle goes to a review screen that shows each value beside the exact box on the page it came from.
Every decision is kept. The audit trail stores the page box, the rule results, the model version, the edit and the approver for each field, and it can be exported. A person edits the rules in a rule studio and replays them on saved cases before publishing. Every human correction becomes a saved case, so a new model version has to pass them before it goes live.
Why This Matters Now
Market, rule and technology context for this kind of product, checked on 16 November 2026. Each item names its source.
- The Indian GST notification dated 26 Oct 2026 extends e-invoicing to reverse-charge self-invoices from 1 Jan 2027 for recipients above Rs 5 crore turnover, as reported by TaxGuru (secondary source).TaxGuru, 28 Oct 2026
- Google's Document AI release notes list a preview custom extractor on Gemini 3.1 Flash Lite that supports fine-tuning, with ML processing in US and EU regions.Google Cloud Document AI release notes, 21 Sep 2026
- PromptArmor reported that a PDF with white-on-white hidden text could hijack Atlassian's Rovo agent into leaking Jira and Confluence data, as reported by The Decoder (trade press).The Decoder, 10 Aug 2026
- Law firm AZB reports the DPDP Rules phase in over time, with notice, consent and data fiduciary duties due from 13 May 2027 (secondary source).AZB & Partners, 19 Nov 2025
Requirements & Objectives
- Take in documents by email, browser upload, API call and a watched folder, and open a tracked case for each one.
- Split a bundle of pages into separate documents and label each one as an invoice, contract, purchase order or form.
- Read each document into a typed schema, with line items, dates, tax numbers and amounts kept as structured values.
- Check every value with written rules: totals against lines, GSTIN format and check digit, plausible dates and changed bank details.
- Hold a possible duplicate invoice, and a document whose bank details differ from that vendor's history, before anything posts.
- Show each field beside the page box it came from, with a confidence score and a pass, fail or check result.
- Route each case to a queue by amount, vendor, type or risk, with a second approver where policy asks for one.
- Keep an append-only audit trail per field and let a read-only auditor search and export it.
The Engineered Solution
1A pipeline with gates, not a single guess
Each document is split, classified, parsed, extracted into a schema and checked by rules. It posts only when the rules pass or a named person confirms the fields.
2Evidence beside every value
The review screen draws a box on the page image around the source of each field. The reviewer checks a claim against the page instead of hunting for it.
3Rules finance staff can read
A process owner edits rules in plain terms, replays the draft on saved cases, reads the diff against the live version and publishes it. The model proposes values and the rules decide what passes.
4A record an auditor can follow
For each field the log keeps the page box, the rule results, the model and prompt version, the edit and the approver, each with a time and a name.
Design Concept Screens
Design concepts with fictional demo data. They show how the product could look and work, not a live release.
01 / 05 Intake overview - see what arrived from each channel, what waits for a person and what was held before posting
Engineering Process
- Collect sample invoices, contracts and forms from finance, procurement and legal staff, and map how each one is handled today.
- Define a typed schema and a first rule set for each document type, with the people who own those rules.
- Prototype the intake overview, the review screen and the approver phone view, and test them with clerks on real, consented samples.
- Build intake, parsing and schema extraction behind one parser interface, with Zod checks on every model output.
- Build the rule engine, duplicate hold, rule studio and the replay harness that runs saved cases on every model, prompt or rule change.
- Add routing, approvals, the append-only audit log, exports and a posting adapter for one ERP, with safe retries.
- Test with large batches and crafted files, run a security review, set retention rules and pilot with one team before wider use.
Production Tech Stack
| Layer / Component | Production Technologies |
|---|---|
| Web app | Next.js (App Router)TypeScriptTailwind CSSshadcn/uiPDF.js with an overlay layer for field boxesTanStack Table |
| Backend | Node.js and TypeScript API with a separate worker serviceZod validation on requests and model output |
| Document reading | Google Document AI or Amazon Textract behind one interfacethen a Claude or Gemini model with schema-constrained outputrun from a Python FastAPI service |
| Database | PostgreSQL on Supabase with row-level securityan append-only audit table and pgvector for matching vendor layouts |
| Integrations | Gmail and Microsoft Graph mailbox connectorssigned webhooksCSV and JSON exportERP adapters with idempotency keys |
| Cloud | Vercel for the web appcontainerised workers on AWS ECS or Google Cloud Runan S3-compatible bucketGitHub ActionsSentry and OpenTelemetry |
What the design aims for
DocketFlow aims to corroborate every value read from an invoice or contract against its page evidence and written rules before the value reaches the ledger.







