Coffee shop for developers. Espresso = compiled, latte = interpreted, decaf = documentation. Brew strength is CPU tier.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
code-coffee-shop
Coffee shop for developers. Espresso = compiled, latte = interpreted, decaf = documentation. Brew strength is CPU tier.
Usage
const { CoffeeShop } = require('./src/coffee-shop');
const shop = new CoffeeShop('The Daily Grind');
shop.hireBarista('Alice', 5);
shop.hireBarista('Bob', 3);
// Place orders
shop.order('espresso', 'Customer1');
shop.order('latte', 'Customer2', { extraShot: true, size: 'large' });
shop.order('pour-over', 'Customer3', { barista: 'Alice' });
// View storefront and order board
console.log(shop.storefront());
console.log(shop.orderDisplay());
// Pickup
shop.pickup(1);
// Reports
console.log(shop.salesReport());
Components
- Menu — 8 default drinks mapped to languages (espresso=C, latte=Python, cold-brew=Rust, etc.)
- Barista — Skill progression (trainee -> master), specialty drinks, latte art, brew speed
- Brewer — Water temp, grind size, pressure control, quality scoring, cleaning cycle
- OrderBoard — Order tracking, overflow eviction, ASCII display
- CoffeeShop — Full pipeline: order -> brew -> pickup, loyalty cards (10 = free), daily cycle