Skip to content

HenryCordes/paperwork-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paperwork

CI License: view-only  

TypeScript React Node.js Express MongoDB Redis AWS S3 Anthropic Claude Jest

Bookkeeping and tax administration for small-business owners in the Netherlands.

🔗 paper-work.nl — live and in active use.

Paperwork helps freelancers and small-business owners stay on top of their bookkeeping and Dutch tax admin without leaning on an accountant for the everyday: registering clients and contact moments, capturing invoices and expenses, and preparing the figures needed for VAT (BTW) filing — quickly and reliably.

I designed and built Paperwork end to end — product, architecture, backend, web frontend and native mobile app — as part of my independent practice, Dev Artist.

Portfolio note. This is a public, read-only snapshot of a private production codebase, published as a work sample. It is source-available for viewing only — see LICENSE. Secrets, deployment config and customer data are not included.

Dashboard

Paperwork dashboard

Invoice

Invoice details

What it does

  • Register clients, contacts and contact moments
  • Create, brand and send invoices
  • Capture and organise expenses, with document storage on S3
  • Scan receipts and invoices with LLM-based extraction — vendor, date, VAT breakdown, totals and line items (see below)
  • Quarterly BTW (VAT) pre-check — an AI-assisted review of each quarter ahead of the filing deadline (see below)
  • Dashboard reporting via scheduled aggregation jobs
  • Prepare the numbers needed for Dutch tax administration

AI features

Two production features pair large-language-model reasoning with deterministic guardrails. Both sit behind feature flags, are multi-tenant-scoped, and are covered by their own evaluation harnesses.

🧾 LLM invoice & receipt extraction

Upload a photo of a receipt or invoice and a multimodal LLM returns structured fields — vendor, date, currency, subtotal, per-rate VAT breakdown, total and line items — each with a confidence score. The model output is never trusted blindly: a lightweight arithmetic & domain-validation layer cross-checks line items against the subtotal, subtotal + VAT against the total, VAT-rate plausibility against Dutch rates, and date sanity, flagging anything that needs human review. Extraction is read-only; the user reviews and edits before anything is persisted.

Demo — AI receipt scan:

Receipt.scan.mp4

Design: specs/2026-06-27-llm-invoice-extraction/design.md · hardening pass

🔍 Agentic BTW pre-check

Ahead of every quarterly VAT deadline, Paperwork reviews the tenant's quarter for filing risks. Three checks are deterministic (plain code, no LLM): missing documents, VAT arithmetic/rate errors, and likely duplicates. A fourth — history anomalies — is an agentic LLM investigation: the model is given four read-only, tenant-scoped tools (quarter summary, vendor history, expense and invoice listings) and compares the quarter under review against prior quarters to surface what fixed rules can't — a recurring vendor that vanished, a spending spike, a suspiciously quiet month.

Security is designed in: tenantId is bound to each tool at construction and is never a model-suppliable parameter, so the agent has no channel to reach another tenant's data. Reports are delivered over each user's chosen channel (email / push / in-app).

Design: specs/2026-07-04-btw-precheck/design.md

Built with

  • Frontend: React · TypeScript
  • Backend: Node.js · Express · MongoDB · TypeScript
  • Infrastructure: Redis (caching + background job queues) · AWS S3 (document storage)
  • AI: Anthropic Claude — multimodal extraction (Sonnet) and agentic tool-use (Opus), behind feature flags with eval harnesses
  • Mobile: Ionic React · Capacitor native app — paperwork-app-public
  • Engineering: TDD, clean architecture, queue-based background processing, multi-tenancy, CI/CD

Architecture & engineering

Deeper write-ups live in docs/:

Selected engineering decisions are documented as dated design specs in specs/ — including the TypeScript migration, the per-area Husky hooks, server/client test-coverage strategy, and the two AI features above.

Engineering practices

  • Test-driven. Fast server suite (Jest · Supertest · mongodb-memory-server) split into unit and integration runs with coverage thresholds, plus a client suite (React Testing Library). Each AI feature ships with its own eval harness scoring accuracy against real records.
  • Per-area Git hooks (Husky). pre-commit formats, lint-fixes and typechecks only the area you touched; pre-push runs the test suite(s) for whatever changed — server, client, or both.
  • CI (GitHub Actions). Every push and PR runs parallel server and client jobs: typecheck, lint, format-check and tests.
  • Fully typed end to end, multi-tenant by construction, with feature-flagged rollout of the AI features.
Running locally (for reference — this is a view-only snapshot)

Prerequisites: local MongoDB and Redis instances.

Environment — create config/config.env (nothing is committed):

PORT=5001
NODE_ENV=development
MONGO_URI=mongodb://127.0.0.1:<mongoport>/<databaseName>
JWT_SECRET=<your secret>
JWT_EXPIRES=<your jwt expires>
COOKIE_EXPIRES=<your cookie expires>
TINYMCE_API_KEY=<your tinymce api key>
MOLLIE_API_KEY=<your mollie api key>
AWS_ID=<your aws id>
AWS_SECRET=<your aws secret>
AWS_DOCUMENT_BUCKET_NAME=<your aws document bucket name>
AWS_REGION=<your aws region>
MJ_APIKEY_PUBLIC=<your mailjet public api key>
MJ_APIKEY_PRIVATE=<your mailjet private api key>
EMAIL_FROM=<your email from>
MOLLIE_PAYMENT_SUCCESS_PAGE=http://localhost:3000/payments/success
MOLLIE_WEBHOOK=http://localhost:3000/api/payment/mollie/webhook
ANTHROPIC_API_KEY=<your anthropic api key>
LLM_PROVIDER=anthropic
LLM_INVOICE_EXTRACTION_ENABLED=false
ANTHROPIC_EXTRACTION_MODEL=claude-sonnet-4-6
BTW_PRECHECK_ENABLED=false
ANTHROPIC_PRECHECK_MODEL=claude-opus-4-8
BTW_PRECHECK_LEAD_DAYS=14

Install & run: npm install in the root and in client/, then npm run dev from the root and open http://localhost:3000.

Test: npm test (server) · cd client && CI=true npm test -- --watchAll=false (client) · npm run test:coverage for coverage.

Status

Live and in active use at paper-work.nl.


Built by Henry Cordesdevartist.nl · LinkedIn

Source-available for viewing and evaluation only. Not open source — see LICENSE.

About

Bookkeeping & tax automation for Dutch small businesses — web/backend. React · Node · MongoDB · Redis · AWS · Heroku .

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors