In production Python Automation REST APIs

Automation Systems

A tax rule engine separated from document generation — so a regulation change doesn't force touching the output code.

Small businesses lose hours weekly to manual, repetitive administrative work — invoice creation, tax rule application, document generation — with human error scaling linearly with volume.

Built initially as an internal tool for a real operating business, which forced the system to handle actual edge cases (different client tax categories, legal mention requirements) instead of a simplified demo case.

Tax rules (VAT/IVA, IRPF, legal mentions) had to be applied correctly and consistently with zero manual override in the common path — any automation that "mostly" gets tax right is worse than no automation.

Classification and rule application are separated from document rendering, so tax logic can be updated without touching output formatting, and vice versa.

Automation Systems architecture diagram Intake client/doc Classification client type Rule engine VAT / IRPF / legal Generation PDF Store records

Client/document intake → classification engine → tax rule engine (VAT/IRPF/legal mentions) → PDF generation → structured record store.

Python for the rule engine and document generation — chosen for fast iteration on business logic and strong PDF/document tooling, versus a heavier web stack that wasn't needed for an internal tool.

Modeled the client/tax taxonomy first (what categories exist, what rules apply to each) before writing generation logic, since getting the taxonomy wrong would have propagated errors into every document.

Rule-engine-first vs. hardcoded per-client-type branches

Adding a new client category or tax rule change doesn't require touching the generation code.

Initial version coupled classification too tightly to generation; a tax-rule change forced touching both layers. Refactored into the current separated architecture after the first real rule change proved painful.

Automation for regulated processes (tax, compliance) needs the same "correctness over speed" discipline as user-facing compliance software — this is where the lessons from Veridico and this project reinforce each other.

In internal production

Automated invoice generation, tax calculation, and PDF output for a real business, removing manual document handling from the admin workflow. Volume and time-saved figures will be added here once consolidated — the system runs in production today, but I won't invent an improvement percentage.

Extending the same automation engine pattern (classification → rule engine → generation) to Google Workspace/Gmail workflows and OpenAI-assisted document processing for B2B clients.