Go / Operations PWAControlled invite-only pilot

Stock, recipe costs and order margin in one mobile workflow

A small food business can record purchases, maintain recipes, sell through different channels, consume the right stock batches, and see estimated margin without joining five spreadsheets.

FIFO stock consumption · Thai and English · workspace isolation · server-enforced plan limits

The job

What needed to change

The daily questions are connected: what was bought, what a recipe consumes, what each platform charges, what sold, what spoiled, and what needs restocking.

The hard part

The constraint shaping the build

Make the workflow usable on a phone while keeping stock, costs, channel fees, workspace access, and corrections explicit.

System flow

How the pieces connect

  1. Purchases
  2. FIFO stock batches
  3. Recipes
  4. Channel sale
  5. Commission and ingredient cost
  6. Estimated margin and restock
Implemented views

Rendered examples from the build

Read-only food-operations demo showing the current decision, sales, estimated profit, low stock, and recent activity
Implemented operator surface using synthetic public records; persistent actions are disabled.
Build decisions

How I built it

  1. Consume purchase batches in FIFO order rather than replacing stock with a single average number.
  2. Calculate each order from recorded price, platform commission, recipe usage, and current batch costs.
  3. Keep purchases, corrections, spoilage, and actual counts as explicit events.
  4. Separate each workspace and enforce plan limits on the server, not only in the interface.
Verification

What I verified

  • Products, channel listings, recipes, purchases, stock, spoilage, and order-margin workflows
  • Thai and English mobile PWA
  • Workspace membership, invitations, plans, exports, and operator administration
  • Go API and worker with SQLite primary storage and B2 image processing

Current state: It is ready for a small invite-only pilot with manual billing. Public signup, connected accounting, and production restore testing are not finished.