Pantry ยท Sequence Diagrams

Key system flows from sensor signal to user action

1
Auto Low-Stock Detection Live โ€” Sprint 5
Sensor Pi Hub Edge Fn Threshold Check Supabase DB React App Lerato MQTT: weight = 120g POST /webhook {rice < threshold} INSERT pending_item ok: {item_id} push notification Rice is running low Approve UPDATE status: confirmed โœ“ Added to shopping list UPDATE inventory_items.quantity
2
Receipt Scan โ†’ Inventory Update Sprint 3 โ€” Live
Lerato React App Edge Fn Receipt Scanner Cloud Vision Google OCR Supabase DB upload receipt photo POST /scan-receipt {image} annotateImage() {items, prices, store name} parse + map items items for review confirm items INSERT receipts + inventory_items ok: {updated counts} โœ“ 8 items added to pantry
3
In-Store Shopping List Phase 2 โ€” WhatsApp Bot
Thabo WhatsApp Bot Edge Fn Shopping List Supabase DB "shopping list" GET /shopping-list SELECT active_items {6 items} formatted list Rice, Milk, Eggs, Butter... "tick rice" PATCH /items/rice UPDATE purchased = true โœ“ Rice marked as bought NOT YET BUILT โ€” PHASE 2
โ€” solid: request/call - - dashed: response/return annotation: internal step