Pricing PWA / Small Business
PriceCraft
A pricing tool for small food businesses that answers a recurring question: after ingredients, labor, and overhead change, what should this product sell for?

Public evidence
These reviewed public sources support the adjacent build claims; they do not imply adoption or unmeasured outcomes.
- Live product (opens in new tab)The public PWA demonstrates the current pricing workflow, offline-capable shell, and reviewed receipt-cost entry points.
- Public repository (opens in new tab)The public repository contains the pricing, persistence, migration, Row-Level Security, and automated-test implementation.
Problem
- Target user
- Small food businesses that need to price products repeatedly as ingredient costs change.
- Challenge
- A price is easy to calculate once; keeping it current is harder when spreadsheets repeat ingredient costs and related products duplicate the same base recipe.
- Why it mattered
- Missing a shared cost can make real margins look healthier than they are, while required sign-in or connectivity can block a quick pricing check.
Constraints
- The calculator must remain useful before sign-in and during connectivity loss.
- Related product variants need one source for shared recipe costs.
- Noisy receipt OCR output cannot be trusted to update ingredient costs without user review.
Solution
PriceCraft keeps the recipe, selling-price options, and future cost updates together so a business can recalculate instead of rebuilding its math.
- The business records ingredients, labor, overhead, and shared recipe costs, then compares markup and profit-margin prices with break-even and profit figures.
- Product variants reuse one base recipe and add only the costs that differ.
- Receipt OCR proposes ingredient names, quantities, units, and prices; the user edits and confirms them before the ingredient catalog or price history changes.
- Guest data works offline, can move into an account after sign-in, and can synchronize through Supabase with Row-Level Security; JSON import and export provide a portable backup.
Engineering Decisions
Share one base recipe across variants
- Constraint
- Related products needed to share a base recipe without duplicating shared ingredient costs.
- Decision
- Model reusable base recipes and allocate shared costs across product variants.
- Rationale
- Update shared costs once while keeping each variant’s added costs and resulting margin visible.
Treat receipt OCR as a draft
- Constraint
- Receipt text is noisy and cannot safely update ingredient costs without review.
- Decision
- Preprocess captured images, extract candidate lines through the available OCR path, and require editable confirmation before catalog or price-history writes.
- Rationale
- Reduce re-entry work without letting uncertain text silently alter a selling-price calculation.
- Trade-off
- The user remains responsible for checking names, quantities, units, and prices before saving.
Let the calculator work before sign-in
- Constraint
- The calculator needed to remain useful before sign-in and during connectivity loss.
- Decision
- Support local guest changes, optional Supabase authentication and synchronization, and guest-data migration.
- Rationale
- Make the core calculation immediately useful, then offer cloud sync when the user wants it.
Outcomes
Product and delivery
2 strategies
Two ways to set a price
Calculates selling prices with both markup and profit-margin strategies across ingredient, labor, and overhead costs.
Offline-capable
Works before sign-in
Lets a guest calculate and save locally without a connection, then migrate and synchronize data after signing in.
Receipt to catalog
Cost capture
Turns user-reviewed receipt lines into new catalog ingredients or updated price-history records.
Implementation evidence
300+ tests
Pricing changes checked
Covers pricing logic, persistence, migration, catalog, and interface behavior with more than 300 unit and integration tests.
Learnings and Next Steps
What I learned
- Receipt OCR is most useful as a draft that reduces typing; it should not silently rewrite the costs behind a selling price.
- A calculator earns trust faster when it works before account creation and explains the cost behind its recommendation.
What I would improve
- Test receipt extraction across more layouts and let users review several detected price changes in one pass.
What remains unvalidated
- User adoption, pricing time saved, and business-margin improvement have not been measured.