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
How the pieces connect
- Purchases
- FIFO stock batches
- Recipes
- Channel sale
- Commission and ingredient cost
- Estimated margin and restock
The job
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
Make the workflow usable on a phone while keeping stock, costs, channel fees, workspace access, and corrections explicit.
How I built it
- Consume purchase batches in FIFO order rather than replacing stock with a single average number.
- Calculate each order from recorded price, platform commission, recipe usage, and current batch costs.
- Keep purchases, corrections, spoilage, and actual counts as explicit events.
- Separate each workspace and enforce plan limits on the server, not only in the interface.
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.