218 Bros POS
Touch-first POS desktop app for a fast-casual restaurant, with real-time inventory and dual-printer receipts
// At a glance
Problem
The restaurant needed a fast, touch-first point-of-sale that could handle a complex build-your-own menu, print to both a kitchen and cashier printer, and keep inventory accurate in real time, without relying on a hosted POS SaaS.
Solution
Built a native desktop POS with Tauri: a React/TypeScript UI over a Rust backend handling IPC commands, an embedded SQLite database, a recipe-rule engine that deducts ingredient stock per order, and dual-protocol printing (ESC/POS network printing for the kitchen, Windows RAW printing for receipts) with cash-drawer control.
// Key highlights
- →Transactional order flow: stock is validated before printing, and inventory only committed after print success
- →Recipe-rule engine mapping menu selections to ingredient consumption for real-time inventory deduction
- →Dual-protocol printing: ESC/POS over TCP for the kitchen, Windows RAW printing for cashier receipts, plus cash-drawer control
- →Fully admin-editable menu model with a seed/reset template instead of hardcoded menus
- →Modular React frontend with swappable POS layouts driven by shared hooks
A touch-first point-of-sale desktop application built for a fast-casual restaurant (build-your-own tacos/bowls, sandwiches, salads, pasta, wok bowls). It handles order taking through a step-by-step item builder, cart management, dual-printer receipt/kitchen ticket printing, real-time inventory deduction from recipe rules, and a full admin panel for managing menu categories, ingredients, and pricing — all running as a native desktop app via Tauri.
Tech Stack
- React 19 + TypeScript (frontend)
- Tauri 2.x (Rust-backed native desktop shell)
- Rust backend (
src-tauri) exposing IPC commands - SQLite via
rusqlite(bundled, embedded local database) - Tailwind CSS 3 + PostCSS for styling
- Vite 8 for build tooling and dev server
- ESLint 10 + typescript-eslint for linting
- Local persistence via
localStoragefor user settings - ESC/POS over TCP (kitchen printer) and Windows RAW printing (cashier receipts)
Key Features
- Multiple configurable POS layouts (classic grid, cart-first, tiles, inline builder) selectable per deployment
- Dynamic, admin-editable step-by-step item builder (categories → steps → options)
- Cart with quantity controls, live totals, and item editing
- One-click "Print & Pay": prints kitchen ticket + cashier receipt and opens the cash drawer
- Recipe-rule engine mapping category/option selections to ingredient consumption
- Real-time inventory deduction with stock validation before committing an order
- Low-stock alerts and quick-action shortcuts on the POS bottom bar
- Full admin console: categories, ingredients, recipes, extras, expenses, orders, stats, and receipt layout editor
- Seed/reset action to reload a default menu template
- Order history and receipt preview modals
- Toast notifications and confirmation dialogs for consistent UX feedback
Architecture
The app is a Tauri desktop application: a React/TypeScript UI communicates with a Rust backend over Tauri's IPC bridge, backed by an embedded SQLite database via rusqlite. Business state is organized into focused custom hooks (useCart, useBuilder, useAdmin, useSettings), keeping App.tsx a thin ~60-line shell that just wires bootstrap data and tab routing to POSScreen and AdminScreen. Printing and inventory are handled server-side in Rust: orders validate stock, deduct inventory computed from recipe rules, and persist the order transactionally only after required print steps (kitchen ESC/POS over TCP, cashier RAW printing on Windows) succeed. The menu/category/step/option model is fully dynamic and admin-editable rather than hardcoded, with a seed template for quick resets.
My Role
Designed and implemented the full stack: the Rust/Tauri backend commands (get_bootstrap_data, save_admin_data, reset_default_data, print_and_pay), the transactional inventory-deduction logic tied to a recipe-rule engine, dual-protocol printing (ESC/POS network printing plus Windows RAW printer output with cash-drawer control), and a modular React frontend with swappable POS layouts driven by shared hooks rather than duplicated state logic. Notable engineering decisions include validating stock before any print action and only committing inventory/order changes after print success, avoiding orphaned orders or false low-stock states.