Multi-Device Offline LAN Sync for Flutter Waiter Apps and Kitchen Display App
The Goal
When the internet drops, all devices (Flutter Waiter Apps and KDS App) must continue working and updating each other in real-time over the local Wi-Fi router without relying on the cloud.
How It Should Work (The Architecture)
The "Local Master Host": Designate one primary device on the local network (such as a primary terminal or dedicated local node) to run a lightweight local backend service to act as the Local Host Server.
Local Data Routing: When a waiter places an order while offline, the Flutter Waiter App sends the order payload directly to this Local Host IP address over the local Wi-Fi.
Waiter to KDS: The Local Host instantly routes that order JSON payload to the specific web-based KDS screens (PHP/JS/HTML) based on station routing rules (e.g., kitchen vs. bar).
Two-Way Status Updates: When a chef clicks "Ready" on a web-based KDS screen, it sends an update back to the Local Host, which instantly pushes that status update over the LAN to refresh the Flutter Waiter App's local UI.
Auto-Cloud Sync: The system must save all offline transactions in a local cache. The moment internet connectivity returns, the system automatically pushes all saved data back to the central Karenderia cloud database.
The system must include an mDNS / Auto-Discovery feature so the Flutter Waiter apps and web KDS screens can automatically find the Local Host IP without manual configuration. It must use WebSockets for real-time, two-way communication between the Flutter frontend and web KDS terminals, alongside a clear visual sync status indicator (e.g., Green/Red Cloud) on all UIs showing the exact number of pending unsynced orders.
Log in to comment and vote
Comments7
Aydin_silver
Oct 8
Hello @Manprit, your idea is superb! I’d like to extend it to support all apps and the KMRS backend as well. Please also have a look at my new feature request.
Thank you!
Xiaru
Oct 8
Nice idea! Please also explain how it works.Thankyou