Skip to main content

APRON

Procurement teams negotiate supplier quotes by hand, and an AI alone can't be trusted with money.

My part
Engineer for Ledgercross: 221 of 644 commits and 67 merged PRs, 2026-09-09 to 2026-10-13 (auth, tenant isolation, AI layer, deploy).
When
2026
Merged PRs
39
Weeks
3
My commits
60
Autonomy levels
4

The problem

Buyers compare supplier quotes and negotiate by hand, and letting an AI decide prices, dates or savings directly is too risky for a procurement team.

What I built

An AI procurement negotiator built around an evidence-backed Procurement Ledger: buyers upload quotes, the AI returns typed candidate facts, deterministic rules verify and compare them, policy decides and a human approves. Money, dates and savings never come from the model.

How

  1. 01

    Auth and tenant isolation

    Moved auth from Clerk to a self-hosted Better Auth service with organizations and JWTs, and added Postgres row-level security for every tenant.

  2. 02

    Reading supplier email

    Buyer mailboxes through Nylas with a connect flow and folder picker, and quote line extraction (tax, units, tiers, currency, incoterms, freight, terms) with evidence spans.

  3. 03

    AI under control

    An AI provider layer with structured outputs, retries and cost logging, autonomy levels 0 to 2 with level 3 behind a production gate, and a tool permission matrix.

  4. 04

    Deploy and recovery

    A Dokploy pipeline on Postgres 18 with pgvector and pgbouncer, Doppler secrets, the full e2e suite in CI, and a backup and restore drill with a runbook.

Stack

  • Python
  • FastAPI
  • PostgreSQL
  • pgvector
  • React
  • Better Auth
  • Nylas
  • Dokploy

More case studies

Have something in mind?

My inbox is open.

Say hi
© 2026 Ehsanul Haque Siam. Dhaka, Bangladesh.