A demo-ready prototype for an insurance Property & Casualty (P&C) auto claim processing workflow. Built as a brownfield-ready monorepo designed for later modernization/upgrade work by an autonomous agent.
| Layer | Technology | Version |
|---|---|---|
| Frontend | Angular + Angular Material | 17.3.12 |
| Backend | Spring Boot + JPA + H2 | 3.2.5 |
| Tests | JUnit 5, Karma/Jasmine, Playwright | — |
| CI | GitHub Actions | — |
- Java 20+ (JDK)
- Maven 3.9+
- Node.js 20+ and npm
- Chrome/Chromium (for Karma tests)
cd backend
mvn spring-boot:run- API runs at http://localhost:8080
- Swagger UI at http://localhost:8080/swagger-ui.html
- H2 Console at http://localhost:8080/h2-console (JDBC URL:
jdbc:h2:mem:claimsdb, user:sa, no password)
cd frontend
npm install
npm start- App runs at http://localhost:4200
docker-compose up --build- Frontend: http://localhost:4200
- Backend: http://localhost:8080
# Backend unit tests
cd backend && mvn clean test
# Frontend unit tests
cd frontend && npm test
# Frontend E2E (requires both backend and frontend running)
cd frontend && npx playwright test
# Or use the Makefile
make test # Run all tests
make test-backend # Backend only
make test-frontend # Frontend only
make e2e # Playwright E2E# Backend (Checkstyle)
cd backend && mvn checkstyle:check
# Frontend (ESLint)
cd frontend && npm run lint
# Or use the Makefile
make lintpnc-claims/
├── backend/ # Spring Boot API
│ ├── src/main/java/com/pnc/claims/
│ │ ├── controller/ # REST controllers
│ │ ├── entity/ # JPA entities
│ │ ├── repository/ # Spring Data repositories
│ │ ├── service/ # Business logic
│ │ └── config/ # CORS, etc.
│ ├── src/main/resources/
│ │ ├── application.properties
│ │ └── data.sql # Seed data (5 claims, 5 policies, 3 users)
│ ├── src/test/ # JUnit tests
│ ├── checkstyle.xml
│ └── pom.xml
├── frontend/ # Angular 17 app
│ ├── src/app/
│ │ ├── components/ # Dashboard, FNOL, ClaimDetail, Triage, Settlement
│ │ ├── services/ # ClaimsService (HTTP client)
│ │ └── models/ # TypeScript interfaces
│ ├── e2e/ # Playwright E2E tests
│ ├── .eslintrc.json
│ ├── angular.json
│ └── package.json
├── tickets/ # Jira-style work tickets (markdown)
├── .github/workflows/ci.yml # GitHub Actions CI
├── docker-compose.yml
├── Makefile
└── README.md
- FNOL — First Notice of Loss intake (
/fnol) - Triage & Assignment — Rule-based or manual adjuster assignment (
/claims/:id/triage) - Investigation — Attach documents, add notes (Claim Detail view)
- Reserve Decision — Approve/deny with calculated or manual amount
- Settlement & Payment — Issue payment (
/claims/:id/settlement) - Closure — Close with optional subrogation flag
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/policies |
List all policies |
| GET | /api/policies/{id} |
Get policy by ID |
| GET | /api/claims |
List claims (optional ?status=) |
| POST | /api/claims |
Create claim (FNOL) |
| GET | /api/claims/{id} |
Get claim details |
| PATCH | /api/claims/{id}/status |
Update claim status |
| GET | /api/claims/{id}/events |
Get status history |
| POST | /api/claims/{id}/assignments |
Auto or manual assign |
| POST | /api/claims/{id}/reserve-decision |
Approve/deny reserve |
| POST | /api/claims/{id}/documents |
Add document metadata |
| POST | /api/claims/{id}/payments |
Issue settlement payment |
| POST | /api/claims/{id}/close |
Close claim |
| GET | /api/users |
List adjusters |
This repo contains seeded defects designed to be discovered and fixed during a demo:
- Location:
frontend/src/app/components/fnol-form/fnol-form.component.ts - Issue: The
onSubmit()method bypasses form validation whenlossType === 'OTHER', allowing claims with missing/invalid fields - Reproduce: Select "Other" loss type, leave fields empty, submit → claim created with severity 0
- Location:
backend/src/main/java/com/pnc/claims/service/ClaimService.java - Issue: Theft triage rule compares
"Theft"instead of"THEFT"(case mismatch) - Reproduce: Run
testTriageAssignment_Theft_ShouldAssignSeniorAdjustertest — it fails
- Location:
backend/src/main/java/com/pnc/claims/service/ClaimService.java - Issue: Auto-calculation uses
doublearithmetic causing truncation errors - Reproduce: Run
testReserveDecision_AutoCalculation_RoundingBug_Severity3test — it fails
- Frontend:
console.logcalls and unuseddebugModevariable in FnolFormComponent - Backend: Unused
lastProcessedClaimIdfield in ClaimService - Reproduce: Run
npm run lintandmvn checkstyle:check
See the /tickets folder for 7 Jira-style work tickets:
- BUG-001: FNOL validation bypass
- BUG-002: Triage theft case mismatch
- BUG-003: Reserve calculation rounding
- ENHANCE-001: Claim search and filtering
- ENHANCE-002: Email notification stubs
- UPGRADE-001: Angular 17 → 19 upgrade
- UPGRADE-002: Dependency updates
- TEST-001: Expand regression test suite
- LINT-001: Fix static analysis issues
The H2 database is populated on startup with:
- 5 policies (Honda Civic, Toyota Corolla, Tesla Model S, BMW 328i, Ford Focus)
- 5 claims in various statuses (OPEN, UNDER_INVESTIGATION, RESERVE_SET, SETTLED, CLOSED)
- 3 adjusters (2 Senior Adjusters, 1 Adjuster)
- Assignments, documents, payments, and status history events