Quickstart
Get the app running locally in minutes with Bun and Turborepo.
Architecture overview
Understand the Onion Architecture layers and how Effect powers them.
REST API reference
Explore every HTTP endpoint with request and response schemas.
MCP server
Connect AI agents to the coffee shop via the Model Context Protocol.
What’s inside
The project is organized as a Bun monorepo with two workspaces: abackend/ that implements the full server-side logic, and a ui/ that contains the React frontend.
HTTP API
Effect-typed REST endpoints with auto-generated OpenAPI spec.
CLI
Place orders, manage the menu, and run barista workflows from the terminal.
Frontend
React + TanStack Query UI with Storybook for component development.
Domain model
Menu items, coffee orders, and validated status transitions.
Key features
- Onion Architecture — Domain, service, external, and presentation layers with explicit boundaries enforced by TypeScript path imports.
- Effect v4 — Functional, composable error handling with typed failures across every layer.
- Three presentation layers — HTTP (Effect HttpApi), CLI (Effect Command), and MCP server — all backed by the same application service.
- Dual persistence — In-memory repositories for fast tests; SQLite-backed repositories for real runs.
- On-device AI assistant — Hugging Face Transformers running in the browser, no API key required.
- Cloudflare Workers — MCP server deployable to Workers via a Miniflare-tested Worker entrypoint.
This project is a learning reference and demo application, not a production SaaS. All architectural patterns and code examples are real — taken directly from the source.