TricomHub
Multi-tenant hotel booking SaaS / PWA for South Sudan. 40+ table PostgreSQL schema, 4-role RBAC, WhatsApp + M-Pesa + Resend integrations, 18-spec Playwright suite covering CRUD, auth, stress, and security (SQLi/XSS/IDOR/JWT).
What it is
TricomHub is a multi-tenant hotel booking SaaS / PWA built solo for the South Sudan market. Operators sign up, list rooms, accept M-Pesa or card payments, and serve installable PWA experiences across iOS and Android. Live at tricomhub.com.
The problem
Hospitality booking platforms in East Africa under-serve small and mid-tier operators — they're priced for global chains, demand integrations the local payment ecosystem doesn't have, and offer no PWA story for guests on flaky networks. Operators end up running their bookings on WhatsApp threads and shared spreadsheets.
What I built
Architecture
Next.js 15 App Router on Vercel for the public marketing site and operator dashboard, Supabase Postgres (40+ tables) for the multi-tenant data model, Better Auth for sessions and RBAC, Cloudflare in front for cache and DNS. The 4-role permission system (Owner / Manager / Staff / Guest) flows through every CRUD path and is enforced at the row-level via RLS.
Integrations
WhatsApp Business API (Meta) carries 27 message templates for booking confirmations, payment links, check-in reminders, and operator alerts — chosen over SMS because WhatsApp is ubiquitous in the region. M-Pesa STK Push handles payments. Resend sends transactional email. tawk.to provides live chat with AI context for operator support.
Security suite
Playwright specs (18 of them) cover CRUD, auth, stress paths, and the four classic web attack surfaces — SQL injection, XSS, IDOR, and JWT tampering — running on every PR. Catching IDOR via tests beats catching it in production.
PWA installability
Service worker + manifest + offline page for the guest experience. Tested on iOS Safari and Android Chrome; passes Lighthouse PWA audit.
Engineering decisions
Why Better Auth over NextAuth
Better Auth's session model maps cleanly to Supabase RLS policies, and its plugin system absorbed the multi-tenant role logic without bespoke wrappers. NextAuth would have needed adapter glue for the same multi-org behaviour.
Why WhatsApp templates over SMS
SMS reliability in South Sudan is uneven; WhatsApp delivery is closer to 99%. Templates also let operators stay within Meta policy without per-message review.
Why a 40-table schema, not fewer wider tables
Multi-tenant SaaS with strict RLS rewards normalisation. Wider tables make policy auditing harder and force every query to remember which columns belong to which scope. Narrow tables let RLS be obvious.
What I'd do differently
Wire the Playwright suite into Vercel preview deployments earlier — running it locally caught most bugs but two regressions made it to staging because I added the GitHub Actions integration only after launch. Also: build the operator onboarding wizard with a state machine from day one; the ad-hoc step ordering accumulated edge cases I had to refactor later.