Six connected systems.
Tap any one to see the diagram.
Order flow
Show diagram & details
A customer places an order on the storefront or app. The payment goes through Stripe. The moment the payment intent succeeds, the Supabase realtime channel fans the event out: your CRM board lights up, the kitchen ticket prints, stock auto-deducts from the recipe table, loyalty points credit to the customer, and the notification log records it all.
Rewards engine
Show diagram & details
Every qualifying action writes to loyalty_transactions with points and a reason. A background job recomputes the customer's tier based on trailing-12-month spend. Redemptions unlock specific rewards (free coffee, free main, delivery credit) — they're never a vague currency at checkout. That keeps the math legible to both the customer and the owner.
Campaigns & automations
Show diagram & details
Automations are event-driven: a customer hits 30 days without ordering, a VIP has a birthday, a stock item goes critical. The rule engine matches them to a segment, waits out any delay, picks a channel (SMS, email, push), and sends. Every send opens a 7-day attribution window so you can see revenue recovered per campaign.
AI voice calls
Show diagram & details
Inbound calls hit a Twilio number. The AI agent classifies intent (place an order, check status, speak to a human) and handles it end-to-end or hands off. Order placement collects items and address, creates a pending order, and SMSes a payment link. Every minute of voice burns 10 credits logged in credit_transactions — you see exactly what each call cost.
Driver dispatch
Show diagram & details
The moment an order is marked ready, the dispatcher checks your rules. Internal driver online? Offer it. Nobody home? Fall back to Uber Direct or DoorDash Drive automatically. Live ETA streams back to the customer app. Proof-of-delivery closes the loop.
Super Admin → merchant configuration
Show diagram & details
You (the platform operator) flip a module from the Super Admin console. The update writes to businesses.modules_json. Every merchant CRM reads that map via useModule() on mount — disabled modules disappear from the sidebar, disabled API routes return 403, and billing recalculates. This is how we support a personal trainer and a 20-location franchise on the same codebase.