Documentation

Documentation

Everything you need to run Zest.

Getting Started

Prerequisites

  • Node.js 20+ (LTS recommended)
  • pnpm 9+
  • macOS for BLE thermal printer support
  • Xcode CLI tools (for native builds)

Installation

Terminal
git clone https://github.com/ec812/zestcd zestpnpm installpnpm dev

The dev server starts on http://localhost:3898

Available Scripts

CommandDescription
pnpm devStart dev server (port 3898)
pnpm buildProduction build
pnpm startStart production server
pnpm lintRun ESLint
pnpm testRun unit tests

Features

Customer-Facing

FeatureRouteDescription
Public Menu/Trilingual dish menu (Japanese, English, Chinese) grouped by category
Table Ordering/order/[qr_code]Scan a table QR code to browse the menu, add rounds, view the bill
Bill View/bill/[qr_code]Read-only bill for an open table order
Reservations/bookPublic booking form (name, party size, date/time, contact)
Customer CLIzestAgent-friendly CLI for menu browsing, ordering, and status checks

Staff Admin

FeatureRouteDescription
Dashboard/adminStats, active orders, today's bookings, top-selling dishes
Dishes/admin/dishesCRUD for menu items, image upload, AI-assisted trilingual fill
Tables/admin/tablesManage tables, QR codes, capacity, sections
Orders/admin/ordersKanban order board with real-time SSE updates
Bookings/admin/bookingsCalendar and list views for reservations
Variants/admin/variantsVariant groups and options (e.g. size, temperature)
Time Slots/admin/time-slotsBreakfast / lunch / dinner windows with per-dish pricing
Settings/admin/settingsTheme, service charge, basic fee, address, printer names

Backend Capabilities

  • Trilingual data model — every dish, time slot, and description carries *_ja, *_en, and *_zh fields
  • Role-based API auth — super_admin, admin, and staff with scoped permissions
  • Round-based ordering, per-item kitchen status, service charge, basic fee, payment tracking
  • Dine-in and takeaway — table QR orders and takeaway with pickup codes
  • Real-time updates — Server-Sent Events (/api/orders/stream) for live order board
  • Thermal printing — ESC/POS kitchen tickets and receipts via BLE
  • Rate limiting — sliding-window limits on public order endpoints

Customer CLI

The zest CLI lets customers and AI agents browse the menu, place orders, and check status — all from the terminal.

Installation

Terminal
npm install -g zest-cli# or run without installing:npx zest-cli <command>

Commands

CommandDescription
zest menuList all available dishes
zest menu --category sashimi --prettyFilter by category with human-readable output
zest dish <id>Show details for a single dish
zest order --mode dine-in --table T01 --items '[...]'Place a dine-in order
zest order --mode takeaway --name John --phone 5555 --items '[...]'Place a takeaway order
zest status <order_id>Check order status and items
zest infoShow restaurant settings
zest configureCreate config with API URL and customer token

Output Formats

  • Default output is compact JSON (agent-friendly)
  • --pretty enables human-readable terminal output with formatted prices

Configuration

The CLI stores settings in ~/.zest/config.json. Run zest configure to create this file automatically.

API URL precedence

  • 1. ZEST_API_URL environment variable
  • 2. apiUrl in ~/.zest/config.json
  • 3. Default: http://localhost:3898

Tech Stack

LayerTechnology
FrameworkNext.js 16 (App Router) + React 19
LanguageTypeScript 5
DatabaseSQLite via better-sqlite3 (WAL mode)
StylingTailwind CSS v4 + shadcn/ui
Authbcrypt + SHA-256 API keys (sk- prefix)
PrintingESC/POS, @abandonware/noble (BLE)
AIDeepSeek API (optional)
CLICommander.js + Axios
Package Managerpnpm (monorepo)

Configuration

Restaurant Settings

Configure your restaurant via the /admin/settings page. All settings are stored in SQLite and accessible via the REST API.

  • Theme — 4 built-in color themes (Sage Green, Ocean Blue, Crimson Red, Lavender Purple)
  • Dark mode — toggle between light and dark appearance
  • Service charge — enable/disable, set percentage (applied to orders)
  • Basic fee — per-person cover charge
  • Restaurant address and phone number
  • Printer names — configure kitchen and bar printer targets

Themes

Sage Green

Warm, earthy green — the original Zest palette

Ocean Blue

Cool, deep blue inspired by the sea

Crimson Red

Bold, rich crimson with depth

Lavender Purple

Soft, elegant purple tones

Thermal Printing

Zest supports BLE thermal printers for kitchen tickets and receipts. On macOS, printers must NOT be paired in System Settings — GATT access is required.

  • Kitchen tickets — food items go to kitchen printer, drinks to bar printer
  • Receipts — formatted bill with itemized charges, service fee, and total
  • QR code printing — print table QR codes directly to thermal printer