# swapnil2002-git/health-insurance-management-system- architecture

> Architecture diagram of the GitHub repository swapnil2002-git/health-insurance-management-system-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/swapnil2002-git/health-insurance-management-system-
- Repository: https://github.com/swapnil2002-git/health-insurance-management-system-

## Overview

HIMS is a health-insurance microservices system with an Angular operations UI. The tree shows a user-facing flow from authentication and customer/plan/provider setup through quotation, risk assessment, underwriting, policy and premium management, then claims, payments, documents, notifications, and reporting. The README gives no more detail, and most service implementations were not sampled; subsystem coverage follows the service and feature paths, while cross-service calls are omitted unless evidenced.

Main entry points: [`infrastructure/api-gateway/src/main/java/com/healthinsurance/gateway/ApiGatewayApplication.java`](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/infrastructure/api-gateway/src/main/java/com/healthinsurance/gateway/ApiGatewayApplication.java) (API gateway), [`frontend/hims-ui/src/app/app.component.ts`](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/frontend/hims-ui/src/app/app.component.ts) (HIMS web app), [`services/document-service/src/main/java/com/healthinsurance/document/controller/DocumentController.java`](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/document-service/src/main/java/com/healthinsurance/document/controller/DocumentController.java) (Document handling), [`services/identity-service/src/main/java/com/healthinsurance/identity/controller/AuthController.java`](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/identity-service/src/main/java/com/healthinsurance/identity/controller/AuthController.java) (Sign-in and access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Operations UI"]
  node_frontend["HIMS web app<br/>[app.component.ts]"]
end

subgraph group_access["Identity and Customers"]
  node_auth["Sign-in and access"]
  node_customer["Customer records"]
end

subgraph group_origination["Insurance Origination"]
  node_product["Products and plans<br/>[PlanService.java]"]
  node_provider["Provider networks"]
  node_quote["Quotation<br/>[QuoteService.java]"]
  node_risk["Risk assessment"]
  node_underwriting["Underwriting decisions"]
end

subgraph group_servicing["Policy Servicing"]
  node_policy["Policy lifecycle<br/>[PolicyService.java]"]
  node_premium["Premium schedules"]
  node_claims["Claims lifecycle<br/>[ClaimService.java]"]
  node_payment["Payments and refunds"]
  node_documents["Document handling"]
  node_filesystem[("File storage")]
end

subgraph group_platform["Shared Operations"]
  node_notifications["Notifications and templates"]
  node_reports["Reports and dashboard"]
  node_gateway{{"API gateway"}}
  node_discovery{{"Service discovery"}}
  node_config{{"Configuration service"}}
end

node_operator(("User"))

node_operator -->|"uses"| node_frontend
node_frontend -.->|"API requests"| node_gateway
node_gateway -.->|"routes requests"| node_auth
node_gateway -.->|"routes requests"| node_customer
node_gateway -.->|"routes requests"| node_product
node_gateway -.->|"routes requests"| node_provider
node_gateway -.->|"routes requests"| node_quote
node_gateway -.->|"routes requests"| node_risk
node_gateway -.->|"routes requests"| node_underwriting
node_gateway -.->|"routes requests"| node_policy
node_gateway -.->|"routes requests"| node_premium
node_gateway -.->|"routes requests"| node_claims
node_gateway -.->|"routes requests"| node_payment
node_gateway -.->|"routes requests"| node_documents
node_gateway -.->|"routes requests"| node_notifications
node_gateway -.->|"routes requests"| node_reports
node_documents -->|"stores files"| node_filesystem

click node_frontend "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/frontend/hims-ui/src/app/app.component.ts"
click node_auth "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/identity-service/src/main/java/com/healthinsurance/identity/controller/AuthController.java"
click node_customer "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/customer-service/src/main/java/com/healthinsurance/customer/service/CustomerService.java"
click node_product "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/product-plan-service/src/main/java/com/healthinsurance/product/service/PlanService.java"
click node_provider "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/provider-service/src/main/java/com/healthinsurance/provider/service/ProviderNetworkMappingService.java"
click node_quote "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/quotation-service/src/main/java/com/healthinsurance/quotation/service/QuoteService.java"
click node_risk "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/risk-service/src/main/java/com/healthinsurance/risk/service/RiskAssessmentService.java"
click node_underwriting "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/underwriting-service/src/main/java/com/healthinsurance/underwriting/service/UnderwritingService.java"
click node_policy "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/policy-service/src/main/java/com/healthinsurance/policy/service/PolicyService.java"
click node_premium "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/premium-service/src/main/java/com/healthinsurance/premium/service/PremiumService.java"
click node_claims "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/claims-service/src/main/java/com/healthinsurance/claims/service/ClaimService.java"
click node_payment "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/payment-service/src/main/java/com/healthinsurance/payment/service/PaymentService.java"
click node_documents "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/document-service/src/main/java/com/healthinsurance/document/controller/DocumentController.java"
click node_filesystem "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/document-service/src/main/java/com/healthinsurance/document/storage/FileSystemStorageService.java"
click node_notifications "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/notification-service/src/main/java/com/healthinsurance/notification/controller/NotificationController.java"
click node_reports "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/reporting-service/src/main/java/com/healthinsurance/reporting/service/ReportingService.java"
click node_gateway "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/infrastructure/api-gateway/src/main/java/com/healthinsurance/gateway/ApiGatewayApplication.java"
click node_discovery "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/infrastructure/service-discovery/src/main/java/com/healthinsurance/discovery/ServiceDiscoveryApplication.java"
click node_config "https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/infrastructure/config-server/src/main/java/com/healthinsurance/config/ConfigServerApplication.java"

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_frontend,node_operator toneBlue
class node_auth,node_customer toneAmber
class node_product,node_provider,node_quote,node_risk,node_underwriting toneMint
class node_policy,node_premium,node_claims,node_payment,node_documents,node_filesystem toneRose
class node_notifications,node_reports,node_gateway,node_discovery,node_config toneIndigo
```

## Components

### Operations UI

- [HIMS web app](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/frontend/hims-ui/src/app/app.component.ts): `frontend/hims-ui/src/app/app.component.ts`

### Identity and Customers

- [Sign-in and access](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/identity-service/src/main/java/com/healthinsurance/identity/controller/AuthController.java): `services/identity-service/src/main/java/com/healthinsurance/identity/controller/AuthController.java`
- [Customer records](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/customer-service/src/main/java/com/healthinsurance/customer/service/CustomerService.java): `services/customer-service/src/main/java/com/healthinsurance/customer/service/CustomerService.java`

### Insurance Origination

- [Products and plans](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/product-plan-service/src/main/java/com/healthinsurance/product/service/PlanService.java): `services/product-plan-service/src/main/java/com/healthinsurance/product/service/PlanService.java`
- [Provider networks](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/provider-service/src/main/java/com/healthinsurance/provider/service/ProviderNetworkMappingService.java): `services/provider-service/src/main/java/com/healthinsurance/provider/service/ProviderNetworkMappingService.java`
- [Quotation](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/quotation-service/src/main/java/com/healthinsurance/quotation/service/QuoteService.java): `services/quotation-service/src/main/java/com/healthinsurance/quotation/service/QuoteService.java`
- [Risk assessment](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/risk-service/src/main/java/com/healthinsurance/risk/service/RiskAssessmentService.java): `services/risk-service/src/main/java/com/healthinsurance/risk/service/RiskAssessmentService.java`
- [Underwriting decisions](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/underwriting-service/src/main/java/com/healthinsurance/underwriting/service/UnderwritingService.java): `services/underwriting-service/src/main/java/com/healthinsurance/underwriting/service/UnderwritingService.java`

### Policy Servicing

- [Policy lifecycle](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/policy-service/src/main/java/com/healthinsurance/policy/service/PolicyService.java): `services/policy-service/src/main/java/com/healthinsurance/policy/service/PolicyService.java`
- [Premium schedules](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/premium-service/src/main/java/com/healthinsurance/premium/service/PremiumService.java): `services/premium-service/src/main/java/com/healthinsurance/premium/service/PremiumService.java`
- [Claims lifecycle](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/claims-service/src/main/java/com/healthinsurance/claims/service/ClaimService.java): `services/claims-service/src/main/java/com/healthinsurance/claims/service/ClaimService.java`
- [Payments and refunds](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/payment-service/src/main/java/com/healthinsurance/payment/service/PaymentService.java): `services/payment-service/src/main/java/com/healthinsurance/payment/service/PaymentService.java`
- [Document handling](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/document-service/src/main/java/com/healthinsurance/document/controller/DocumentController.java): `services/document-service/src/main/java/com/healthinsurance/document/controller/DocumentController.java`
- [File storage](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/document-service/src/main/java/com/healthinsurance/document/storage/FileSystemStorageService.java): `services/document-service/src/main/java/com/healthinsurance/document/storage/FileSystemStorageService.java`

### Shared Operations

- [Notifications and templates](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/notification-service/src/main/java/com/healthinsurance/notification/controller/NotificationController.java): `services/notification-service/src/main/java/com/healthinsurance/notification/controller/NotificationController.java`
- [Reports and dashboard](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/services/reporting-service/src/main/java/com/healthinsurance/reporting/service/ReportingService.java): `services/reporting-service/src/main/java/com/healthinsurance/reporting/service/ReportingService.java`
- [API gateway](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/infrastructure/api-gateway/src/main/java/com/healthinsurance/gateway/ApiGatewayApplication.java): `infrastructure/api-gateway/src/main/java/com/healthinsurance/gateway/ApiGatewayApplication.java`
- [Service discovery](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/infrastructure/service-discovery/src/main/java/com/healthinsurance/discovery/ServiceDiscoveryApplication.java): `infrastructure/service-discovery/src/main/java/com/healthinsurance/discovery/ServiceDiscoveryApplication.java`
- [Configuration service](https://github.com/swapnil2002-git/health-insurance-management-system-/blob/main/infrastructure/config-server/src/main/java/com/healthinsurance/config/ConfigServerApplication.java): `infrastructure/config-server/src/main/java/com/healthinsurance/config/ConfigServerApplication.java`

### Other components

- **User**

## Connections

- User → HIMS web app: uses
- HIMS web app → API gateway: API requests
- API gateway → Sign-in and access: routes requests
- API gateway → Customer records: routes requests
- API gateway → Products and plans: routes requests
- API gateway → Provider networks: routes requests
- API gateway → Quotation: routes requests
- API gateway → Risk assessment: routes requests
- API gateway → Underwriting decisions: routes requests
- API gateway → Policy lifecycle: routes requests
- API gateway → Premium schedules: routes requests
- API gateway → Claims lifecycle: routes requests
- API gateway → Payments and refunds: routes requests
- API gateway → Document handling: routes requests
- API gateway → Notifications and templates: routes requests
- API gateway → Reports and dashboard: routes requests
- Document handling → File storage: stores files (evidence: `services/document-service/src/main/java/com/healthinsurance/document/storage/FileSystemStorageService.java`)
