Coffee shop for developers. Espresso = compiled, latte = interpreted, decaf = documentation. Brew strength is CPU tier.
  • JavaScript 100%
Find a file
2026-06-30 11:12:52 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:12:49 +00:00
src feat(#1): coffee shop engine — brews, baristas, tables, orders, ASCII menu board 2026-06-14 23:49:54 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:12:49 +00:00
package.json feat(#1): coffee shop engine — brews, baristas, tables, orders, ASCII menu board 2026-06-14 23:49:54 +00:00
README.md feat(#1): coffee shop engine — brews, baristas, tables, orders, ASCII menu board 2026-06-14 23:49:54 +00:00

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