Skip to content
06 / 08

Paušal

A rules engine for a Croatian paušalni obrt (flat-rate sole trader): contributions, the flat-rate tax, deadlines and the receipts limit, worked out from one checked file of the year’s rates.

Croatian flat-rate sole traders · 2026 · Python, SQLAlchemy, SwiftUI

Web demo live · the app in development

The calculator, in Croatian: a fictional obrt with 24,000 € of receipts in 2026, its razred, tax and contributions.
Problem
Everything a flat-rate trader owes follows from figures that are republished each year, so none of them is written into the code, and every amount worked out from them stays an estimate until a rješenje confirms it.
Built
Each year’s rates in one file, the published figures recomputed when it loads · Contributions, the flat-rate tax, deadlines and the receipts limit · Every amount an estimate until a rješenje replaces it · A web demo with a calculator and an app walkthrough · Bank statement import with a review queue · An iPhone and Mac app, Što dugujem, in development
Stack
Python 3.12 · SQLAlchemy 2 (SQLite) · pytest · uvicorn · Swift and SwiftUI for the iPhone and Mac app
Status
The web demo is live, in Croatian and English. The iPhone and Mac app and the command line for bank statements are in development; no real bank export has been tried yet.

The problem

A paušalni obrt, Croatia’s flat-rate form of sole trading, has few obligations, but each one is exact: contributions, monthly when the obrt is the main occupation; the flat-rate tax by quarter; the PO-SD return by 15 January; and a ceiling on receipts. Each amount depends on the year’s published rates, on the razred the receipts fall into, and on how many months of the year count.

It starts with one obrt, with room for more later: every record is kept per client.

What I built

A rules engine. Every figure that changes from year to year lives in one rates file, and none is written into the code. When the file loads it is checked: a malformed entry is rejected by name, and the published figures are recomputed. Money is kept as exact decimals and rounded per component, never on a sum. Every amount is marked as an estimate until an amount from a rješenje, the Tax Administration’s decision, replaces it.

On top of it sit three things. A public web demo, with a calculator and a walkthrough of the app, which stores nothing: no database, no cookies, no trackers. It says on every page that its amounts are estimates from published rates, not tax advice, and that a rješenje always takes precedence. An iPhone and Mac app, Što dugujem (“what do I owe”). And “Money in”, a command line that imports bank statements: an inflow becomes a receipt only when it matches exactly one open invoice, or when I decide, and everything else waits for review.

Next

The app and the bank import are still in development, and no real bank export has been tried yet. The figures for 2027 will go into their own rates file once they are published; until then, a calculation for 2027 is refused rather than guessed.

The interface

Paušal — The app walkthrough (Prikaz aplikacije): the next payment, the payment details for one contribution, and the year.
The app walkthrough (Prikaz aplikacije): the next payment, the payment details for one contribution, and the year.
Paušal — The payment calendar (Kalendar plaćanja): every contribution and tax payment of the year, with its deadline.
The payment calendar (Kalendar plaćanja): every contribution and tax payment of the year, with its deadline.
Paušal — The privacy notice: the demo keeps nothing that is typed into it and sets no cookies.
The privacy notice: the demo keeps nothing that is typed into it and sets no cookies.

Next case study

BTC Lights →