Frontend
Next.js · role-gated routes
Agent flow (`/app/*`)
v1
Six-screen flow the writing agent runs during a live call.
- Login
- Lead capture (manual name + phone)
- Demographics (DOB, ZIP, gender, tobacco)
- Health screen (with elimination rules)
- Quote results (price blank in v1)
- SMS handoff (banking link to customer)
Admin dashboard (`/admin/*`)
v1
Same Next.js app, role-gated. Mike's "we become the source" surface.
- Carriers (enable / disable, metadata)
- Products + comp grids (CSV upload)
- Agents + state authorization (per agent / per carrier / per state)
- Health logic (questions + elimination rules)
- Audit log feed
PAL Coach overlay
v2
Live AI coaching pop-up over the agent flow. Show / hide controls per Mario's SVA Loom reference.
Backend & Data
Postgres · GCP + GKE Autopilot
Database
v1
Single Postgres DB, tenant-aware via `agency_id`. Stack call (Postgres vs Supabase) pending Ben's review of Avi's prototype.
- Customers, quotes, health responses
- Carriers, products, comp grids
- Agents, state auth, product appointments
- Admin users (5 roles)
- Audit log (append-only)
- SMS handoff sessions
Auth + RBAC
v1
Server-side enforcement. Five roles: super admin, admin, agent, agent+downline, PP staff.
Audit log
v1
Append-only. Every admin write captured with before / after value. PP-staff actions surfaced separately to agency super admin.
PII encryption
v1
Postgres `pgcrypto` AES-256 for name, phone, DOB, SSN, banking. SSN + banking never returned to agent / admin APIs.
External Integrations
SMS, pricing, telephony, licensing
Twilio SMS
v1
Sends customer-side link for SSN + banking entry. A2P registration started 2026-05-06 (7-9 day clock).
Pricing API (substrate)
v1.5
Real-time carrier quote pricing. Vendor decision pending: iPipeline LifePipe, CompuLife, or FE Quote. Until live, v1 ships with price blank - agents fall back to logging into carrier portal.
Zendesk webhook
v2
Inbound call event triggers Right Quote with name + phone pre-filled. Replaces manual lead capture in v1.
SureLC (agent licensing)
open
Source of truth for which states / carriers each agent is appointed for. Integration model TBD: API pull, scheduled export, or manual maintenance.
Carrier portals
v1
Manual login by agent for application submission. RPA dropped from v1. API submission TBD with substrate decision.
Identity verification (Proov)
open
Placeholder flag in carrier settings. Build deferred until Proov contract review lands.