Enterprise Ops.
Spreadsheets to real-time.
A high-volume production business running entirely on Google Sheets, a disconnected CRM, and WhatsApp status updates. We replaced all of it, order pipeline, sales dashboards, attendance tracking, profit analytics, and role-based access, with a single custom platform rated 10/10 by independent senior developer review.
7 people. 5 tools. Zero real-time visibility.
✕Spreadsheet Hell
Order tracking lived in Google Sheets. 7 team members editing simultaneously caused version conflicts, overwritten data, and no audit trail. When an order status changed, someone had to message the team on WhatsApp, and hope they saw it.
✕No Single Source of Truth
Customer data lived in a CRM that had no connection to orders. Attendance was tracked via WhatsApp messages. Monthly performance reports took 20 hours to compile manually from multiple spreadsheets. Every number was a guess.
5-stage order lifecycle. Fully automated.
Every order moves through a defined lifecycle. Each stage transition is logged with the responsible agent and timestamp. No order can be "lost" in a chat thread. Status changes trigger automated notifications to the right team members.
Order received from storefront or direct
Assigned to production team, materials allocated
Production complete, awaiting dispatch
Tracking number generated, customer notified
Confirmed delivered, payment reconciled
Every transition is immutable
The order_history table logs every field change: old value, new value, the agent who made the change, and an exact timestamp. Full audit trail. Any order dispute can be traced back to who changed what and when.
Three roles. Zero data leakage.
RBAC enforced at two layers: application logic and Supabase Row-Level Security policies at the database level. Even if someone bypasses the UI, they cannot read data they don't own. Permissions stored as a granular JSONB column per user.
- Full order pipeline, all stages, all agents
- Profit calculations and margin analytics
- All attendance records + payroll export
- User management + role assignments
- Monthly cost tracking and reporting
- Own pipeline only, no cross-agent visibility
- Create and update quotes + orders
- Customer communication thread
- Own performance metrics and targets
- Clock in/out (own records only)
- Pending production orders (IN_PRODUCTION)
- Mark orders as READY_TO_SHIP
- Production notes and file access
- No financial data, no sales data
- Own attendance records
Clock in/out. Auto-everything.
Replaced WhatsApp messages for attendance with a timestamped system. All times calculated in Pakistan Standard Time (PKT, UTC+5). Business day resets at 5AM. Auto-clockout triggers after 10 hours to prevent inflated records.
Pakistan Standard Time, no conversion errors
Each business day calculated from 5AM to 5AM
Automatic clockout prevents accidentally open sessions
Hours over target auto-flagged in attendance_summary
Shortfall tracked per employee per month
Monthly attendance summary ready for payroll processing
Profit tracked the same way
Every order has a profit column that is a PostgreSQL GENERATED ALWAYS STORED column: order_amount - production_cost - shipping_cost - marketing_cost. Updated automatically whenever any cost field changes. No spreadsheet formulas that drift.
One platform. Everything.
9 features, 14 database tables, 3 database views, and Edge Functions for automated summaries. All connected to the same Supabase instance powering the storefront.
Order Pipeline
Real-time order board with 5-stage lifecycle. Every status change triggers automated notifications and logs the responsible agent with timestamp.
Profit Analytics
Automated profit per order: revenue minus production cost, shipping, and marketing. No manual calculations. Updated the moment costs are entered.
Sales Agent Dashboards
Per-agent views: revenue generated, quote conversion rate, response time, and monthly targets. Managers see aggregated team data.
Attendance System
Clock in/out with PKT timezone (UTC+5). 5AM daily cutoff. Auto-clockout after 10 hours. Overtime and undertime calculated automatically.
Role-Based Access
ADMIN, SALES, PRODUCTION, granular permission sets stored in a JSONB permissions column. Row-Level Security enforced at the database level.
Full Audit Trail
Every order change logged to order_history with old value, new value, changed-by user ID, and exact timestamp. Zero accountability gaps.
Offline-First
Service Worker caches critical UI and data. Team in Pakistan can access order data during intermittent connectivity. Changes sync on reconnect.
APM + Error Tracking
Sentry integration for real-time error monitoring and application performance metrics. Any production issue is caught before the team notices.
Automated Summaries
Monthly attendance summaries and performance metrics auto-generated via Supabase Edge Functions. No manual report compilation.
Enterprise level. Every layer.
100% TypeScript. Offline-first. APM monitoring. Rated 9.4/10 code quality and 9.3/10 architecture by independent senior developer review.
What changed after launch.
Order status updates via WhatsApp, buried in threads
Real-time order board. Every agent sees live status. No messages needed.
Monthly reports took 20 hours to compile manually
Reports auto-generated. Monthly summaries run via Supabase Edge Functions.
7 team members editing the same Google Sheet
One platform with row-level isolation. Zero version conflicts.
CRM completely disconnected from orders
Customer data, order history, and communications in one view.
Attendance tracked by WhatsApp messages
Timestamped clock in/out. Overtime auto-calculated. Payroll export ready.
Profit calculated manually from separate sheets
Profit auto-computed per order as a database-generated column. Always accurate.