Case study  /  Bakery and distribution

One platform replaced paper, chats and memory.

Capital Bread ERP. Built by me, end to end, from a contracted design. Live since 10 September 2026.

Role
Engineering, built and shipped solo (design contracted)
Platform
Web, role-based, mobile-ready
Stack
Next.js, PostgreSQL, Drizzle, Better Auth
Status
Live, 63 distributors
capitalbreadbakery.com/login (opens in a new tab)
Capital Bread ERP dashboard: sales overview chart, customer insight with top and least customers, best-selling product and low-stock alerts.

The project

A bakery's whole operation in one system.

For
A bakery and distributor, its staff, and 63 mega distributors who track their own orders.
What it does
Runs every order, payment, delivery and production run, with roles, two-step approvals and a live dashboard.
My part
Mapped the operation across sales, cashiers, dispatch, production, store, accounting and management, then built and shipped the ERP end to end from a contracted design.
Timeline
Live since 10 September 2026, with 80+ releases since.

The problem

Orders lived in books, chats and one person's memory.

Orders came in by phone, WhatsApp and walk-ins. Prices depended on who you were. Credit and discounts were approved by message. Dispatch, stock and payments were reconciled by hand at the end of the day, if at all. The owner knew the business made money but could not see where it went.

Before

  • Phone call
  • Order book
  • Spreadsheet
  • WhatsApp
  • End-of-day count

After

  • One order screen
  • Approval by role
  • Dispatch
  • Invoice
  • Live dashboard

What I built

Twelve modules, one record of the truth.

  • Orders priced by customer tier
  • Payments
  • Credit and discount approvals
  • Invoicing
  • Dispatch
  • Inventory with FIFO lots
  • Recipe costing
  • Production planning
  • Receivables and statements
  • Day closes
  • Live dashboard
  • Six staff roles, enforced on the server
Create a new order in Capital Bread ERP: customer, products and quantities, payment status, method and discount, then generate the invoice.
Invoice flow, walk-in POS and inventory.
Walk-in point of sale: product tiles with prices and a cart.
Inventory: opening stock, production, sales and closing stock per product, with a dated history.

Results

  • 63distributors track their own orders and profitability
  • 80+releases since go-live
  • 180+database migrations
  • 1,250+commits

What I learned

Visibility comes before automation.

The first month's value was not automation. It was showing the team, for the first time, what already happened every day. Once everyone could see the same record, the rules were easy to agree, and the software only had to enforce them.