VIFACT · French e-invoicing
An e-invoicing SaaS for the French reform, designed and built alone: Factur-X, UBL and CII invoices validated against the official EN 16931 rules, with LLM-assisted drafting.
Problem
With France’s e-invoicing reform, every company must be able to receive electronic invoices from September 2026, and large and mid-sized companies must issue them; small businesses follow in September 2027. Invoices must use structured formats (Factur-X, UBL, CII), respect the EN 16931 business rules, and go through certified platforms (PDP). Freelancers and small businesses need a tool that gets this right without an accountant checking every invoice.
What I built
- One EN 16931 document model exporting PDF, UBL 2.1, CII and Factur-X (PDF/A-3).
- Fail-closed compliance gate: every invoice is checked against the official EN 16931 and Factur-X XSD and Schematron rules; an invoice that fails cannot be issued, exported or sent.
- LLM-assisted drafting: a free-text request becomes an invoice. Claude produces a JSON draft, Pydantic validates it, and the server recalculates every amount, because an LLM should never be trusted with totals. Rules-only fallback when the LLM is unavailable.
- Rules first, LLM only when needed: OCR → classification → rule-based anomaly detection; Claude is called only for ambiguous cases. Compliance decisions stay deterministic and auditable, and every issued invoice is sealed in a hash-chained audit trail (SHA-256).
- Invoice import: OCR of PDFs and images into draft invoices (Tesseract, PaddleOCR).
- CI/CD: GitHub Actions pipeline with lint, Semgrep SAST, dependency audit and Docker images pushed to GHCR.
- SaaS foundations: Stripe plans, multi-company accounts for accounting firms, MFA, Google sign-in, Electron desktop app.
- Also: assistant chat grounded in a knowledge base (RAG with LangChain and Claude) with personal-data redaction, prototype anomaly detection (Isolation Forest, autoencoder), PDP transmission through a sandbox connector.
In numbers
4
export formats
~680
automated tests
EN 16931
official Schematron validation