Built at SPNX · Oct 2026 – now Live
EU VAT Registration Platform
Sole backend developer · live in production
A staff workspace and client portal that runs EU VAT registrations for overseas businesses — onboarding, documents, e-signatures and country-specific filing steps. I am the sole backend developer.
Built for: Overseas businesses registering for EU VAT, and the operations team that manages their filings.
↓ Scroll to explore the problem, architecture and stack
The problem
Registering for VAT across EU countries means a different process, document set and rule set for every country. Tracking that through emails and spreadsheets is slow, error-prone and hard to audit.
Why it matters
Each country’s process lives in a versioned workflow engine, so new rules ship as data, every action is audited, and staff and clients always see exactly what they can do next — with security strong enough to pass three independent audits.
What you can do with it
How it’s built
A simplified view of the architecture — follow the dots as a request moves down the layers.
A request, step by step
- A user signs in with Microsoft Entra ID; a Postgres-backed session with CSRF protection is created.
- Each request is checked against the user’s role and the case’s current workflow state.
- The workflow engine loads the country’s versioned rules and decides which actions are allowed next.
- Changes are saved with optimistic locking (ETag / If-Match) and an audit entry in the same transaction.
- Side effects — emails, e-signatures, virus scans — are queued in the transactional outbox and run by the worker.
- The React frontend calls the API through typed clients generated from the OpenAPI contract.
Tech stack
What I built
- 244 REST endpoints across 34 NestJS modules and 63 database models (PostgreSQL 17 + Prisma 7).
- A data-driven workflow engine that runs each country’s registration process as versioned data — the same rules decide which actions each user can take.
- Microsoft Entra ID (OIDC) sign-in, Postgres-backed sessions with CSRF protection, and role-based access with 4 roles and 21 permissions.
- Azure Blob Storage, Azure Key Vault (AES-256-GCM for stored credentials), ClamAV / Defender virus scanning, Microsoft Graph email and Adobe Acrobat Sign — each behind a clean adapter.
- A background worker on a Postgres transactional outbox that runs 15 scheduled jobs without Redis or a separate queue.
- An append-only audit log written in the same transaction as every change, optimistic locking (ETag / If-Match), idempotency keys and RFC 9457 error responses.
- A published OpenAPI contract the React team uses to generate typed API clients.
- Passed 3 rounds of external security testing (VAPT); 63 Jest test files and a 24-suite end-to-end API harness.
Hard problems & how I solved them
✅ The workflow engine runs each country’s process as versioned data, so rules change without code changes — and the same rules drive permissions.
✅ Idempotency keys, optimistic locking with ETag / If-Match, and standard RFC 9457 error responses.
✅ A Postgres transactional outbox runs 15 scheduled jobs — no Redis or separate queue needed.