← All projects
FIELD STUDY 01 / Product systems

SupplyLens/01

See the shortage. Before it happens.

Database-backed MVPGitHub Open demo
HOW THIS WAS BUILT

AI-assisted, and still learning.

I used AI coding tools extensively to build this project. I’m working through the implementation so I can explain the decisions, debug problems and make changes with more independence.

TRY IT WITH CONTEXT

Synthetic starting data; the hosted workspace requires ChatGPT sign-in. External supply-chain integrations are future work.

Inspect the implementation ↗
PROJECT PREVIEW / LANDING PAGE

Signals become
decisions.

SupplyLens landing page preview
01 / THE QUESTION

Connecting demand, inventory and purchasing decisions in one supply-chain workspace.

Inventory is a timing problem. Demand forecasts, supplier lead times and incoming orders need to tell the same story before a purchasing decision is made.

A planning workspace that makes those relationships visible, then connects the forecast to the purchase-order lifecycle.

02 / EXPLORE THE LOGIC

When does stock run out?

Adjust the model. See the relationship. This original explanatory study simplifies a concept in the project; it is not the production application.

INTERACTIVE FIELD STUDY / INVENTORY
12.0days of inventory
600 units on hand

Stock covers this delivery window.

Illustrative constant-demand model, not SupplyLens’s forecasting engine. No incoming orders or safety stock are included.
03 / INSIDE THE SYSTEM

From interface
to infrastructure.

ReactTypeScriptVinextNext.jsTailwind CSSDrizzle ORMRechartsCloudflare WorkersD1Zod
  1. 01
    React + Rechartsplanning UI
  2. 02
    Vinext + Workersvalidated requests
  3. 03
    Zodinput contracts
  4. 04
    D1inventory and order records
04 / IMPLEMENTED IN THE REPOSITORY
01

Forecast demand with exponential smoothing (α = 0.3).

02

Explore supplier delays and demand shocks against inventory runway.

03

Move purchase orders from draft to ordered to received.

04

Protect database writes with revision checks and duplicate-receipt guards.

05 / THE HARD PART

Where correctness matters.

Receiving an order changes inventory. Repeating that action must not count the same stock twice; revision checks and duplicate guards protect that boundary.

06 / DESIGN TAKEAWAY

What the implementation teaches.

A useful forecast needs an operational next step. The most important design connection is between the planning model and a safely recorded purchase order.

CONTINUE EXPLORING

Next field study: TreasuryFlow

↗
CYBER RONIN / MISSION INDEX
⌘ / Ctrl K to open · Esc to close