04Full stack · Internal product

Stock rebalancing engine

Analysts used to work out every inter-store transfer by hand. The engine proposes what moves where, and they run it themselves.

Per transfer plan
4h → 5min
Run by the analysts
Self-serve

Purchasing analysts worked out every inter-store stock transfer by hand: which store had too much of a product, which had too little, and how much to move. A single plan took around four hours to elaborate.

The engine now proposes which products should move from stores with surplus to stores running short, checked against real inventory and sales. The analysts review the plan and run it themselves in a web app, in two to five minutes.

The Stock rebalancing engine demo (interactive with JavaScript on)

How it's built

The tools, the architecture and the engineering numbers, one line each.

03Applied AI · Guardrails

AI assistant for business data

Numbers the model makes up
Zero
Embedded/Vector DB
Golden queries

A Telegram assistant for questions about sales, inventory and purchasing. Every figure it gives comes from a query it actually ran.

View full case study: AI assistant for business data

05Multi-agent · Local-first

Personal AI operating system

Before anything it can't undo
Asks first
Git is the source of truth
Markdown

The memory is markdown in Git, so it outlives the runtime that reads it.

View full case study: Personal AI operating system

Stock rebalancing engine

How it's built

Role
Sole engineer
Running
In production since 2025

Built with

  • PythonThe transfer logic
  • FastAPIThe engine's API
  • pandasStock-cover and transfer calculations
  • SQL ServerReal inventory and sales data
  • DagsterScheduled runs
  • DockerPackaged deployment
  • JavaScript web appWhere the analysts review and run each plan

How it fits together

Transfer plans the analysts run themselvesPurchasing analysts work in a web app backed by a single FastAPI core that holds the transfer logic: it reads real inventory and sales from SQL Server, works out each store's stock cover and proposes the moves that even it out. Dagster runs the recurring jobs.USERSINTERFACEPLATFORMSYSTEMSPurchasing analystsreview and run the planDagsterrecurring schedulesWeb appthe transfer plannerFastAPI corestock cover · transfersSQL Serverreal inventory and sales

By the numbers

Time to produce a transfer plan
4h → 5min