# kiran-255666/msfde-uc007-fs-lab architecture

> Architecture diagram of the GitHub repository kiran-255666/msfde-uc007-fs-lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kiran-255666/msfde-uc007-fs-lab
- Repository: https://github.com/kiran-255666/msfde-uc007-fs-lab

## Overview

This is a motor-claims preparation workspace: a handler processes a claim’s mixed evidence, reviews extracted facts and policy-grounded findings, then records whether to accept, amend, or reject the preparation. The documented backend stages are ingestion/classification, document extraction, photo assessment, rule validation, and agent summarization; the React workspace presents the result and captures the human review. External AI and policy-retrieval links reflect the README and agent/analyzer descriptions; unsampled API and storage internals are represented only at their documented boundaries.

Main entry points: [`backend/pipeline.py`](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/pipeline.py) (Processing pipeline), [`backend/api.py`](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/api.py) (Claims API), [`frontend/src/App.jsx`](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/frontend/src/App.jsx) (Workspace app), [`frontend/src/components/ClaimDetail.jsx`](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/frontend/src/components/ClaimDetail.jsx) (Claim review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processing["Claim processing"]
  node_pipeline["Processing pipeline<br/>[pipeline.py]"]
  node_analyzers["Document analyzers<br/>[analyzers.py]"]
  node_vision["Photo assessment<br/>[vision.py]"]
  node_validation["Validation rules<br/>[validation.py]"]
  node_agent["Claims agent<br/>[claims_agent.py]"]
end

subgraph group_workspace["Handler workspace"]
  node_api["Claims API<br/>[api.py]"]
  node_app["Workspace app<br/>[App.jsx]"]
  node_detail["Claim review<br/>[ClaimDetail.jsx]"]
  node_decision["Handler decision<br/>[DecisionPanel.jsx]"]
end

subgraph group_state["Claim data"]
  node_evidence["Claim evidence"]
  node_store[("Claim and decision store<br/>[store.py]")]
end

subgraph group_integrations["AI and policy"]
  node_content_understanding{{"Content Understanding"}}
  node_vision_service{{"Vision model"}}
  node_policy_corpus["Policy corpus"]
  node_policy_retrieval{{"Policy retrieval MCP"}}
end

node_handler(("Claims handler"))

node_handler -->|"uses"| node_app
node_app -->|"loads and starts"| node_api
node_app -->|"selects claim"| node_detail
node_detail -->|"loads review"| node_api
node_detail -->|"offers decision"| node_decision
node_decision -->|"submits review"| node_api
node_api -->|"processes claim"| node_pipeline
node_api -->|"reads and writes"| node_store
node_pipeline -->|"reads files"| node_evidence
node_pipeline -->|"classifies and extracts"| node_analyzers
node_pipeline -->|"assesses photos"| node_vision
node_pipeline -->|"checks extracted facts"| node_validation
node_pipeline -->|"prepares summary"| node_agent
node_analyzers -->|"submits documents"| node_content_understanding
node_vision -->|"assesses images"| node_vision_service
node_agent -->|"retrieves policy"| node_policy_retrieval
node_policy_retrieval -->|"searches corpus"| node_policy_corpus

click node_evidence "https://github.com/kiran-255666/msfde-uc007-fs-lab/tree/main/data/claims"
click node_pipeline "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/pipeline.py"
click node_analyzers "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/analyzers.py"
click node_vision "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/vision.py"
click node_validation "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/validation.py"
click node_agent "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/claims_agent.py"
click node_api "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/api.py"
click node_store "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/store.py"
click node_app "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/frontend/src/App.jsx"
click node_detail "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/frontend/src/components/ClaimDetail.jsx"
click node_decision "https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/frontend/src/components/DecisionPanel.jsx"
click node_policy_corpus "https://github.com/kiran-255666/msfde-uc007-fs-lab/tree/main/reference/policies"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline,node_analyzers,node_vision,node_validation,node_agent toneBlue
class node_api,node_app,node_detail,node_decision toneAmber
class node_evidence,node_store,node_handler toneMint
class node_content_understanding,node_vision_service,node_policy_corpus,node_policy_retrieval toneRose
```

## Components

### Claim processing

- [Processing pipeline](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/pipeline.py): `backend/pipeline.py`
- [Document analyzers](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/analyzers.py): `backend/analyzers.py`
- [Photo assessment](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/vision.py): `backend/vision.py`
- [Validation rules](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/validation.py): `backend/validation.py`
- [Claims agent](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/claims_agent.py): `backend/claims_agent.py`

### Handler workspace

- [Claims API](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/api.py): `backend/api.py`
- [Workspace app](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Claim review](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/frontend/src/components/ClaimDetail.jsx): `frontend/src/components/ClaimDetail.jsx`
- [Handler decision](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/frontend/src/components/DecisionPanel.jsx): `frontend/src/components/DecisionPanel.jsx`

### Claim data

- [Claim evidence](https://github.com/kiran-255666/msfde-uc007-fs-lab/tree/main/data/claims): `data/claims`
- [Claim and decision store](https://github.com/kiran-255666/msfde-uc007-fs-lab/blob/main/backend/store.py): `backend/store.py`

### AI and policy

- **Content Understanding**
- **Vision model**
- [Policy corpus](https://github.com/kiran-255666/msfde-uc007-fs-lab/tree/main/reference/policies): `reference/policies`
- **Policy retrieval MCP**

### Other components

- **Claims handler**

## Connections

- Claims handler → Workspace app: uses
- Workspace app → Claims API: loads and starts
- Workspace app → Claim review: selects claim
- Claim review → Claims API: loads review
- Claim review → Handler decision: offers decision
- Handler decision → Claims API: submits review
- Claims API → Processing pipeline: processes claim
- Claims API → Claim and decision store: reads and writes
- Processing pipeline → Claim evidence: reads files
- Processing pipeline → Document analyzers: classifies and extracts
- Processing pipeline → Photo assessment: assesses photos
- Processing pipeline → Validation rules: checks extracted facts
- Processing pipeline → Claims agent: prepares summary
- Document analyzers → Content Understanding: submits documents
- Photo assessment → Vision model: assesses images
- Claims agent → Policy retrieval MCP: retrieves policy
- Policy retrieval MCP → Policy corpus: searches corpus
