Architecture

The architecture reflects a pragmatic choice: use tools I already knew (Google Sheets) and extend them with code.

01

User (Browser)

02

Next.js Frontend

React + Tailwind

03

Next.js API Routes

Chat · Sales Parser · OCR · Data Ops

04

Google Apps Script

Backend Logic

05

Google Sheets

Database


Why This Stack

Technical decisions and the reasoning behind each choice.

Decision Reasoning
Google Sheets as database Already the tool I used for manual inventory. Zero infrastructure cost. Familiar to restaurant staff. Built-in audit trail.
Google Apps Script as backend Native integration with Sheets — no ORM, no connection strings. Deployed as a web app in one click.
Next.js as frontend Modern UI framework with built-in API routes, eliminating the need for a separate server. Easy deployment to Vercel.
Chat-based interface Lower learning curve than dashboards for non-technical kitchen staff. Feels like texting, not using software.
OpenAI for intent routing Converts natural language into function calls — no rigid command syntax to memorize.

Data Model

Google Sheets structure — each sheet serves as a table in the system.

Sheet Purpose
Inventory Current stock levels (main supplier)
InventoryCanam Current stock levels (CANAM supplier)
IngredientsUsed Ingredient catalog with conversion factors & suppliers
Plates Food recipe definitions (ingredients per dish)
Drinks Beverage recipe definitions
SalesItems POS transaction data (uploaded from Excel)
Critical Levels Minimum stock thresholds per ingredient
PendingOrders Staged orders awaiting review