A React + Vite prototype for an insurance underwriting case review UI. Frontend-only — all case data is hardcoded. Two features (dynamic UI layout and condition Q&A) call the OpenAI API.
Create a .env.local file in the project root:
VITE_OPENAI_API_KEY=sk-...
This is required for two features to work:
- Dynamic UI layout — calls
gpt-4.1-minito generate JSON component specs for each condition - Condition Q&A ("Ask") — calls
gpt-4o-minito answer underwriter questions grounded in patient data
Without the key the app still loads, but those features will silently fail.
npm install
npm run devOpens at http://localhost:5173. Hot module replacement is active — edits to .tsx files reflect immediately in the browser.
npm run buildOutput goes to dist/. Use npm run preview to serve the build locally.
npx tsc --noEmit # type check only, no output
npm run lint # ESLintsrc/
App.tsx # Root — switches between CaseList and CaseViewV3
CaseList.tsx # Case list / home screen
CaseViewV3.tsx # Main case review view (the active one)
CaseViewV1.tsx # Older prototype variants (not used in App.tsx)
CaseViewV2.tsx
CaseView.tsx
NarrativeView.tsx # Narrative/summary sub-view
AddApplicantPanel.tsx
AnalysisLoadingScreen.tsx
ComponentGallery.tsx
registry.tsx
catalog.ts
api.ts
CaseViewV3.tsx is the primary file. It is large (~3800 lines) and contains all condition data, UI components, and the ExitModal inline.
- Tailwind CSS v4 via
@tailwindcss/vite— notailwind.config.js, config lives in CSS. - No routing library — view switching is a
useStateinApp.tsx('list' | 'case'). - All case data is hardcoded in
CaseViewV3.tsx. There is no API or database. - Navigation from case → list goes through
ExitModal(a feedback survey), which calls theonBackprop on skip or submit.