InvoiceLab / Development case study
One document.
Several ways out.
German service-invoice authoring with shared document contracts, layout previews, and specialised export paths.
The document has to stay coherent.
InvoiceLab focuses on German service-invoice authoring. Its first-release scope is deliberately narrow: a single operator, EUR, and standard 19% VAT. Sending invoices, teams, and broader SaaS workflows are outside that scope. Narrowing the product gives the document pipeline a clear contract to work against.
The central problem is consistency. Customer details, references, service line items, tax amounts, and payment metadata need to remain coherent as the same invoice moves through authoring, preview, and export. A good-looking PDF alone is not enough; the structured representation and the rendered result must agree.
One normalised document contract.
I structured the workspace around a web authoring interface, an authenticated gateway, a renderer service, and a shared document-contract package. The React and Vite web app owns editing and preview orchestration. The gateway verifies the caller and signs internal renderer requests. The Chromium-backed renderer owns the output pipeline.
The shared package supplies document contracts, starter themes, compliance helpers, and compiler utilities. Keeping those concerns shared reduces the chance that an editor, template, and exporter each introduce slightly different rules for the same invoice. A template can change the presentation without becoming a separate source of financial truth.
Preview is part of the workflow.
Curated DIN-style layouts give the operator a way to inspect the document before export. Layouts are driven by the same normalised payload, rather than by separately maintained invoice copies. The point of the preview is to make consequential information visible while it is still easy to correct.
The implementation includes PDF, ZUGFeRD PDF/A-3, and XRechnung XML export paths. Those labels describe supported output paths; they are not a blanket legal certification. The appropriate validation depends on the document, export profile, and receiving system.
Verify the contract, then the surface.
The repository documents unit and integration coverage alongside mock browser tests for desktop, mobile, and tablet layouts. Deterministic mock rendering produces repeatable preview and export coverage without relying on a private live backend. README imagery is generated from that representative flow.
This boundary is useful when reviewing document software: a renderer can be tested against a stable payload, while the interface can be tested against predictable results. Neither check replaces inspection of the final artifact, but together they make failures easier to locate.
Current status.
InvoiceLab remains local/development software. Cloudflare release entry points and later-stage environments are parked in its maintained operating contract. The public hostname currently presents a sign-in screen, so it is intentionally not linked as a usable portfolio demo.
The main lesson is to keep the business document independent of its presentation. That makes layout work, structured output, and verification part of one system rather than a collection of loosely connected export buttons.