Operations Workbench
The Operations Workbench (workbench.openinsure.dev) is an internal single-page application for staff who need direct, low-latency access to the rating engine, policy records, compliance matrices, and reporting tools.
Access: Internal MGA staff only. No portal cookie is required — auth is handled by the
Cloudflare Access policy on the workbench.openinsure.dev hostname.
Stack
| Layer | Technology |
|---|---|
| Framework | Vite + React 19 |
| Routing | TanStack Router v1 (type-safe, file-based) |
| State | TanStack Store |
| Rate limiting | TanStack Pacer + react-pacer |
| Hosting | Cloudflare Pages SPA (oi-sys-workbench) |
| API | Same oi-sys-api as all portals |
Dev server:
PORT=3003 pnpm --filter @openinsure/workbench dev
# Port 3000 is taken by code-assist-mcp in local dev
Features
Interactive Rater
Live premium calculation with full factor waterfall, schedule rating inputs, and PDF adverse action export.
Policy Detail
Full policy record view — jacket, endorsements, claims, payments, documents, and event history.
State Requirements
Jurisdiction-by-jurisdiction compliance matrix — notice periods, form filings, surplus lines requirements.
Reporting
On-demand loss runs, cession summaries, and audit exports without going through the Finance Portal.
Interactive Rater
The rater connects directly to POST /v1/rating/submit and streams the factor waterfall in real time. It is used by underwriters to:
- Re-rate a risk with schedule adjustments before quoting
- Explain why a premium changed between policy terms
- Validate rate table updates before activating new versions
Factor waterfall view
Each rating step is displayed with:
- Step name and input value
- Factor applied (from which rate table)
- Intermediate premium after the step
- Cumulative change vs. prior step
Debit/credit factors are shown in red/green. UW-applied schedule debits/credits are editable inline.
Adverse action export
When a schedule debit is applied that increases premium by ≥ 10%, a PDF adverse action notice can be generated directly from the rater with one click. The notice includes all factors that resulted in a rate above the filed base rate.
Policy Detail
The Policy Detail view (/workbench/policies/:id) is a read-optimized view of the full policy record. Unlike the portal views, it exposes all internal fields including:
- Raw policy jacket sections (insured, coverages, filings, interests, conditions)
- All endorsement history with premium adjustments
- Claims linked to the policy with reserve movements
- TigerBeetle ledger entries for all premium transactions
- Durable Object event stream (if
POLICY_EVENTSDO is instrumented)
State Requirements Matrix
/workbench/state-requirements shows a sortable, filterable grid of insurance regulatory requirements by state:
| Column | Source |
|---|---|
| State | All 50 states + DC + territories |
| Non-pay notice period | @openinsure/compliance domicile rules |
| UW cancellation notice | Varies by line; compliance engine enforces |
| Surplus lines eligible | @openinsure/domicile |
| Form filings required | By line and state |
| SLSF rate | State surplus lines stamping office fee |
The matrix is read from the compliance engine at render time — it always reflects the current state of the domicile rules, not a static snapshot.
Reporting
Staff-facing reports not available in the Finance Portal:
| Report | Path |
|---|---|
| Loss run (any policy) | /workbench/reporting/loss-run |
| Cession statement draft | /workbench/reporting/cession |
| UW audit export | /workbench/reporting/uw-audit |
| Rate factor explain | Embedded in the Interactive Rater |
Reports are generated on-demand and can be exported as CSV or PDF.
Routing (TanStack Router)
Routes are defined in src/routes/. TanStack Router v1 uses file-based routing with full TypeScript inference on route params and search params.
// src/routes/policies/$id.tsx
export const Route = createFileRoute('/policies/$id')({
loader: ({ params }) => fetchPolicy(params.id),
component: PolicyDetailPage,
});
Search state (filters, pagination, selected tab) is managed via TanStack Router's search param API — no URL manipulation needed.
See the URL State guide for the shared nuqs pattern used in the Next.js portals (the workbench uses TanStack Router's native search API instead).