Client Context
UBCRM was developed as part of a bachelor thesis, motivated by operating a bar: customer data scattered across tools, informal scheduling, manual loyalty, and limited visibility beyond daily revenue. The product targets digital transformation for small and mid-sized venues without enterprise ERP cost.
The Challenge
Before
Bars often run POS, spreadsheets, DMs, and paper loyalty in parallel—no single operational source of truth.
Better
Peak service demands sub-second lookups on tablets, role-appropriate access, and real-time coordination across staff.
- Fragmented tooling and inconsistent loyalty
- No unified view of customers, staff, inventory, and campaigns
- Limited analytics for staffing, stock, and retention
The goal was a two-panel product: an admin/employee hub and a customer-facing loyalty experience—secure, real-time, and tablet-first.
Solution Architecture
Next.js 14 (App Router) + TypeScript for server components where possible, interactive islands for POS-like flows, and Tailwind + shadcn/ui for fast, accessible UI.
Supabase as Postgres + Auth + Realtime + Storage with RLS enforcing venue and role boundaries at the database.
Domain modules: CRM profiles with denormalized visit signals for peak performance, scheduling with conflict rules, inventory thresholds via triggers + Edge notifications, loyalty rules executed server-side with audit logs.
Key Implementation Decisions
Row-level security as the security backbone
Staff vs customer vs venue isolation enforced in Postgres—not only in UI—to reduce bypass risk.
Denormalization for peak-hour reads
Visit counts and last-visit stamps on customer rows to avoid heavy joins during service.
Realtime with resilient client hooks
Channels reconnect cleanly; optimistic UI for bookings and loyalty where latency hurts UX.
Materialized analytics paths
Hourly aggregates for dashboards to keep tablets responsive without scanning raw events every view.
Operational Impact
- Owners replace multiple disconnected tools with one operational hub.
- Staff recognize regulars faster with structured profiles and visit history.
- Inventory and booking signals reduce stockouts and double-booking friction.
- Customers engage through transparent loyalty instead of passive stamp cards.
Results
- End-to-end thesis-grade system demonstrating ERP-like value at SMB complexity.
- Real-time coordination patterns suitable for noisy, high-touch service floors.
- Security model aligned to multi-tenant venue data.
- Tablet-first UX with touch targets and flows tuned for on-floor use.
Technology Stack
- Frontend
- Next.js 14 (App Router), TypeScript, Tailwind CSS, shadcn/ui, Lucide React
- Backend
- Supabase (PostgreSQL, Auth, Realtime, Storage), RLS policies, Edge Functions
- Quality
- ESLint, Jest, React Testing Library
- Hosting
- Vercel + Supabase Cloud