
TarazuVakil — Money Desk for Law Offices
Lawyers in Iran usually track fees in notebooks and spreadsheets, then rebuild the same numbers for the tax office at the end of the year. In TarazuVakil a lawyer records a contract once — client, tariff fee, agreed fee, number of instalments — and the app builds the rest: the instalment schedule, the 5% Article 103 stamp calculated on the tariff rather than the agreed fee, and that year's tax estimate. Money a client hands over for court or expert costs is kept in a separate trust ledger and never counts as income. Bank and card-terminal statements can be imported and matched to open instalments, and an accountant gets a separate read-only seat instead of the lawyer's password.
// Architecture
A single FastAPI service with server-rendered Jinja2 and HTMX pages, right-to-left throughout, on PostgreSQL 16 with Alembic migrations. Code is layered routes → services → models → adapters; SMS, payments and the Moadian tax system sit behind interfaces with mock implementations, so the app runs and is tested without any keys. Money is stored as integer rials, every query is scoped to the lawyer, and financial records are voided, never deleted. Tax rules, the official fee tariff and the Moadian error codes are kept as dated data, with a source and a confidence flag for each figure.
// Key capabilities
One entry, the whole chain
Saving a contract creates its instalments, its stamp and its effect on the tax estimate in one transaction; amounts are split so no rial is lost to rounding.
A tax estimate you can follow
Collected fees, minus deductible office expenses and the Article 101 exemption, taxed on the Article 131 brackets, minus stamps already paid — line by line, with a printable declaration pack and a JSON export.
Invoices for the Moadian system
Type 1 and type 2 invoices get a tax ID built from the office's fiscal memory ID and serial, are signed and queued with retries and status polling, and rejection codes are explained in plain Persian with a fix.
Collections, not just records
An overdue queue, receivables ageing with a 90-day-plus bucket, one-tap SMS reminders, and CSV reconciliation of bank and terminal statements against open instalments.
// Technology stack
- Python / FastAPI
- Jinja2 + HTMX
- PostgreSQL
- SQLAlchemy / Alembic
- Moadian e-invoicing
// Next step
Need something like TarazuVakil — Money Desk for Law Offices?
Tell us what you're building. We'll reply with how we'd approach it, a rough timeline and the first step.
Start a similar project


