What problem does this enterprise reporting system solve?
It replaces spreadsheet-and-email approval chains with a single auditable flow. Each report gets a unique reference, a calculated instalment schedule, a signed approval chain and an immutable change history — so finance teams can prove who approved what, when, and on which figures.
Why use Decimal instead of floating point for money?
Binary floats accumulate error: 0.1 + 0.2 is not exactly 0.3. This system keeps the entire monetary path in Decimal with banker's rounding at 16 places, so the principal components of an amortisation schedule sum back to the original principal exactly. A custom SQLAlchemy column type also prevents SQLite from silently coercing those values to a C double.
How does the digital signature workflow work?
Three ordered stages: finance manager, inspector, then CEO. Each decision is signed with an RSA-2048 key using PSS padding over a canonical payload that includes a hash of the report's financial substance. If anyone edits the amount after approval, every signature on that report fails verification and the API reports which stage broke.
Can it integrate with tax authorities and banking systems?
Yes. Connectors ship for the Iranian tax authority (سامانه مودیان), a bank settlement gateway, and accounting/ERP systems via REST JSON or standard XML documents. All connectors are idempotent, retry with exponential backoff, and run in sandbox mode by default so demos and CI never reach a live endpoint.
How does the tamper-evident audit trail work?
Each audit entry stores the hash of the previous entry, forming a chain. Editing or deleting any historical row breaks the linkage, and the verification endpoint recomputes the whole chain and returns the exact sequence number where it broke. This is verified by tests that mutate and delete rows behind the application's back.
Is it production-ready and open source?
It is MIT-licensed and runs via Docker Compose in minutes, with 115 tests at 84% coverage and CI running lint, tests and an end-to-end smoke suite. The README documents a production checklist — move signing keys to an HSM/KMS, switch to PostgreSQL, add Alembic migrations, and move rate limiting to Redis before going live.