
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.
If the business runs on spreadsheets and WhatsApp, this is what replaces them.
You take custom or made-to-order work. Orders arrive from a website, from ads, from social, and from people who simply message you. A team quotes them, a floor makes them, and somebody has to know at any moment what is owed, what is late, and which agent is due commission. If that is your business, this is the shape of the answer. If you sell a fixed catalogue off a shelf with no production stage, an off-the-shelf store will serve you better and we will tell you so.
Every lead, with where it actually came from
A quote records its source when it arrives: search, paid ads, social, referral, or an AI assistant. Click identifiers from Meta, Google, Microsoft and TikTok are captured with it and carried through to the order, so the channel that produced the money is still attached to it months later. Six server-side functions report purchases and leads to Meta from the server rather than the browser, and a refund or cancellation triggers a reversal call for that purchase. What the ad platform then does with it is Meta's behaviour, not ours to promise. Where a source cannot be observed, the customer can say how they found you. Both are kept on the order as distinct evidence, so any figure drawn from them later can state which kind it rests on and each order is counted once.
Orders that carry their own history
An order moves through a defined lifecycle from enquiry to delivered, with branch states for remakes, cancellations and refunds. Every field change is logged with who changed it and when. Notes, customer messages, mockups, production files and shipping documents live on the order itself, not in somebody's inbox.
Agents see their own work, and their own money
A sales agent opens the platform and sees the orders assigned to them, what each is worth, which are still unpaid, and what they earned last month. Commission is calculated from the orders themselves rather than reconciled by hand at month end. An agent cannot see another agent's book, and cannot see cost or margin at all unless that permission is granted.
The production floor has its own queue
Digitising and stitching run on a work queue separate from the customer-facing order status, so the floor moves a job along without anyone having to translate that into something a customer would understand. It replaced a Google Sheet the floor had run since August 2025: 1,779 rows were imported and reconciled line for line, and 27 different spellings of the product types were collapsed into 13 canonical ones so a price could attach to each. A digitiser sees the job they were assigned and nothing else: no customer identity, no conversation, no pricing.
Invoices and emails that send themselves
Order confirmations, a PDF invoice the moment an order is paid in full, follow-ups and overdue payment reminders all send on their own, through one email service with a single template system behind it, so a new message is a template rather than a new piece of plumbing. Three were added between 10 August and 15 September 2026. The invoice fires exactly once per order, which matters more than it sounds: the payment provider delivers the same notification several times. Payment runs through Square, by checkout or by a payment link an agent generates for one customer. Nobody has to remember to send anything, which is the point.
Repeat customers, recognised as such
Lifetime value, order history and repeat rate sit on the customer record, and loyalty tiers move on their own as that spend grows. Duplicate customer records are detected and merged rather than quietly splitting one buyer's history in two.
Reporting that answers a question, not a spreadsheet
Twelve reports behind one date filter: revenue against cost and net profit, an income statement, product mix by type and quantity band, cancellations and refunds with reasons, lead source, funnel and attribution, agent performance, customer feedback and loyalty. Every one exports to CSV. Orders sold below cost are flagged rather than waiting to be noticed.
Attendance and hours, without a second system
Staff clock in and out in the same platform. Hours, overtime and undertime are calculated against a fixed business day and export for payroll. Sessions left open are closed automatically rather than inflating somebody's month.
What it replaced. A spreadsheet estate, a CRM that did not know about orders, attendance over WhatsApp, and monthly reports compiled by hand. We have not published a figure for the hours or the subscriptions that removed, because no record of either was kept and we will not estimate one. What the platform does is above; what it is built from is below.
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.
One team. Five tools. Zero real-time visibility.
βSpreadsheet Hell
Order tracking lived in Google Sheets. Simultaneous editing 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 were compiled by hand from several spreadsheets.
17-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.
Seven roles. Enforced at the database.
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 27 authenticated routes and 26 Supabase Edge Functions, with Row-Level Security enabled on all 59 tables. All connected to the same Supabase backend now shared with the customer portal on the marketing site.
Email Automation
Order confirmation, a PDF invoice the moment an order is paid in full, follow-up, and overdue payment reminders all fire automatically, no manual sending. A deposit does not trigger it; staff can send an invoice by hand from the order at any time.
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 a spreadsheet estate, several SaaS tools, and a WhatsApp group is now one screen. One login. One source of truth.
APM + Error Tracking
Sentry captures browser errors and page-load traces from the staff app, proxied through a first-party route so an ad blocker cannot silence it. The Edge Functions are not covered by it: a failure there is written to the platform logs and has to be looked for.
Offline-First
Service Worker caches critical UI and data. Team in Pakistan can access order data during intermittent connectivity. Changes sync on reconnect.
Twelve 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 a report with a date filter, not an afternoon of cross-referencing.
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 Β· 26 Edge Functions
Meta CAPI
Server-side purchase/lead events, reversal on refund
Square
Checkout, public payment links (/pay/:token), payment webhooks
ZeptoMail
Transactional email for every order milestone, including the PDF invoice sent when an order is paid in full
Sentry
APM + error tracking via first-party proxy
Vercel
Frontend hosting, SPA routing, asset caching
Enterprise level. Every layer.
100% TypeScript, strict mode, with the build passing clean. Offline-first. APM monitoring. A code-quality review was commissioned by us in 2026; its scores are withdrawn from this page because the review document could not be located during a source audit on 15 September 2026. The engineering facts on this page are counted from the repository instead.
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 were compiled by hand from several sheets
Reports auto-generated. Monthly summaries run via Supabase Edge Functions.
A whole team editing the same Google Sheet
One platform where each row is written independently, so two people working at once are not editing the same document.
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 computed per order as a database-generated column, from the same inputs every time, rather than re-derived by hand in a sheet.
What this actually meant for the business.
Before this platform, running the business meant opening a stack of 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.
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? Each is a report with a date filter, not an afternoon of cross-referencing.
Everything that was built.
The method behind this, written up
The decisions behind this platform are written up in the guides, if the reasoning is more useful than the outcome:
- Build versus buy for business software β the scenario test that decides whether a platform like this is worth building at all.
- How to cut a SaaS bill without inventing the savings β how to price the five tools a custom platform replaces, honestly.
- Auditing SaaS pricing with evidence β the reconciliation that shows what the old stack actually cost.
- Do you own your website? β what ownership means for custom software, and what to get in writing.
The code-review scores are withdrawn.
This page used to publish scores from a code review we commissioned. A source audit on 15 September 2026 could not locate the review document, its rubric or the reviewer, so the scores are withdrawn rather than restated from memory. They were also presented as an independent review, which they were not: we commissioned and paid for them. The figures on this page are counted from the repository, and each one records where it was counted in case-study-facts.json.
Frequently Asked Questions
What is a custom business operations platform?
A custom business operations platform is a single web application that replaces multiple disconnected SaaS tools, like CRMs, spreadsheets, attendance trackers, and reporting tools. This is PandaCodeGen's own custom ops platform for the Panda Patches business: we replaced multiple separate tools with one Supabase-backed platform featuring real-time order tracking, 12 financial reporting modules, RBAC, Square payments with a PDF invoice emailed once an order is paid in full, server-side Meta CAPI ad tracking, employee attendance, and automated profit calculations.
How much does it cost to replace Google Sheets with a custom business dashboard?
A custom business dashboard replacing spreadsheets, a CRM, and manual reporting is quoted against the number of roles, data tables, and automation requirements. This platform replaced a spreadsheet estate, a disconnected CRM and manual attendance tracking. We have not published what those cost or how many hours they took, because no record of either was kept.
What is role-based access control (RBAC) and why does a small business need it?
RBAC means each user only sees the data their role requires. In this platform: ADMIN sees full financials and all agents; SALES sees their own pipeline only; PRODUCTION sees pending orders with no financial data. We enforce this at two layers, application logic AND Supabase Row-Level Security policies at the database level, so even direct API access is blocked.
How long did it take to build the Enterprise Operations platform?
The full platform, a Supabase schema with Row-Level Security, a 17-status order pipeline, 12 reporting modules, RBAC with RLS policies, payments via Square, attendance with PKT timezone, automated profit calculations, and 26 Supabase Edge Functions, has been in continuous development since November 2025 and is still being added to. A code review was commissioned by us in 2026, but its scores are withdrawn from this site: the review document, its rubric and the reviewer could not be located during a source audit on 15 September 2026.
Can a custom dashboard work offline?
Yes. We implemented a Service Worker that caches the critical UI and data. Team members in Pakistan with intermittent internet connectivity can still access order data and make updates, which sync automatically when the connection is restored.