Skip to main content
Effect Coffee Shop is a Bun monorepo with two workspaces: a backend/ that runs the HTTP API, CLI, and MCP server, and a ui/ that runs the React frontend. This guide walks you through getting both running on your machine in a few minutes.
1

Install prerequisites

You need Bun 1.3.11 or later. Bun ships its own Node.js-compatible runtime, so a separate Node installation is not required for running the app, though some tooling in the repo may reference it.Install Bun with the official installer:
curl -fsSL https://bun.sh/install | bash
Verify the installation:
bun --version
2

Clone the repository

git clone https://github.com/kevinmichaelchen/effect-coffee-shop.git
cd effect-coffee-shop
3

Install dependencies

A single bun install at the repo root installs packages for both the backend/ and ui/ workspaces, because the root package.json declares them as Bun workspaces.
bun install
bun run hooks:install
hooks:install sets up the Git hooks managed by prek. The hooks run type-checking, linting, and formatting checks before each commit and push.
4

Start the backend HTTP server

The backend runs an Effect-typed HTTP API on port 3000 by default. Start it from the repo root:
bun run http
You should see the server start and begin accepting requests at http://localhost:3000. To use a different port, set the COFFEE_HTTP_PORT environment variable before running the command.
You can also start the backend and frontend together with a single command. See the next step for details.
5

Start the frontend

In a new terminal, start the Vite dev server for the React UI:
bun run dev
This runs Turborepo’s dev task filtered to the ui workspace, which starts the Vite development server. Turborepo caches previous task outputs, so repeated runs are faster.Alternatively, you can run the frontend directly from within the ui/ workspace:
bun run --cwd ui dev
6

Open the UI in your browser

Once both servers are running, open the frontend in your browser:
http://localhost:5173
The UI connects to the backend HTTP API at http://localhost:3000. You can place coffee orders, browse the menu, and track order status from the dashboard. An on-device AI assistant (powered by Hugging Face Transformers) is available without any API key.
The backend exposes three interfaces beyond the HTTP API. The CLI lets you place orders and manage the menu from the terminal. The MCP server exposes the same coffee actions to AI agents via the Model Context Protocol. You can start them from the repo root:
# Interactive CLI
bun run cli -- menu list

# MCP server over stdio (for local AI tool integrations)
bun run mcp:stdio

# MCP server over HTTP at /mcp
bun run mcp:http

Explore further

HTTP API

Effect-typed REST endpoints with full request and response schemas.

CLI

Place orders and manage the menu directly from your terminal.

MCP server

Connect AI agents to the coffee shop via the Model Context Protocol.

Architecture overview

Understand the Onion Architecture layers and how Effect powers them.

Build docs developers (and LLMs) love