Order-driven inventory system for a restaurant (with real-world constraints)
inventra is a modern restaurant operating system, inspired by real-world products used in emerging markets. It models how orders, inventory, and kitchen workflows interact under conditions like unreliable internet and high transaction volume.
inventra is designed to reflect how restaurants actually operate:
- Orders are placed through a POS interface
- Each order triggers automatic inventory deduction based on predefined recipes
- Orders move through a lifecycle: Pending β Preparing β Completed
- The system is built with resilience in mind, simulating offline-first behavior and real-time updates
This project focuses on system behavior, not just UI.
Inventory is not manually edited. Instead:
- Each menu item is mapped to ingredients (recipe system)
- When an order is placed, ingredient quantities are deducted automatically
Example:
1 Plate of Jollof Rice β 0.25kg Rice
5 Plates β 1.25kg deducted from inventory
Orders transition through clearly defined states:
PENDING β PREPARING β COMPLETED
- Pending: New order, not yet handled
- Preparing: Kitchen is working on it
- Completed: Order fulfilled
- Orders appear instantly after being placed
- UI updates dynamically without page reloads
- State transitions reflect immediately across the system
Designed with unreliable networks in mind:
- Orders can be created while offline
- Data syncs when connection is restored
- Local storage used as a temporary queue
The POS (Point of Sale) acts as the system entry point:
- Staff take orders on behalf of customers
- Orders are sent to the kitchen and inventory system simultaneously
- POS interface for order creation
- Inventory dashboard (kg/L based tracking)
- Automatic ingredient deduction via recipes
- Orders management (Pending, Preparing, Completed)
- Real-time UI updates
- Offline-first behavior (planned/implemented)
- Activity tracking (optional extension)
- Frontend: React / Next.js
- State Management: (e.g., Zustand / Context API)
- Styling: Tailwind CSS
- Data Handling: Local state + mock API / IndexedDB (for offline support)
This project goes beyond a typical CRUD application by modeling:
- Event-driven updates (orders triggering inventory changes)
- Multi-state workflows (order lifecycle)
- Data consistency challenges (inventory vs concurrent orders)
- Real-world constraints (network instability)
# Clone the repo
git clone https://github.com/tobe01/inventra.git
# Navigate into project
cd inventra
# Install dependencies
npm install
# Run development server
npm run dev
π Future Improvements
Backend integration (Node.js / Express)
WebSocket-based real-time updates
Payment simulation and transaction logging
Multi-device sync
Role-based access (cashier, manager, kitchen)
π€ Inspiration
This project is inspired by modern restaurant operating systems and fintech-driven business tools used across emerging markets.
π€ Author
Tobechi Duru
Top-rated Software Engineer
Portfolio: https://tobechiduru.vercel.app
GitHub: https://github.com/Tobe01
LinkedIn: https://www.linkedin.com/in/tobechiduru
π License
MIT License
---