Skip to content
MSALEH

04 / 05 · Case Study

Aqsat

Installment contracts, payments and balances, each traceable to the entries behind it.

Sector
Consumer credit
Role
Sole engineer
Year
2026
Stack
Next.js · Drizzle · PostgreSQL · Garage S3
Aqsat dashboard in Arabic: overdue total, due today, collected today and the most overdue customers

01

The problem

The client sells goods on installment, collecting the price plus its markup in monthly payments. Its PowerBuilder system could not show how a balance was reached.

The replacement had to bring over 7,000 customers with their guarantors and legal follow-up intact.

02

Constraints

  • Late days counted, never charged

    The business doesn't charge for late payment, and the database rejects any late fee.

  • Arabic, right to left

    Every screen, statement and PDF is in Arabic; code and data stay in English.

  • 7,000 customers to migrate

    Customers and guarantors keep their original keys, with the old system available for lookups.

  • Every balance explainable

    Staff must be able to show any balance line by line, years later.

03

Three key decisions

  1. Decision 1ADR-0035

    Late days instead of late fees

    Before go-live the owner ruled out charging for lateness, so the planned per-day fee became a Late Days count shown on contracts, statements and the dashboard.

    Trade-offNo late-payment income, and a fee engine already designed was dropped; a database check keeps it from returning.

  2. Decision 2ADR-0001

    An append-only ledger

    Every financial event is an immutable entry and a balance is their sum. Corrections post reversing entries; nothing is edited.

    Trade-offBalances are computed, not stored, and every feature that moves money must post entries. In return, every historical statement stays correct.

  3. Decision 3ADR-0023

    Money in whole piastres

    The calculation core works in integer piastres and converts only at its boundary, because a single floating-point conversion causes untraceable errors of a few piastres.

    Trade-offA conversion at every boundary, and a review rule to enforce it.

04

Outcome

  • Schedules, allocation and Late Days are pure functions, covered by tests down to month-end due dates and 29 February.
  • An importer brings over 7,000 customers and their guarantors with their original keys.
  • Arabic statements and PDFs, with encrypted off-site backups from day one.

Go-live is set for November 2026; results will be added here.

Want to hear how Aqsat was built?

Screens

Demo data, invented for this page

  • An installment contract with its pricing breakdown and overdue amount
    01A contract shows how its price was built, once, at signing.
  • A twelve-month installment schedule with paid and unpaid rows and days late
    02The schedule sums exactly to the amount financed; lateness is counted in days, never charged.
  • A customer statement built from ledger entries with a running balance
    03The statement is the ledger: every balance is a sum of immutable entries.
Next project05 / 05True VisorA bilingual audit platform that keeps recording findings, evidence and corrective actions when the connection drops.
True Visor dashboard: today's audit, progress by standard, checks assessed and critical findings