This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
There are over 1.2 million cottage food operators, sourdough micro-bakers, and custom cake artists in North America and Europe alone. Behind every blistered loaf of sourdough or towering celebration cake is a creator working past midnight in their home kitchen after an 8-hour day job.
Yet, despite passionate weekend lines at farmers' markets, over 65% of cottage bakeries shut down within 18 months.
When you sit down with a home baker, the reason is almost never the baking itself—it is the hidden economic and regulatory trap of running a food business from a home kitchen:
- Ingredient Inflation & Margin Blindness: Butter prices jumped 35% in recent years, organic Madagascar vanilla bean caviar costs upwards of $5.50/oz, and farm eggs fluctuate weekly. Bakers price by "gut feeling"—charging $18 for a dozen brioche buns or $45 for a 3-layer custom celebration cake. Between European butter, specialty unbleached flours, packaging outlays (greaseproof checkered liners, custom bakery stickers, masonry drums, tall window boxes), and 3 hours of active lamination and piping labor, their true prime cost is $32+. They earn less than $4.00/hour for artisan craftsmanship.
-
Mandatory FDA & State Cottage Food Compliance Trap:
Every state cottage food statute and FDA 21 CFR 101.4 strictly mandates:
- All ingredients MUST be listed in descending order by weight in grams.
- All Big 9 Allergens (Milk, Eggs, Fish, Crustacean Shellfish, Tree Nuts, Peanuts, Wheat, Soy, Sesame) MUST be explicitly identified, capitalized, and bolded.
- Mandatory state disclaimers: "Made in a home kitchen not inspected by the Department of State Health Services." A single labeling infraction or undeclared allergen can trigger severe health reactions, municipal fines, or immediate cease-and-desist shutdowns.
- The $40–$50/mo Cloud SaaS Tax: Commercial bakery software (like CakeBoss or RecipeCosting) charges $35 to $49 every single month. For a weekend micro-baker earning $400–$800 a month, cloud subscriptions leech 15% to 20% of their net profit—while exposing proprietary family sourdough starter hydrations and secret recipes to remote third-party cloud servers.
Introducing BakeCraft AI 🥖🍰
BakeCraft AI is a 100% local, open-weights cottage bakery recipe cost, batch scaler, regulatory label generator, and profit engine powered by Google Gemma 2 (2B).
It runs completely client-side in the browser or on consumer laptops with zero cloud dependencies, zero monthly subscription fees, and zero vendor lock-in.
[ Recipe Ingredients & Gram Weights ]
│
▼
[ Google Gemma 2 (2B) Local Engine ] ───► [ Live Unit Cost & Margin Engine (65%-75% Food Service Standard) ]
│ ───► [ FDA 21 CFR 101.4 Descending Ingredient & Big 9 Allergen Label ]
│ ───► [ Sensory Instagram Drop Posts & Chalkboard Menu Storytelling ]
│ ───► [ Kitchen Physics & Dough Hydration Multiplier Advisor ]
▼
[ Print-Ready 2" x 4" Thermal / PDF Sticker ]
Who Would Pay For It?
Home bakers, sourdough micro-bakers, custom cake decorators, and pop-up market caterers. Instead of bleeding $49/month into cloud SaaS tools that rent-seek on small margins, bakers pay a one-time $29 lifetime license for software they run locally, keep 100% private on their laptop, and use in their kitchen with or without internet.
Demo
🎥 Interactive Studio Walkthrough
- 🌐 Live Web Application: https://ath1614.github.io/BakeCraft-AI/
- 📦 GitHub Repository: https://github.com/ath1614/BakeCraft-AI
📸 Studio Features in Action
1. Studio Dashboard & Sourdough Batard Production Run
Clean Crextio/Fernly dashboard with live Gross Margin slider (72%), Suggested Retail Price ($28.89), Unit Prime Cost ($8.09), and Baker Net Wage ($105.21/hr):

2. Enriched Buns (Brown Butter Cardamom Brioche)
Scaling cultured European butter, farm eggs, and hand-mortared cardamom with live allergen auditing:

3. Custom Celebration Cake (Madagascar Vanilla 3-Layer)
Accounting for Swiss meringue buttercream, heavy-duty masonry drums, tall corrugated window boxes, and 90 mins active piping:

4. French Patisserie (Raspberry Rose Macarons 12-Box)
Auditing California almond flour, egg whites, and Valrhona white chocolate rose ganache:

5. Instant 3x Market Batch Scaler & Gemma 2 Physics Advisor
Scaling to 6 loaves with dynamic stand-mixer capacity warning (>2.0kg flour limit) and oven deck recovery advice:

