# π½οΈ Open Source Restaurant POS System (React + SurrealDB)
### β‘ Fast β’ Multi-Branch β’ Touch Optimized β’ Full Restaurant Operations Platform
A complete **restaurant management ecosystem** built for real-world cafΓ©s, restaurants, and food chains.
Designed to handle everything from **ordering β kitchen β delivery β staff β reporting β inventory** in one unified system.
---
## π Live Demo
π **Try it here:** [Demo](https://ahmedali5530.xyz/posr.html)
π Login: `1234, 0000, 5555`
---
## π₯ Why This Project?
Most restaurant systems are:
- β Fragmented (POS, delivery, HR all separate)
- β Not built for real-time restaurant pressure
- β Weak staff workflow management
- β Hard to scale across branches
- β No proper authentication or protected modules
This system solves that by combining everything into one platform:
- β‘ Real-time restaurant operations
- π½οΈ Full kitchen + order lifecycle
- π Advanced dish & modifiers management
- π Built-in delivery workflow
- π¨βπΌ Staff + manager + admin roles
- π Secure protected modules
- π Full reporting & analytics layer
- πͺ Multi-branch scalable system
- πͺ Seat-based ordering & splitting
- π Multi-order table management
- βοΈ Realtime Sync to cloud
- πΎ Automatic backups
- π° Automatic check closing + closing cycles
- π Multiple menus support
- π³ Third-party payment gateways support (Stripe, PayPal, M-Pesa, etc.)
- π¨οΈ ESC/POS Printing Support (USB, Network, Serial, Bluetooth)
---
## β¨ Core Modules
### π½οΈ POS & Order Management
- Table-based ordering system
- **Seat-Based Ordering & Splits:**
- **Seat Assignments:** Assign specific dishes to individual seats for organized service.
- **Split by Seat:** Easily split a large table's bill into separate orders based on seat assignments.
- **Multi-Order Table Management:**
- **Concurrent Orders:** Support for multiple independent orders on the same table simultaneously.
- **Visual Indicators:** Clear tracking of the number of active orders per table on the floor layout.
- Fast item selection & modifiers
- Split / merge / cancel / transfer orders / refunds
- **Split & Half-n-Half Payments:** Flexible payment options allowing customers to split bills or pay for half-n-half dish combinations.
- **Extras & Service Charges:**
- **Automated Service Charges:** Apply percentage-based or fixed service charges to orders.
- **Custom Extras:** Add additional charges for special requests, packaging, or premium services.
- **Rule-based Application:** Automatically trigger extras based on order type, payment method, or specific tables.
- Real-time cart updates
- Instant billing flow
---
### π Dish Creation & Advanced Modifiers
- **Flexible Dish Management:** Create and organize dishes with custom pricing, tax rules, and multi-category assignments.
- **Excellent Modifiers Support:**
- **Modifier Groups:** Group related options (e.g., "Sides", "Toppings", "Meat Temperature").
- **Nested Modifiers:** Support for complex ordering flows where choosing a modifier opens another set of choices (e.g., Select "Combo" β Select "Side" β Select "Drink").
- **Price Overrides:** Set specific prices for modifiers when they are part of a particular group or combination.
- **Rules & Constraints:** Define minimum and maximum selections per group.
- **Visual Menu Builder:** Intuitive interface for designing the customer-facing menu.
---
### π¨βπ³ Kitchen Display System (KDS)
- Live incoming orders
- Status tracking:
- Received
- Preparing
- Ready
- Served
- Reduced communication delays between staff & kitchen
- Recall orders
---
### π Delivery Management App
- Custom built delivery apps with multiple menu support
- Realtime updates to customer
- Delivery order assignment
- Driver status tracking
- Order dispatch flow
- Delivery completion updates
- Separate delivery workflow from dine-in
- **Smart Coupons & Discounts:**
- **Flexible Discount Types:** Support for fixed amount, percentage-based, and free shipping coupons.
- **Usage Constraints:** Set minimum order amounts, maximum discount caps, and usage limits per user.
- **Time-Based Validity:** Schedule coupons for specific dates, times, or days of the week.
- **Targeted Rules:** First-order only coupons and stackability controls.
- Uses Google maps to display orders and updates
---
### π± Order Taking App (Waiter App)
- Mobile-first order entry
- Table selection & quick ordering
- Instant sync with kitchen
- Lightweight POS mode for staff devices
- Full touch compatible modules for faster order processing
---
### π¨βπΌ Manager App (Admin Control Center)
- Real-time business dashboard
- Sales & performance analytics
- Staff performance tracking
- Branch-level reporting
- System configuration
---
### π° Automatic Checks & Closing Cycles
- **Automatic Check Closing:** Configure system to automatically close open checks after a specific idle time or at end-of-day.
- **Closing Cycle Enforcement:** Prevent new orders when a closing cycle is required.
- **Shift & Day Closing:** Streamlined workflow for ending staff shifts and daily business cycles.
- **Real-time enforcement:** Instant notifications when cycles need to be closed.
---
### π Multiple Menus Support
- **Custom Menu Creation:** Create different menus for different times (e.g., Breakfast, Lunch, Dinner).
[//]: # (- **Branch-specific Menus:** Assign specific menus to different restaurant branches.)
- **Dynamic Pricing:** Set different prices for items across different menus.
- **Delivery App Integration:** Link specific menus to delivery app.
---
### π³ Third-Party Payment Gateways
- **Integrated Payments:** Support for popular payment gateways.
- **Multi-Provider Support:**
- π³ **Stripe** (Credit/Debit Cards)
- π
ΏοΈ **PayPal**
- π± **JazzCash / M-Pesa** (Mobile Payments)
- **Secure Processing:** PCI-compliant flows with sandbox/live mode support.
- **Instant Settlement:** Real-time payment verification and order status updates.
---
### π¨οΈ ESC/POS Printing Support
- **Multi-Interface Support:** Print to thermal printers via **USB**, **Serial**, **Network (TCP/IP)**, or **Bluetooth**.
- **Specialized Print Builders:**
- π³ **Kitchen Tickets:** Clear, priority-coded slips for kitchen staff.
- π§Ύ **Customer Receipts:** Professional final bills with payment details and change.
- π **Delivery Slips:** Includes customer address, phone, and delivery notes.
- π **Pre-sale Bills:** Temporary slips for table service before final payment.
- π **Sales Summaries:** Comprehensive end-of-day/shift, P-Mix, Server Sales reports directly from the printer.
- **Branding & Customization:**
- Support for **custom logos** (Base64) and company branding.
- Configurable **VAT/Tax details** and headers/footers.
- Adjustable margins and item display preferences.
- **Reliable Architecture:** Independent Node.js print server ensures printing doesn't block the main POS application.
---
### π§βπΌ Staff Management & Shifts
- Shift creation & scheduling
- Clock-in / clock-out tracking
- Work hour monitoring
- Staff assignment per branch
---
### π Protected Modules & Role System
- Role-based access control:
- Admin
- Manager
- Waiter
- Kitchen Staff
- Delivery Staff
- ... and Custom roles
- Protected routes & permissions per module accross web and mobile platforms
- Secure operational separation
---
### π° Tips Distribution System
- Track collected tips
- Automatic tip pooling
- Staff-based distribution rules
- Shift-based tip allocation
---
### β±οΈ Time Tracking System
- Employee working hours tracking
- Shift duration monitoring
- Late/early detection
- Attendance history logs
---
### π¦ Inventory Integration
- **Stock-Aware Menu System:** Real-time visibility of ingredient availability.
- **Recipe-Based Deduction:** Automatically deduct stock based on dish recipes when orders are placed.
- **Comprehensive Stock Management:**
- **Purchase Orders & Returns:** Manage supplier orders and incoming inventory.
- **Internal Issues & Returns:** Track stock movement between stores or kitchen departments.
- **Waste Tracking:** Log and analyze food waste to optimize costs.
- **Multi-Store Support:** Manage inventory across different storage locations or branches.
- **Low Stock Alerts:** Automated notifications when items fall below safety levels.
- **Supplier Management:** Maintain a database of suppliers and their performance.
---
## β‘ Speed-Focused UX
Built for real restaurant pressure situations:
- Minimal clicks ordering
- Touch-screen-friendly workflow
- Quick table switching
- Optimized for peak-hour usage
---
## ποΈ Tech Stack
- βοΈ React.js (Frontend)
- ποΈ SurrealDB
- π Websockets Architecture
- ποΈ Realtime Database-driven inventory & orders
---
## πΈ Screenshots





---
## π₯ Key Highlights
- Built specifically for **restaurant workflows**
- Handles **real-time order lifecycle**
- Designed for **high-pressure environments**
- Supports **multi-table restaurant operations**
- Scalable for **small cafΓ©s β multi-branch restaurants**
- **Delivery apps**
- **Order taking apps**
- Manager apps for **authentication and reporting**
---
## β‘ Quick Start with Docker
```bash
git clone https://github.com/ahmedali5530/restaurant-pos
cd restaurant-pos
bun install
docker compose up -d
```
---
## π§ Roadmap
- Offline mode support
- Advanced analytics dashboard
- AI-based reporting and demand forecasting
- Multi-branch synchronization improvements
- Payroll system integration
- Account module integration
- OR Code and Self ordering system
- Tap-to-pay payments on mobile apps
- Targeted sales system for performance
- Multi-currency support
- Advanced inventory analytics
- Loyalty module
---
## π€ Contributing
Want to improve this system?
Fork the repo π΄
Create a feature branch πΏ
Submit a PR π
---
## β Support
If this project helps you, please consider giving it a β on GitHub.
It helps increase visibility and motivates continued development.