angl

Demo: FreshOps

A grocery-delivery backend whose product behavior lives in .angl specs.

FreshOps is the public demo repo: a grocery-delivery backend built from FastAPI, Postgres, a Redis worker, and generated implementation modules sitting behind .angl boundaries.

It exists to prove the loop on a real backend flow, not a toy function.

The feature

A small product change was made almost entirely by editing one spec, specs/build_delivery_promise.angl:

  • express orders use base promise minutes 25 instead of 35
  • express orders add "express priority" to the response reasons

Angl regenerated build_delivery_promise.py. The compile took two attempts; the repair loop rejected the first generated version.

The congestion rule

The same order exercises a second pinned rule: under high courier congestion, stores with high delay risk are penalized before choosing fulfillment.

storeraw scoredelay penaltyadjusted
hub-store911279
north-market88286

north-market wins on adjusted score.

The proof

make prove validates contracts, generated-code tests, full-stack tests, Docker Postgres, the Redis worker, and a live API response in one command.

Live backend output for the express order:

{
  "status": "promised",
  "store": "north-market",
  "promised_minutes": 46,
  "reasons": ["delay penalties applied", "express priority"]
}

Those are the values the contract pinned, returned by the running backend.

Run it yourself

git clone https://github.com/ddavidgao/angl-freshops
cd angl-freshops
make prove

Then read the specs in specs/ and compare them to the generated modules they produced.

On this page