MGA Overview
Delegated authority, bordereaux, and producer management.
The Carrier Portal (apps/carrier-portal, oi-sys-carrier) is a Next.js application for insurance carrier operations teams. It gives carriers real-time visibility into their book of business — programs, producers, bordereaux submissions, claims, financial reconciliation, and binding authority matrices — all scoped behind the carrier_admin JWT role.
| Environment | URL |
|---|---|
| Production | https://carrier.openinsure.dev |
| Local dev | http://localhost:3005 |
GET https://auth-dev.openinsure.dev/api/auth/sign-in/microsoft ?callbackURL=https://carrier.openinsure.dev/api/auth/callbackThe portal sets the oi_carrier_token httpOnly cookie verified against CARRIER_JWT_SECRET.
| JWT role | Description |
|---|---|
carrier_admin | Full carrier portal access |
superadmin | Platform-wide access |
system | Machine-to-machine (M2M) |
Role enforcement is in apps/carrier-portal/lib/auth.ts. Unauthenticated requests redirect to /login.
| Section | Page | Route |
|---|---|---|
| Overview | Dashboard | / |
| Book | Bordereaux | /bordereaux |
| Book | Claims | /claims |
| Book | Programs | /programs |
| Authority | Binding Authority | /authority |
| Finance | Financials | /financials |
| Finance | Reconciliation | /financials/reconciliation |
| Finance | Treaties | /treaties |
| Governance | Audit Log | /audit |
Navigation badges (/api/badges) poll every 60 seconds to show unread counts on Bordereaux and Claims.
/)Portfolio KPI overview with four metric cards:
Below the KPIs: recent bordereaux submissions table (period, status, premium, claims) and program health summary.
API: GET /v1/analytics/mga + GET /v1/bordereaux (most recent 5)
/bordereaux)Full listing of bordereaux reports with status badges (pending / reviewed / approved / rejected). Clicking a row opens the detail page with line-level premium and claims data. Reviewers can approve or flag individual submissions.
API: GET /v1/bordereaux + GET /v1/bordereaux/:id
/claims and /claims/:id)Claims table with filters by status, loss date, and program. Claim detail shows:
Real-time claim status management via ClaimStatusManager component.
API: GET /v1/claims + GET /v1/claims/:id
/programs and /programs/:id)Carrier program list with premium-to-limit ratios and loss summaries. Program detail shows the full underwriting guidelines, rate table associations, and historical bordereaux.
Program settings (rate filing status, max aggregate limit, reinsurance attachment) are viewable and can be proposed for edit — changes require admin approval.
/authority)Interactive AuthoritySwitch component showing the carrier’s delegated authority matrix:
Changes to authority limits flow through the approval queue.
/financials)TigerBeetle-backed financial views:
Period toggles: MTD / QTD / YTD.
/financials/reconciliation)FinancialReconciliationTable component — unreconciled ledger entries between the MGA’s books and carrier statements. Entries can be marked reconciled inline.
API: GET /v1/reports/reconciliation + PATCH /v1/reports/reconciliation/:id
/treaties and /treaties/:id)Reinsurance treaty listing and detail. Each treaty shows:
/audit)Immutable activity trail scoped to the carrier’s org. Filterable by action type, user, and date range. Exportable to CSV.
The portal proxies through apps/carrier-portal/app/api/[...path]/route.ts:
GET /v1/analytics/mgaGET /v1/bordereauxGET /v1/bordereaux/:idPATCH /v1/bordereaux/:id/approvePATCH /v1/bordereaux/:id/rejectGET /v1/claimsGET /v1/claims/:idPATCH /v1/claims/:id/statusGET /v1/programsGET /v1/programs/:idGET /v1/activitiesGET /v1/reports/reconciliationPATCH /v1/reports/reconciliation/:idGET /v1/reports/financialsGET /v1/treatiesGET /v1/treaties/:idAny request not in the allowlist returns 403 Forbidden.
| Variable | Description |
|---|---|
CARRIER_JWT_SECRET | JWT signing secret — set via wrangler secret put |
API_URL | API worker base URL (e.g., https://api.openinsure.dev) |
NEXT_PUBLIC_APP_NAME | "Carrier Portal" — set in wrangler.toml [vars] |
# Set the JWT secret (production)wrangler secret put CARRIER_JWT_SECRET --name oi-sys-carrier
# Local dev (.env.local)CARRIER_JWT_SECRET=9d79c38aa7d57bd24a1afe213848b2b935519afb08a3923ac112aed71fd5bc21API_URL=http://localhost:8787DEMO_MODE=trueThe Carrier Portal deploys as an OpenNext Cloudflare Worker (oi-sys-carrier):
cd apps/carrier-portalnpx opennextjs-cloudflare deploy -- --keep-vars
# Or via pnpm filterpnpm --filter @openinsure/carrier-portal deployCI deploys automatically from master when apps/carrier-portal/ or shared packages change.
MGA Overview
Delegated authority, bordereaux, and producer management.
Reinsurance
Treaty management, cession calculations, and cash calls.