Operations app · restaurant (web + mobile)
Restaurant stock management — web and mobile on one backend
IN PRODUCTION · Vercel · verified 02 Jul 2026
Context
An independent restaurant in Spain — a single location, a small team — manages a stock of ingredients and consumables whose levels directly determine the next day's service.
Problem
Stock tracking was a manual routine: count at the end of service, spot what's missing, pass the shopping list to whoever does the buying. Three concrete risks: a forgotten item doesn't get restocked, a late count blocks the order, and nobody can check afterwards who entered what.
Approach
The project was framed by a requirements document with explicit, numbered business rules (R01 to R07): a critical threshold per item, one entry per item per day, deactivated items hidden, submission allowed from 80% of items entered, closed entries immutable for staff with manager corrections logged, negative quantities rejected, dates handled in the restaurant's timezone. The definition of done was set before development: the day's shopping list generates itself and goes out as a notification with no human step in between.
What was delivered
- Web app: Next.js 16 (App Router), React 19, strict TypeScript, Tailwind CSS 4, deployed to production on Vercel.
- Backend: Supabase — PostgreSQL with Row Level Security, JWT + SSR cookie authentication, item photo storage.
- Three role levels: staff (entry only), manager (dashboard, items, corrections, manual generation), admin (users, settings). Automatic role-based routing; sign-out after 8 hours of inactivity.
- Automatic shopping-list generation with three triggers: closing the evening count, a manager button, and a daily safety-net cron. Every active item at or below its critical threshold enters the list, with tracking statuses (to order → ordered → received).
- WhatsApp notification: Meta WhatsApp Cloud API implemented server-side, every send attempt logged in the database.
- Mobile app: Expo SDK 56 / React Native 0.85, iOS and Android, same Supabase backend with zero schema changes. Encrypted session, client-side validation backed by server-side RLS; a deployed Supabase Edge Function handles closing and generation so secrets stay server-side, never on the phone.
Stack
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS 4
- Vercel
- Expo SDK 56
- React Native 0.85
- iOS + Android (EAS build)
- Supabase (PostgreSQL + RLS, Auth, Storage, Edge Function)
- Meta WhatsApp Cloud API
- daily Vercel cron
Observed results
As of 02 Jul 2026, the web application responds in production on Vercel; the chain evening count → threshold check → list generation runs with no manual step, with a daily cron as a safety net.
Vercel deployment · HTTP 200 · verified 02 Jul 2026
Mobile app built with EAS (iOS + Android) on the same Supabase backend; store submission pending.
EAS build · state Jun 2026
What stays human
The system counts, compares, and notifies; it does not decide. Critical thresholds and order quantities are set by the manager. Post-closing corrections remain a manager action, logged in an audit trail. The final purchasing decision — supplier, substitution, postponement — belongs to the person receiving the list. No time-saved figure is published here: the prior process was never measured, and this site does not publish metrics reconstructed after the fact.