How sheanfinnegan/insurancechain-blockchain-based-fraud-intelligence-sharing works
InsuranceChain is a multi-portal fraud-intelligence system for insurers and a regulator. Analysts submit cases and evidence, organizations vote across a case round, and authorized users search, inspect dossiers, and export results; the regulator also oversees organizations and blockchain activity. The Next.js portal invokes API route handlers, which coordinate PostgreSQL application state, evidence object storage, and Fabric transactions. The README documents the wider permissioned network and its per-peer ledgers. Some component relationships are supported by the SOURCE INDEX or README rather than complete source excerpts; unsampled implementation details are not inferred.
Main entry points: insurance-app.tsx Role dashboards · route.ts API and workflows · fabric.ts Fabric gateway client · storage.ts Evidence storage
Components 24
Portals and casework
- Portal entry
app/[portal]/page.tsx - Role dashboards
components/insurance-app.tsx - Case dossier
components/case-dossier.tsx - Evidence board
components/evidence-board.tsx - Evidence preview
components/pdf-evidence.tsx - Identifier input
components/identifier-input.tsx - Fraud map
components/indonesia-map.tsx - Export filters
components/export-form.tsx - Blockchain activity
components/blockchain-explorer.tsx - Profile menu
components/profile-menu.tsx
Application services
- API and workflows
app/api/[...path]/route.ts - Role access
lib/role-access.ts - Identifier handling
lib/identifiers.ts - Export filtering
lib/export-filter.ts - Fabric gateway client
lib/fabric.ts - Gateway configuration
lib/fabric-config.ts - Transaction logging
lib/blockchain-log.ts
Fabric ledger
- Fabric peers and orderers
- Case and voting contract
chaincode/main.go
Application data
- PostgreSQL state
lib/db.ts - Evidence storage
lib/storage.ts
Other components
- Portal users
- Evidence object store
- Peer ledgers
Connections 26
- Portal users → Portal entry: open portal
- Portal entry → Role dashboards: renders
app/[portal]/page.tsx - Role dashboards → API and workflows: requests workflows
- Role dashboards → Case dossier: opens cases
components/insurance-app.tsx - Role dashboards → Identifier input: uses input
components/insurance-app.tsx - Role dashboards → Fraud map: renders map
components/insurance-app.tsx - Role dashboards → Export filters: opens export
components/insurance-app.tsx - Role dashboards → Blockchain activity: shows activity
components/insurance-app.tsx - Role dashboards → Profile menu: renders menu
components/insurance-app.tsx - Case dossier → Evidence board: renders evidence
components/case-dossier.tsx - Evidence board → Evidence preview: previews files
components/evidence-board.tsx - Role dashboards → API and workflows: refreshes activity
- API and workflows → PostgreSQL state: reads and mutates
app/api/[...path]/route.ts - API and workflows → Role access: checks case access
app/api/[...path]/route.ts - API and workflows → Identifier handling: handles identifiers
app/api/[...path]/route.ts - API and workflows → Export filtering: filters exports
app/api/[...path]/route.ts - API and workflows → Evidence storage: saves evidence
app/api/[...path]/route.ts - Evidence storage → PostgreSQL state: hashes files
lib/storage.ts - Evidence storage → Evidence object store: writes and reads
lib/storage.ts - API and workflows → Fabric gateway client: submits transactions
app/api/[...path]/route.ts - API and workflows → Transaction logging: loads activity
app/api/[...path]/route.ts - Fabric gateway client → Gateway configuration: gets connection
lib/fabric.ts - Fabric gateway client → Transaction logging: records stages
lib/fabric.ts - Fabric gateway client → Fabric peers and orderers: evaluates or submits
- Fabric peers and orderers → Case and voting contract: invokes contract
- Fabric peers and orderers → Peer ledgers: commits state