Restricted access
Subdomain
2026
MaiaHub
A lead CRM that keeps the history and flags when a follow-up is due
An internal system. Access is restricted to authorised users.
A client-acquisition CRM used every day by a social-security law firm. It centralises each lead, records where the referral came from, follows the contact until it converts and flags when a follow-up is due.
The problem
Acquisition lived in spreadsheets and WhatsApp threads: no reliable history, no sense of where each contact stalled, and nobody remembering to get back to the ones left halfway. The client had one specific and fair fear, a data leak, and it drove most of the technical decisions.
The solution
A lead registry carrying each referral source and the tracking all the way to conversion, plus follow-up reminders so no contact goes cold by oversight. Built solo, from gathering requirements with the client to the running system.
How it was built
Authorization in three layers. Middleware blocks any route without a valid session and revalidates the token against the server on every request instead of trusting the local cookie. Each API route checks again whether the user is still active, so deactivating someone cuts access immediately, even with a session still open in their browser. And Postgres Row Level Security is the last line: even with a bug in a route, the database refuses the query. Sessions live in httpOnly cookies, never in localStorage, and no client-identifying data travels in the URL.
Stack
- Next.js
- TypeScript
- Supabase
- PostgreSQL
- Tailwind CSS
- Vercel
- In production
- A social-security law firm
- Format
- Solo, from start to live
- Data
- Row Level Security on Postgres