The Bakery Co. Platform
CH Studios · Full Business Operating System
Overview
The Bakery Co. Platform is a full business operating system — five connected surfaces built on a single Supabase backend. A customer website, an 18-section admin dashboard, an iOS employee scheduling app, an iOS POS, and an iOS customer app, all HTTP clients against the same REST API. The architecture is multi-tenant from the start: every table carries a tenant_id, and onboarding a new client is one database row and a frontend deploy.
The Problem
Small businesses run on fragmented tools. A bakery takes custom orders by DM, tracks inventory in a notebook, manages staff schedules by text message, and pays 15–30% commission to DoorDash or Uber Eats to get found online. There's no single source of truth — the owner can't see revenue, labor costs, and inventory in the same place, let alone act on any of it from their phone at 6am.
Five Surfaces
Customer Website
HTML · CSS · JS · Node.js · Express · RenderThe public-facing storefront. Fuzzy search via Fuse.js, Stripe checkout, Crumb Rewards loyalty, gift card redemption, coupon validation, and subscription ordering. 100 Lighthouse across all categories. 70ms interaction response across 20 pages.
- Collaborative filtering upsell — co-purchase frequency → curated pairings → time-aware cross-sell → best sellers
- WebMCP integration — menu search, hours, and checkout registered as browser-native AI tools (Chrome 146+, W3C WebMCP)
- Birthday coupon cron — generates
BDAY-XXXXXXXXat 8am, 15% off, expires midnight
Admin Dashboard
18 Sections · JWT Auth · Email-VerifiedThe full business management backend. Orders, revenue analytics, menu CMS, inventory, gift cards, subscriptions, customer loyalty, coupons, prep list, staff accounts, job applications, and more. JWT verified server-side on every API route. All reads and writes scoped to tenant_id.
KnotEmployee — iOS Scheduling App
SwiftUI · @Observable · Supabase Realtime · APNs · DenoMulti-tenant iOS scheduling and workforce management app. Drag-and-drop weekly schedule builder, labor cost reports, shift swaps, time-off requests with PTO balance tracking, and direct messaging. APNs push notifications delivered via Deno Edge Function triggered by database events.
- Supabase Realtime — live clock-in status and schedule updates across all connected devices
- Custom KnotTheme design system with BakeryCoTheme and full dark mode





iOS POS
SwiftUI · Stripe TerminalIn-person point-of-sale for card payments via Stripe Terminal. An in-person sale is just another order in the same orders table — visible immediately in the admin dashboard queue.
iOS Customer App
SwiftUI · Supabase iOS SDKNative iOS ordering app. Same Supabase backend, same REST API, same menu data — another HTTP client against the same endpoints as the website.



Live Site
Technical Highlights
Webhook-First Payments
The Stripe charge is confirmed via webhook before the order is written to the database. If the server crashes between payment and save, Stripe retries delivery until the order is recorded. No phantom orders.
MCP Server
A production Model Context Protocol server with three tools: get_menu, get_hours, and place_order. AI assistants can browse the menu and complete a Stripe transaction without touching the website.
APNs via Deno Edge Function
Push notifications fire from a Deno Edge Function triggered by Supabase database events — decoupled from the Express server so a Node.js outage can't silently drop mobile notifications.
Crumb Rewards Loyalty
Loyalty points use a Supabase RPC function that increments atomically inside the database. A read-then-write pattern would drop points on concurrent orders — the RPC prevents that race condition entirely.
API-Level Auth
Hiding a button in the browser isn't security. Every admin API route verifies the JWT server-side before any data is touched — regardless of what the UI shows.
@Observable Over ObservableObject
KnotEmployee uses Swift's @Observable macro for finer-grained observation — only views that depend on a changed property re-render. Critical for a scheduling app where one Realtime event can't ripple through the entire view hierarchy.
Business Impact
- 0% commission per order — vs. 15–30% on DoorDash or Uber Eats. On a $50 order, that's $7–15 back in the owner's pocket every time.
- Replaces $200–500/month in SaaS tools — Square Online, Toast, scheduling apps, and POS software are all replaced by one platform the business owns.
- One source of truth for the whole business — the same order that comes in through the website shows up in the admin queue, deducts from inventory, triggers an APNs notification in KnotEmployee, and generates a prep list item automatically.
- Multi-tenant and ready to scale — onboarding a new client is one database row and a frontend deploy. No backend changes, no schema migration.
Outcome
The web platform is live on Vercel with real Stripe payments. KnotEmployee is in TestFlight and targeting the App Store. The architecture covers the full engineering surface of a real software business — frontend, API design, relational database, real payments, mobile development, background jobs, push notifications, transactional messaging, and AI integrations — all on a single multi-tenant backend.