SaaS platform case study
The Cloud Bakery OS
A multi-tenant platform running every part of a bakery, production planning, inventory, ordering, delivery routes and the traceability the FSA asks for, in place of the spreadsheets and paper most of them run on.
Overview
One platform.Every part of the operation.
The Cloud Bakery OS replaces the patchwork of spreadsheets, paper records and disconnected tools most artisan bakeries run on. Production, inventory, ordering, delivery, compliance and staff management sit in one place instead of six.
It is a multi-tenant product: each bakery gets an isolated environment with its own branding, its own customer portal, and a plan matched to its size. Built by MK TechLAB and owned by The Cloud Bakery Ltd.
25+
Operational modules
200+
API endpoints
50+
Database tables
4
Subscription tiers

Architecture
Built for scale from day one
Tenancy is enforced in the data layer rather than in the interface, so no query can run without it.
Multi-tenant isolation
Every table is scoped to a tenant context, and all queries are filtered at the middleware layer, no query ever runs without tenant isolation. Admin impersonation is fully audited.
White-label customer portal
Each bakery gets a slug-routed portal with their own branding, product catalogue and customer accounts. Guests can check out without registering.
Six-role RBAC
Platform Owner, Platform Admin, Owner, Manager, Worker and Driver, each with precisely scoped permissions. Feature access is further gated by subscription tier.
Subscription tiers
Demo, Starter, Professional and Enterprise plans. Feature flags and usage limits are enforced at the API layer on every request.
FSA-compliant traceability
Full "field to fork" batch and lot traceability. Forward and backward trace, recall management, FIFO lot allocation and expiry tracking, built to FSA one-step traceability requirements.
GDPR field encryption
Field-level encryption on all personal data, email, phone, address, name, supporting right-to-erasure with a single delete operation.
Modules
Twenty-five modules.Twelve of them here.
Twelve of the twenty-five, covering the floor, the office and the customer's door.
Recipe & ingredient management
Recipe versioning with auto-calculated nutrition facts, allergen tracking (all 14 UK allergens), cost analysis, and multi-output support.
Production planning
Daily and weekly scheduling with demand-based suggestions, FIFO lot allocation, bake sheet PDF generation, and order-linked production plans.
Inventory & stock
Real-time stock tracking across multiple locations, reorder points, demand forecasting, expiry warnings, and purchase order management.
Order management
Customer order creation, standing and recurring orders, status tracking from pending to delivered, route assignment, and invoice generation.
Route optimisation & delivery
Route planning with the Google Maps API, driver assignment, delivery window management, proof of delivery, and real-time route updates.
Label designer & printing
Visual drag-and-drop label designer with dynamic data binding, barcode and QR support, batch printing, and print queue management.
Batch and lot traceability
FSA-compliant "field to fork" traceability with forward and backward trace, recall management, expiry tracking, and supplier lot linkage.
Training academy
Online courses with modules, quizzes, multimedia assets, certificate generation, external trainee invitations, and guest access.
Kiosk mode
Touch-optimised full-screen interface for production floor tablets, time clock, production tasks, simplified navigation.
Time clock & payroll
PIN-based employee time tracking with break management, GPS location, overtime detection, manager approval, and payroll export.
Analytics & reporting
Real-time KPI dashboard, revenue by product, customer and route, production efficiency, profit margins, and CSV, Excel and PDF export.
White-label customer portal
Slug-routed customer portal with custom branding, product catalogue, guest checkout, order history, and reCAPTCHA v3.
Tech stack
A modern, production-proven stack
Frontend
- Next.js 15
- TypeScript
- Tailwind CSS
- shadcn/ui
- React Hook Form
- Chart.js / Recharts
- @dnd-kit
Backend
- Next.js API Routes
- Prisma ORM
- Database driver
- Password hashing
- JWT auth
- Zod validation
Database
- MySQL 8.0
- Field-level encryption
- Comprehensive relational schema
Infrastructure
- Vercel
- Object storage (CDN)
- Redis (caching)
- Google Maps API
- Nodemailer + Resend
Security & compliance
- GDPR field encryption
- CSRF protection
- RBAC (6 roles)
- Audit logging
- FSA compliance
- Rate limiting
Notable decisions
Engineering highlights
Dual database layer
The ORM handles schema management and type safety. Direct database connections are used for performance-critical queries. The hybrid approach gives both without over-engineering either.
Route optimisation algorithm
A custom optimiser built on the Google Maps Roads API calculates delivery sequences from delivery windows, driver availability and live traffic, saving fuel and time on every round.
AI-assisted demand forecasting
Recipe optimisation suggestions and demand forecasting help bakeries plan production more accurately, which in a business that throws away what it does not sell is the difference that pays for the software.
Label designer with drag-and-drop
Built on @dnd-kit, the designer allows fully custom product labels with dynamic data binding for weight, allergens and expiry dates, barcode and QR support, and batch printing to connected printers.
Training academy with certification
A built-in learning management system trains staff with structured courses, quizzes and auto-generated certificates. External trainees can be invited through token-based guest access.
Audit trail on every change
Every user action is logged with actor, target, timestamp, IP and user agent. The audit system underpins GDPR compliance and gives platform admins visibility across every tenant.