PandaCodeGen
+1 (302) 250-4340

info@pandacodegen.com

Internal ToolCustom Business Dashboard10/10 Dev Rating

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.

95%
Process Automation
was near-zero manual processes
Live
Reporting
was daily manual CSV exports
10×
Efficiency Gain
team of 7, one platform
10/10
Developer Rating
Code 9.4 · Arch 9.3 · UX 10/10
The Problem

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.

Tool Being Replaced
Cost
Problem
Google Sheets (order tracking)
Free but 8 hrs/wk
No real-time sync. 7 team members editing simultaneously caused version conflicts
Separate CRM
$50/mo
No connection to orders or production. Duplicate data entry for every customer
WhatsApp order updates
Free but chaotic
Status updates buried in chat threads. No searchability, no accountability
Manual attendance tracking
$30/mo
Clock in/out via WhatsApp messages, no overtime tracking, no payroll export
Spreadsheet reporting
20 hrs/mo
Monthly performance reports compiled manually from multiple sheets
Solution, Order Pipeline

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.

1
NEW_ORDER

Order received from storefront or direct

2
IN_PRODUCTION

Assigned to production team, materials allocated

3
READY_TO_SHIP

Production complete, awaiting dispatch

4
SHIPPED

Tracking number generated, customer notified

5
DELIVERED

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.

Solution, Access Control

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.

ADMIN
  • 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
SALES
  • 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)
PRODUCTION
  • 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
Solution, Attendance

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.

PKT (UTC+5)Timezone

Pakistan Standard Time, no conversion errors

5AM PKTDay Cutoff

Each business day calculated from 5AM to 5AM

10 hrsAuto-Clockout

Automatic clockout prevents accidentally open sessions

AutoOvertime Calc

Hours over target auto-flagged in attendance_summary

AutoUndertime Calc

Shortfall tracked per employee per month

CSVPayroll Export

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.

Platform Features

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.

Tech Stack

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.

React 18
Frontend UI
TypeScript
100% type safety
Vite
Build tooling
Tailwind CSS
Styling
Supabase
Database + Auth + RLS
TanStack Query
Server state + caching
Framer Motion
UI animations
Sentry
APM + error tracking
Row-Level Security
Supabase RLS policies
Service Worker
Offline-first capability
PostgreSQL
Database (via Supabase)
Edge Functions
Server logic
Results

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.

Full Scope

Everything that was built.

14-table Supabase database schema with Row-Level Security
5-stage order pipeline (NEW_ORDER → DELIVERED)
Immutable order_history audit log, every change attributed
RBAC: ADMIN, SALES, PRODUCTION roles with granular JSONB permissions
Sales agent dashboards, revenue, conversion rate, response time per agent
Customer quote management with email template system
Automated profit calculation: order_amount − production − shipping − marketing
Employee attendance with PKT timezone, 5AM cutoff, auto-clockout
Monthly attendance summaries with overtime/undertime tracking
Payroll export (CSV) from attendance_summary table
Performance metrics table for goal tracking
3 database views: orders_with_details, sales_agent_reports, active_attendance_sessions
Supabase Edge Functions for automated monthly reporting
Sentry APM + error tracking integration
Offline-first via Service Worker, works on poor connectivity
100% TypeScript with zero implicit any
TanStack Query for optimistic updates + server state
Framer Motion animated UI, rated UX 10/10
Independent Review

Rated 10/10 by a senior developer.

9.4/10
Code Quality
Type safety, separation of concerns, zero implicit any
9.3/10
Architecture
RLS policies, audit trail, RBAC design, DB schema
10/10
UX / Design
Framer Motion transitions, dark/light, accessibility