Pantry ยท System Architecture
Phase 1 built ยท Phase 2 planned ยท Updated 2026-03-29
CLIENTS & PRESENTATION Lerato browser Thabo mobile browser Grace Phase 2 REACT WEB APP (Vite) Cloudflare Pages ยท pantry-app.tapfumamv.com Dashboard stock ยท expiry ยท alerts Inventory CRUD ยท filter ยท search Scan Receipt upload ยท review ยท sync Shopping List auto ยท manual ยท in-store Budget monthly ยท category ยท store Household members ยท roles ยท invites Recipes Sprint 5 Intelligence Sprint 5 Email Import Sprint 5 WhatsApp Bot Thabo ยท Grace stock queries ยท list updates Phase 2 Voice / Nest Hub Google Actions "Do I have rice?" Phase 2 BACKEND SERVICES Supabase Auth Email + password JWT sessions ยท magic link Role-based access (RLS) PostgreSQL Database osmtvniihyxpkadjvyur.supabase.co ยท households ยท household_members ยท inventory_items ยท baseline_stock ยท categories ยท receipts ยท budget_periods ยท recurring_items ยท shopping_lists Sprint 5 ยท recipes Sprint 5 RLS ยท all tables Edge Functions Supabase ยท Deno runtime Receipt OCR Handler calls GCV โ†’ parses โ†’ inserts items Inventory Sync CRUD ยท baseline deviation check Shopping Trigger low-stock โ†’ list auto-add Sprint 5 below Prediction Engine consumption rate โ†’ restock date Email Order Parser Sixty60 ยท Woolies Dash email HA Webhook Receiver sensor signal โ†’ threshold eval Google Cloud Vision OCR ยท receipt text extraction LINE_DETECTION ยท confidence score vision.googleapis.com Cloudflare Pages CDN Static build ยท global edge pantry-app.tapfumamv.com Gmail API order confirmation emails Sixty60 ยท Woolies Dash parsing Sprint 5 Push Notifications low stock ยท expiry ยท threshold alert Phase 2 IOT LAYER โ€” PHASE 2 (MELISSA'S HARDWARE STACK) Weight Nodes ร—3 D1 Mini + HX711 5 kg / 50 kg load cells WiFi โ†’ MQTT Distance Sensor VL53L0X ToF Laser Shelf presence detection I2C โ†’ D1 Mini โ†’ MQTT Zigbee Buttons SONOFF Dongle MG21 Manual stock trigger Raspberry Pi 5 Hub Home Assistant automations ยท threshold rules ยท UI MQTT Broker Mosquitto ยท sensor message bus Zigbee2MQTT Dongle bridge ยท device pairing HA REST / Webhook Client POSTs to Pantry Edge Fn on trigger Melissa's Existing Stack "Automate what you can. The rest is left to human intervention." ยท Weight sensors under canisters ยท Liquid sensors in bottle caps ยท Zigbee press-buttons for manual triggers ยท HA fires WhatsApp + Nest Hub queries today ยท Pantry app becomes her output & approval layer HTTPS / REST served via CDN PostgreSQL SQL/RLS HTTPS POST OAuth ยท fetch Realtime trigger MQTT HTTPS POST LEGEND Phase 1 (built) Phase 2 (planned) Realtime / WebSocket MQTT (IoT) Sprint 5 scope Phase 2 scope