Auditable tax optimisation for France and Portugal, powered by legal constraints
Optimizorrrr translates the mechanical parts of French and Portuguese personal tax law into explicit, versioned constraints. Users define their household, possible tax residences, salary, dividends, interest, capital gains, income sources and validated eligibility for regimes such as IFICI. The engine calculates or optimises admissible multi-year strategies, applying domestic taxes, social contributions, withholding taxes and treaty credits. It then ranks the lowest-cost alternatives and explains each result through assumptions, effective rates, warnings and source-linked rules. Interpretative legal questions remain explicit human-validated scenarios rather than AI guesses. A visual 2026 calculator also lets users instantly compare France, ordinary Portugal and qualified IFICI outcomes. The project is a decision-support tool, not legal or tax advice.
The core is a typed Python application with Pydantic models for financial facts, legal qualifications and versioned tax-rule snapshots. Deterministic calculators apply French and Portuguese tax brackets, social contributions, withholding taxes and treaty credits. Multi-year structuring is formulated as a mixed-integer optimisation problem and solved with SCIP through OR-Tools, while Z3 checks important invariants and verifies that reported strategies satisfy the encoded constraints. FastAPI exposes calculation, optimisation, verification and rule-snapshot endpoints.
The frontend is built with React, Next.js and vinext for a Cloudflare-compatible runtime. It provides responsive inputs and recalculates a focused 2026 France–Portugal comparison directly in the browser. The complete Python engine remains the reference for multi-year optimisation and audit trails. Automated tests cover tax calculations, API behaviour, solver constraints and server-rendered frontend output; CI validates both the Python and TypeScript stacks.

