Brazilian taxation, new project, and fiscal classification
Deep study of tax calculations (ST, MVA, IPI, ICMS, DIFAL, PIS/COFINS, CBS/IBS), started a fresh project, and explored TIPI classification.
A full day, focused on tax logic and the start of a new project. I went deep into the Brazilian tax domain to understand how each tax connects to the rest.
Tax calculations
The heaviest block was studying and integrating tax calculation logic into a TypeScript API. I worked with Tax Substitution (ST), Added Value Margin (MVA), IPI, ICMS, DIFAL for interstate operations, PIS/COFINS, and the transition to CBS/IBS under Brazil's tax reform. Each calculation has its own decimal precision rules, and keeping them consistent took careful attention.
I also studied TIPI (the IPI tax classification table) and how product classification connects to tax computation. For now, the focus is on operations in the states of MS and SP, so features like FECOP stayed out of scope.
Fresh project
I started a new project from scratch with a clean stack. I installed frontend skills (shadcn, impeccable.style, frontend design) and created a migration plan from the previous repository, with PRD and specs documented in the new destination.
Domain documentation
I documented the concepts behind each calculator in docs/: what MVA is, how ST works, the relationship between IPI and ICMS, and how the tax reform shifts PIS/COFINS to CBS/IBS. This material serves as a reference for anyone contributing to the code later.
The day reinforced something I already knew: when the domain is dense (like Brazilian taxation), investing time in understanding before coding is worth far more than jumping straight to implementation.