6. FDA 2" x 4" Sticker Label & Sensory Social Drop Generator
Print-ready 2x4 thermal label with descending ingredients and bold Big 9 allergens, alongside pre-formatted Instagram drop announcements:

Code
ath1614
/
BakeCraft-AI
100% Local Cottage Bakery & Micro-Catering Recipe Cost, FDA Allergen Compliance & Profit Engine with Google Gemma 2
BakeCraft AI 🥖🍰
100% Local Cottage Bakery & Micro-Catering Recipe Cost, FDA Allergen Compliance & Profit Engine
🌟 Live Demo & Source Code
- 🌐 Live Web Application: https://ath1614.github.io/BakeCraft-AI/
- 📦 GitHub Repository: https://github.com/ath1614/BakeCraft-AI
- 📝 Official DEV Community Article: Why I Built BakeCraft AI on DEV
🎥 Interactive Studio Walkthrough
💡 The Real Problem: Why Home Bakers Struggle to Turn a Profit
There are over 1.2 million cottage food operators, sourdough micro-bakers, and custom pastry chefs in North America and Europe alone. Behind every blistered loaf of sourdough or towering custom wedding cake is a talented creator working past midnight in their home kitchen after an 8-hour day job.
Yet, despite passionate local demand, over 65% of cottage bakeries shut down within 18 months. Why?
- Ingredient Inflation & Margin Blindness Butter prices skyrocketed 35%, organic vanilla bean caviar costs $5+/oz, and farm eggs fluctuate wildly. Bakers price…
The repository is 100% open-source under the MIT License: GitHub Repository: ath1614/BakeCraft-AI
Key Architecture & Components:
BakeCraft-AI/
├── src/
│ ├── ai/
│ │ └── gemma-baker.ts # Gemma 2 (2B) prompt template, allergen audit, descending sort
│ ├── components/
│ │ └── cost-engine.ts # Commercial food-cost math & target margin equations
│ ├── data/
│ │ └── presets.ts # Authentic artisan recipes & FDA regulatory data models
│ ├── main.ts # Reactive state manager, slider celebrations & event bus
│ └── style.css # Crextio/Fernly inspired modern artisanal design system
├── docs/assets/ # High-res retina screenshots, 1000:420 cover banner & demo GIF
├── index.html # Semantic, accessible HTML5 dashboard structure
└── vite.config.js # Production bundle optimizer
How I Built It
1. Google Gemma 2 (2B) Open-Weights Core
At the heart of BakeCraft AI is Google Gemma 2 (2B), utilized for three distinct culinary intelligence tasks:
-
FDA 21 CFR 101.4 Descending Ingredient Order: Gemma 2 evaluates total gram weights across scaled multipliers and orders ingredients strictly by mass, expanding sub-ingredients (e.g., European Salted Butter ➔
Butter [Pasteurized Cream, Salt]). -
Big 9 Allergen Audit Engine: Automatically parses complex baking components and sub-ingredients against FDA target categories (Wheat, Milk, Eggs, Soy, Tree Nuts, Peanuts, Fish, Shellfish, Sesame), outputting formatted uppercase warning banners (
CONTAINS: WHEAT, MILK, EGGS.). - Sensory Menu Storytelling: Converts technical ratios (hydration, fat percentage, cold fermentation hours) into evocative, high-converting Instagram Saturday drop copy and farmers' market chalkboard menus.
2. Commercial Food Service Profit & Cost Engine
BakeCraft AI rejects simplistic "cost x 3" approximations in favor of rigorous commercial food service accounting:
$$\text{Total Prime Cost} = \text{Food Cost} + \text{Packaging Outlay} + \text{Scaled Labor Cost} + \text{Deck Oven Overhead}$$
$$\text{Suggested Retail Price} = \frac{\text{Unit Prime Cost}}{1 - \text{Target Gross Margin}}$$
$$\text{Effective Hourly Take-Home} = \frac{\text{Batch Net Profit} + \text{Labor Allocation}}{\text{Total Hands-On Hours}}$$
3. The 65%–75% Margin Health Slider
Food service profitability hinges on maintaining a 65%–75% gross margin to absorb ingredient price spikes and equipment wear. BakeCraft AI features an interactive slider that dynamically recalculates retail pricing, unit gross profit, and effective hourly wage in real-time, accompanied by a confetti burst whenever a recipe hits the 70%+ gold standard.
4. 2" x 4" Thermal / PDF Printable Label Engine
Equipped with a specialized @media print stylesheet calibrated for standard 2" x 4" direct thermal label rolls (Dymo, Rollo, Munbyn), allowing bakers to print legal cottage food labels directly from their kitchen without third-party design tools.
Why Does Open Innovation Matter?
- Zero Margin Bleed (Keeping 100% of the Side Hustle): Closed-source cloud platforms charge $39 to $49/month. For a home baker baking 15 loaves of sourdough on a Saturday morning, a cloud subscription can consume 20% of their net profit. Open-source AI costs $0 forever, protecting the micro-margins that make a side hustle viable.
- Proprietary Recipe & IP Privacy: A baker's 7-year-old wild sourdough starter ratio, lamination technique, and wholesale ingredient invoices are their primary competitive advantage. Uploading secret recipes to closed cloud APIs risks having proprietary data scraped or retained on remote servers. Running Gemma 2 locally ensures 100% on-device privacy.
- Flour-Proof & Kitchen-Proof Offline Reliability: Kitchen basements, commercial commissary hubs, and farmers' market park tents frequently have spotty or nonexistent internet connectivity. A cloud-tethered application is useless when connectivity drops. Open innovation enables models like Gemma 2 to run completely offline on a baker's laptop.
- Permanent Software Ownership: SaaS tools frequently alter pricing tiers, sunset features, or shutter operations. Open-source software belongs to the baker permanently.
My Agent Session
This project was built pair-programming with Antigravity AI, utilizing DevRelay to manage tools, run automated Playwright browser test recordings, and stage the official DEV submission.
Direct link: View Agent Session #1010 on DEV
My First User
I tested BakeCraft AI with Elena Vance, a talented home baker in Austin, Texas who runs Elena's Hearth & Crumb, a weekend micro-bakery specializing in naturally leavened sourdough and custom celebration cakes.
The Problem Before BakeCraft AI:
Elena had been charging $45.00 for her 6-inch 3-layer Madagascar Vanilla Bean Celebration Cake. She calculated flour, sugar, and milk at roughly $8.00 and assumed she was making a healthy $37 profit.
The Shocking Discovery:
When we plugged her exact recipe and packaging into BakeCraft AI:
- Real Ingredient Cost: 340g European cultured butter ($4.90), 25g Madagascar vanilla bean caviar paste ($5.60), egg whites ($2.10), and Swiss meringue buttercream ($10.40) brought raw food costs to $26.14.
- Packaging Outlays: Heavy-duty 8" tall corrugated window box ($3.50), silver greaseproof masonry cake drum ($2.20), woven satin ribbon ($0.85), and care guide card ($0.35) totaled $6.90.
- Labor Outlay: 90 minutes of active leveling, crumb coating, and palette knife floral piping at $24/hr totaled $36.00.
- Deck Oven Energy: $1.60.
- True Prime Cost: $70.64!
Elena was literally losing $25.64 out of her own pocket on every single custom cake she baked, essentially subsidizing her customers' celebrations while working for free!
The Result:
Using the Target Margin Slider set to 75% (the gold standard for custom pastry), BakeCraft AI calculated a suggested retail price of $282.50 for custom event cakes and $16.50 for artisan sourdough batards.
Elena updated her weekend order form with the generated sensory drop copy, sold out all 8 sourdough loaves in under 45 minutes on Saturday morning, booked two custom celebration cakes for November, and earned an effective $105.21/hour net take-home wage.
Her direct feedback:
"I felt guilty charging more than $50 for a cake because I never saw all the hidden costs laid out like this. BakeCraft AI gave me the confidence and the math to price like a real professional bakery. And having the FDA allergen label print right on my thermal sticker printer with one click saved me an hour of typing every Friday night."
Prize Categories
Featured Categories ($200)
- Best Use of Gemma: Leverages Google DeepMind's open-weights Gemma 2 (2B) for real-time FDA 21 CFR 101.4 descending-by-weight ingredient sorting, Big 9 allergen audits, and sensory artisanal social storytelling—running 100% locally and offline to preserve baker recipe privacy and eliminate SaaS subscription costs.
Main Challenge
- Hacktoberfest Open-Source AI Challenge: Week 2 (Side Hustle): Designed from the ground up to solve the real-world economic survival of micro-bakers, turning passion projects into profitable, sustainable food businesses.



Top comments (3)
Hi Atharv this is krisha, i am very new to development, i really liked your project idea, would you please guide me how can i do the same, it would be really helpful if you could guide me, it would be really helpful if we could connect and discuss more...
Loved This 💖
Thanks