Product Architecture

How Flawls Workshop OS works

A walkthrough of the core domain model, booking-to-invoice lifecycle, role-based access and the rules engine that ties parts, jobs and billing together.

Booking → Invoice lifecycle

A single work order moves through these stages, each emitting events the rules engine listens to.

Customer books
Online or front desk
Work order
Assigned to a tech
Parts pulled
Stock decremented
In progress
Time tracked per bay
Invoice issued
Auto-synced to Xero
Paid & closed
Service history written

Domain model

Customer
Owns vehicles, accumulates service history, sees own invoices.
Vehicle
Linked to a customer. Holds VIN, rego, odometer + service intervals.
Work Order
The unit of work. Owned by an advisor, executed by a technician.
Stock Item
Inventory line. Auto-deducted when consumed on a work order.
Supplier
Source of stock. Drives reorder POs when items hit threshold.
Invoice
Generated from a completed work order. Mirrored to Xero.

Rules engine

Event-driven rules trigger automations across modules.

TriggerConditionAction
work_order.createdpriority = urgentNotify all techs + escalate in queue
work_order.status = awaiting_partsstock.qty < requiredAuto-create PO with primary supplier
work_order.status = completedGenerate invoice + email customer
invoice.dueAt < nowstatus ≠ paidMark as overdue + send reminder
stock.qty ≤ reorderAtFlag low-stock + queue PO draft
vehicle.odometer crosses intervalservice plan activeSend service reminder to customer

System architecture

Edge frontend
React + TanStack Router, deployed to the edge. Sub-150ms first paint.
Postgres core
Row-level security, JSONB for flexible job attributes.
Integrations
Xero (accounting), MechanicDesk (migration), SMS, email.
Migration ready. 105 customers, 943 jobs, 927 invoices, 118 vehicles, 238 stock items and 41 suppliers are mapped from the MechanicDesk export and ready for one-shot import.