r/SideProject • u/Free-Good9203 • 21m ago
Deterministic 3-way invoice & Red-Team gate in Python/FastAPI (Decimal + IBAN MOD-97 + SHA-256 SQLite WAL ledger in 0.40 ms)
Enable HLS to view with audio, or disable this notification
Built a deterministic FastAPI validation layer to sit in front of ERPs and accounting pipelines when ingesting noisy OCR PDFs and Facturae/UBL XML invoices.
In the 20s walkthrough:
- **
PASS:** Clean 3-way PO/GRN/Invoice match with validIBAN MOD-97checksum (pure PythonDecimal, zero float drift). - **
REVIEW:** OCR variance (+EUR 75.00vs PO) or invalid IBAN checksum quarantined before any ERP write. - **
BLOCKED:** SQLi / SSRF webhook payloads stopped (122/122Red-Team payloads blocked in CI) and sealed into a SHA-256 chained SQLite WAL ledger tested at50concurrent threads with0lock errors.
Zero float drift. Zero ERP corruption.
Happy to share implementation details on the WAL locking pattern or Decimal parser if useful.
1
Upvotes