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
All 16 pages, the homepage, one per product and a bulk orders page, are prerendered to plain HTML with their own titles and structured data: a Bakery with the areas it delivers to, and a Product with prices per box size, customer reviews and its own FAQs. Titles and copy name Karachi and the neighbourhoods the bakery serves, and the sitemap and an llms.txt come from the same menu data as the pages. Checkout needs no backend: the order lands in the bakery inbox and opens WhatsApp with the message already written. The bulk orders page covers parties, weddings, office events and corporate gifting, 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. A sale and the flavours in its box are saved together by one database function, the same function the tests call.
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
A Gemini recommendation that brought the biggest order yet
The storefront's SEO earned Sugar Break a recommendation from Gemini. The customer it reached was planning his son's aqeeqa, the celebration held after a baby's birth, and he placed the bakery's biggest order since launch, telling the partners their SEO was super good.
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 its cost on the day it was made. My first import froze older sales at migration-day prices, so I recosted each one at the price in force on its own order date.
A green test suite hid a 3-day outage
A new check on assorted boxes blocked every sale for 3 days while every SQL test passed. The tests ran in one transaction and the browser used two, so sales now go through a single database function that the tests call too.
A partner's own purchase is real money, but a bad price signal
Partners' own purchases below list price count in cash and profit, but stay out of the margin used to judge prices.
Only a physical cash count tests the books
A rider's fare paid from the fund but never logged would leave the cash count short, so the sale form asks for that 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 →