Bakery for code. Breads are features, unit tests are yeast, CI is the oven, croissants are premium features, stale bread is legacy.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
code-bakery
Bakery for code. Breads are features, unit tests are yeast, CI is the oven, croissants are premium features, stale bread is legacy.
Usage
const { Bakery } = require('./src/bakery');
const bakery = new Bakery('Les Pains du Code');
bakery.hireBaker('Alice', 'sourdough');
bakery.addRecipe('chocolate-cake', { type: 'pastry', basePrice: 8.00, isPremium: true });
// Full pipeline: prepare -> knead -> bake -> stock
bakery.bakeRecipe('sourdough', 'Alice');
// Sell
bakery.sell('sourdough');
// View storefront
console.log(bakery.storefront());
// Reports
console.log(bakery.salesReport());
console.log(bakery.freshnessReport());
Components
- RecipeBook — 7 default recipes (sourdough, baguette, croissant, rye, brioche, focaccia, ciabatta)
- Dough — Kneading system with quality, yeast (tests), baker skill bonuses
- Oven — Temperature-controlled baking with burn risk at high temps
- DisplayCase — Freshness tracking, aging, stale eviction, 20-item capacity
- Baker — 5 specialties, skill progression (apprentice -> master), experience system