Tax rules formulas engine
A versioned DSL where squads authored tax formulas for each state and scenario.
Corporate project, code is confidential.
Tax rules formulas engine
This is a corporate project. Due to confidentiality agreements, source code, real data, and sensitive details cannot be shared. The content below focuses on technical challenges, architectural decisions, and key learnings from the project.
Context
Finance squads needed to adapt taxes per state without waiting for the platform team. The legacy workflow demanded fresh deploys and hours of manual QA for every tweak.
Problem
Rules lived in spreadsheets and ad-hoc scripts. Urgent changes required syncing multiple stakeholders and mistakes happened whenever teams copied logic between customers.
My role
I designed a versioned TypeScript DSL and a visual builder that guided analysts step by step. Alongside tax specialists we cataloged every operator, validation and audit requirement.
Technical challenges
- Previewing the impact of new rules before shipping.
- Guaranteeing traceability between versions and reviewers.
- Executing formulas in isolation with CPU and memory limits.
Decisions and solution
I implemented a compiler that translated the DSL into pure functions with static checks. Each version was stored in DynamoDB with human-friendly diffs and digital signatures. Tests ran on Node.js workers using the exact engine that would power production.
Result/Impact
Release time dropped from days to minutes and fiscal support tickets fell by 70%. Auditors started consuming automatic reports fed by structured logs.
Stack
- TypeScript
- Node.js workers
- DynamoDB + S3 versioning
- Playwright smoke tests for the builder