Sugar Break: Bakery Storefront and Costing App
A storefront and costing app for a Karachi home bakery. It retired a 1,900-formula spreadsheet and shows profit per product, cash, stock and partner shares.
The Challenge
Sugar Break is a home bakery in North Nazimabad, Karachi, run by 2 partners. Orders came in through Instagram DMs and WhatsApp. The books lived in a 15-tab Excel workbook with about 1,900 formulas, fed by 3 Google Forms.
Critical Pain Points
- Typos and calculation errors left some costs at zero and priced assorted boxes against the wrong figures, and nothing in the sheet flagged it
- A wrong line in the sales log threw the totals off, and reconciling it against the rest of the sheet was difficult
- A wrongly logged expense skewed ingredient costs, and one price rise rewrote the margin on every past sale
- Every change to the 3 Google Forms feeding the sheet was a headache, and 18 products already took 121 hand-typed packaging rows
- Nobody could see which products or promotions actually made money, so there was no clear place to push for more profit
- Both partners paid for supplies out of pocket, with no shared record of who was owed what or how far the business was from break-even
Bookkeeping was complicated and still came out wrong, so pricing and menu decisions rested on numbers nobody could check.
The Solution
One system in 2 parts: a storefront that turns browsing into a ready-written WhatsApp order, and a dashboard that runs the money side of the business from one cost model.
A storefront built to be found and shared
Every product has its own prerendered page with structured data, so search engines can index it and it can be shared on its own link. Checkout needs no backend: the order lands in the bakery inbox and opens WhatsApp with the message already written. A bulk orders page and a shareable digital menu card followed.
One cost model, with tests
Recipes, toppings, packaging, waste and overhead resolve into a cost per box inside the database, and automated SQL tests pin the cost formulas. Items are picked from dropdowns, and a purchase logged in the wrong unit is rejected.
Pricing and quotes from the same numbers
The price list shows the minimum price at the target margin and flags anything below it. Assorted boxes are priced per piece, and a database check blocks any price that would make a mix cheaper than the same pieces bought alone. Bulk quotes are checked against retail margin before they go out.
The day-to-day money
Both partners log in to one ledger that tracks what each is owed and splits repayments pro rata. A counted cash box is checked against the books, and a delivered order still unpaid after 7 days turns urgent. Stock and bake days are tracked, and waste is charged at cost.
Results & Business Impact
Mistakes fixed in place, right in every total
A wrong sale or expense is corrected inline or in bulk, and a delete drops it from every total at once while the record is kept. A purchase logged in the wrong unit is rejected before it can distort a cost.
Books that reconcile to the cash
A waterfall walks the trading result down to the cash position line by line, and a counted cash box is checked against it. Every gap between profit and cash has a named line.
Profit visible per product and per promotion
Margin by item, top sellers, repeat customers and each campaign's true cost sit next to the number of boxes it takes to break even. The partners can see which products and deals earn their keep.
Both partners on one set of books
Revenue has covered 86% of everything spent in the first 16 weeks. Both partners see that figure and what each of them is owed, with nothing rebuilt by hand.
No more form and spreadsheet upkeep
The Google Forms are gone, and entry happens in the app from dropdowns. Packaging comes from one preset per box size, and the minis range launched with prices that start from the regular boxes they're cut from.
A storefront customers ask about
Customers complimented the site and asked the bakery who built it.
Lessons Learned
Freeze each cost on the right date
Every sale stores what it cost on the day it was made. My first import froze all the older sales at migration-day prices instead, and ingredient prices had fallen sharply since May, so the early margins were wrong. I recosted each one at the price in force on its own order date.
A green test suite hid a 3-day outage
I added a database check that every assorted box records the flavours that went into it. For the next 3 days no sale could be saved, and every SQL test still passed. Each failed save reported 6 pieces unaccounted for. Tracing it showed the check itself was right: it waits until the end of a transaction, and the API gave the sale and its flavours a transaction each, so every sale reached the check with no flavours attached. The tests missed it because a test file runs as one transaction, the one condition the browser never has. The fix is a single database function that writes the sale and its flavours together. It is now the only way a sale gets created, and its test calls that same function instead of writing to the tables directly.
A partner's own purchase is real money, but a bad price signal
The partners sometimes buy boxes for themselves well under list price. That money is real, so cash and profit count it. It also dragged down the margin used to judge prices, so the pricing figures now leave those sales out.
Only a physical cash count tests the books
Every cash figure assumes each paid sale reached the shared pool and stayed there. A delivery fare paid to the rider from the fund but never logged would leave that count short, so the sale form now asks for the expense whenever a fare is entered.
Technologies Used
- React 18
- Vite 6
- Tailwind CSS 3
- Supabase
- PostgreSQL
- TanStack Query
- Recharts
- Vitest
- GA4
- Cloudflare Pages
Running your business on spreadsheets and DMs?
If your costs, prices or partner split live in a sheet nobody fully trusts, I can move them into a system that checks its own numbers. Send me what you're working with and I'll reply by email with what it would take.
Send me a messageRelated Case Studies
Bohra Calendar
Free, open-source PWA with 225+ Fatemi events and accurate Hijri date conversion. Built for the Dawoodi Bohra community. Works offline on every device.
Read Case Study → Mobile ApplicationsArabic Abjad calculator
Arabic Abjad calculator for Android and the web, with 850K+ downloads and a 4.75-star rating across 13 years. Free, ad-free, closing in on a million downloads.
Read Case Study → Mobile ApplicationsPrayer times app
Prayer times Android app for the Dawoodi Bohra community, 110K+ downloads. Offline calculations, custom Hijri calendar, and reliable notifications. Free and ad-free.
Read Case Study →