Enterprise Ops.
Spreadsheets to real-time.
This is our own custom CRM and ops platform for the Panda Patches business, which once ran 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 built for exactly how the business operates.
The platform today, in production.
This is not a prototype. It is the live operating system the business runs on every day, and it keeps growing. The customer-facing portal has since moved to the marketing website; this is the internal staff CRM plus its shared serverless backend.
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.
13-status order lifecycle. Fully automated.
Every order moves through a defined lifecycle, from the linear happy path below to branch states like remake, cancellation, and refund. Each status transition is logged with the responsible agent and timestamp. No order can be "lost" in a chat thread, and status changes trigger automated email to the right people.
Order received from the marketing-site checkout or created by an agent
Assigned to production team, materials allocated
Production complete, QA check before dispatch
Tracking number generated, customer notified
Confirmed delivered, payment reconciled
Plus branch statuses (13 total)
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.
Real-time analytics, payments, RBAC, and automation across 23 staff routes and 20 Supabase Edge Functions, with Row-Level Security on every table. All connected to the same Supabase backend now shared with the customer portal on the marketing site.
Email Automation
Order confirmation, follow-up, and overdue payment reminders fire automatically, no manual sending.
Per-Agent Sales Reports
Each sales rep logs in and sees only their pipeline, targets, and conversion rate. Managers see the full picture.
Pending Amounts Dashboard
Every unpaid invoice, outstanding balance, and overdue account visible at a glance. No more chasing people for what's owed.
Order History & Repeat Customer Flags
See who's bought before, how often, and what they spent without digging through files.
Avg Order Value by Category
Instantly see which product lines are driving revenue and which are just taking up space.
Profit & Loss by Category
One click to see which categories are making money and which are bleeding it, no Excel required.
Single Dashboard
What used to live across 7 spreadsheets, 3 SaaS tools, and a WhatsApp group is now one screen. One login. One source of truth.
APM + Error Tracking
Sentry integration for real-time error monitoring and application performance metrics. Any production issue is caught before the team notices.
Offline-First
Service Worker caches critical UI and data. Team in Pakistan can access order data during intermittent connectivity. Changes sync on reconnect.
8+ financial reports. One date-range filter.
The reporting layer is the platform's core strength: a dedicated Reports page with date-range filtering across every analytical module, each one CSV-exportable and charted with Recharts. From gross-to-net revenue to a full income statement to Meta CAPI attribution quality, the answer is one click, not a 30-minute spreadsheet.
Sales Report
Gross vs. net revenue, AOV, daily trend, per-agent performance & commission, repeat-customer metrics.
Profit & Loss
Revenue vs. cost vs. net profit, cost-breakdown donut, and loss alerts for orders sold below cost.
Income Statement
Industry-standard P&L: gross β net revenue β COGS β gross profit β opex β net profit, with margins.
Cancellation & Refund
Lost revenue and reason-category breakdown for cancelled and refunded orders.
Product Mix
Revenue, cost, and margin by patch type and by quantity band (1β50, 51β100, 101β200, 200+).
Lead Source Distribution
Lead volume by channel β Search, Social, Paid Ads, AI/LLM, Referral β pulled from quotes.
Funnel & Attribution
Quoteβorder conversion, quote-flow bypass detection, and Meta CAPI data-quality breakdown.
Customer & Form Feedback
1β5β satisfaction from order notes and ease-of-use ratings from website quote forms.
Wired into the tools the business already runs on.
Payments, ads attribution, transactional email, and monitoring all flow through the same backend, no copy-paste between systems.
Supabase
Postgres Β· Auth Β· Storage Β· Realtime Β· 20 Edge Functions
Meta CAPI
Server-side purchase/lead events, reversal on refund
Square
Public payment links (/pay/:token) + checkout
Stripe
Balance & payout webhooks (idempotent)
ZeptoMail
Transactional email for every order milestone
Sentry
APM + error tracking via first-party proxy
Vercel
Frontend hosting, SPA routing, asset caching
Enterprise level. Every layer.
100% TypeScript. Offline-first. APM monitoring. An internal senior-developer code review scored it 9.4/10 for code quality and 9.3/10 for architecture; that review was commissioned by us and is not an independent third-party audit or certification.
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.
What this actually meant for the business.
Before this platform, running the business meant opening 7 spreadsheets, scrolling WhatsApp for updates, and hoping nothing fell through the cracks. Now it doesn't.
Order tracking, agent reports, attendance, payments, inventory, profit tracking, and customer records β all in one place. One login. One screen.
No more manually compiling reports, chasing agents for updates, or cross-referencing files. The dashboard updates in real time.
Which category is profitable? Who are your repeat customers? What's owed? The answer used to take 30 minutes. Now it takes one click.