SYS.01 · CRM
Trifid X 2.0
Enterprise sales CRM running a media group across ten countries.
- Client
- Trifid Media
- Year
- 2025—2026
- Role
- CTO · Architect & lead engineer
- Category
- CRM · SYS.01
This system runs behind a company login. There is no public screenshot of it — the plate carries its verified numbers instead.
The numbers
272
backend functions
189K
leads under management
94
entity schemas
10
countries
32
RBAC roles
119K
lines of code
The engineering
Dual-database architecture. Base44 is the transactional source of truth, synced one-way into Supabase as a read replica. The frontend never touches Supabase directly — every read routes through a single
supabaseProxyfunction that auto-scopes non-admins to their own country, so data isolation is enforced in one place instead of 45 pages.Immutable quotation versioning. A quotation points at
current_version_idandlast_approved_version_id, each a frozensnapshot_jsonrecord. Approval locks the quote and any revision opens a fresh draft cycle, with a separate approval gate for VAT removal — the audit trail is a consequence of the data model, not a log written beside it.Lead-claiming under concurrency.
LeadTicketcarries a 20-day creator window, idempotency keys and dual-writes to both databases, guarded by a 7-signal duplicate detector — Instagram handle, company, name+company, email, phone-last-9 and name+country.Compliance and gamification as first-class subsystems: meeting-quota enforcement (3/day, 3-strike restriction, 10-meetings-in-48h recovery, pinned to Asia/Dubai) alongside leaderboards, battle-pass quests and daily missions.
Stack
- React 18
- Vite 6
- Base44
- Deno
- Supabase
- TanStack Query
- Tailwind
- Stripe
- Xero
