# nilesh1381/infralink architecture

> Architecture diagram of the GitHub repository nilesh1381/infralink, 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/nilesh1381/infralink
- Repository: https://github.com/nilesh1381/infralink

## Overview

InfraLink is a business-identity intelligence product: it ingests fragmented government records, resolves likely duplicates, assigns unified business identities (UBIDs), and supports review, lifecycle intelligence, and operational analysis. The landing page launches a dashboard; its reviewer panel demonstrably calls review and event endpoints. The backend router registration, review handler, lifecycle service, and database schema were sampled. Other backend capabilities are represented from the README and tree, but their internal call wiring is not inferred where source was not sampled.

Main entry points: [`backend2/backend2/entitynet-backend/app/main.py`](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/main.py) (FastAPI application), [`backend2/backend2/entitynet-backend/app/api/review.py`](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/review.py) (Human review API), [`src/components/dashboard/ReviewerPanel.jsx`](https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/ReviewerPanel.jsx) (Reviewer panel), [`src/App.jsx`](https://github.com/nilesh1381/infralink/blob/main/src/App.jsx) (Landing app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Landing app<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_upload_ui["CSV upload<br/>[CSVUpload.jsx]"]
  node_resolution_ui["Resolution view"]
  node_graph_ui["Graph view"]
  node_review_ui["Reviewer panel<br/>[ReviewerPanel.jsx]"]
  node_analytics_ui["Analytics panel<br/>[AnalyticsPanel.jsx]"]
  node_risk_ui["Risk intelligence"]
  node_profile_ui["UBID profile<br/>[UBIDProfile.jsx]"]
end

subgraph group_resolution["Record resolution"]
  node_upload_api["Record upload API<br/>[upload.py]"]
  node_parser["CSV parser<br/>[csv_parser.py]"]
  node_match_api["Matching API<br/>[match.py]"]
  node_matcher["Entity matcher<br/>[matcher.py]"]
end

subgraph group_identity["Identity intelligence"]
  node_cluster_api["Clustering API<br/>[cluster.py]"]
  node_clusterer["Cluster and UBID service<br/>[clusterer.py]"]
  node_ubid_api["UBID API<br/>[ubid.py]"]
  node_lifecycle_api["Lifecycle API<br/>[lifecycle.py]"]
  node_lifecycle["Lifecycle evaluation"]
end

subgraph group_operations["Governance and operations"]
  node_store[("Business data store<br/>[database.py]")]
  node_review_api["Human review API<br/>[review.py]"]
  node_events_api["Activity events API<br/>[events.py]"]
  node_analytics_api["Analytics API<br/>[analytics.py]"]
  node_anomalies_api["Anomaly API<br/>[anomalies.py]"]
  node_audit_api["Audit API<br/>[audit.py]"]
  node_notifications_api["Notifications API<br/>[notifications.py]"]
  node_export_api["Export API<br/>[export.py]"]
  node_backend["FastAPI application<br/>[main.py]"]
end

node_user(("Agency user"))

node_user -->|"opens"| node_app
node_app -->|"launches"| node_dashboard
node_review_ui -->|"requests decisions"| node_review_api
node_review_ui -->|"requests events"| node_events_api
node_backend -->|"registers route"| node_upload_api
node_backend -->|"registers route"| node_match_api
node_backend -->|"registers route"| node_cluster_api
node_backend -->|"registers route"| node_review_api
node_backend -->|"registers route"| node_ubid_api
node_backend -->|"registers route"| node_events_api
node_backend -->|"registers route"| node_analytics_api
node_backend -->|"registers route"| node_anomalies_api
node_backend -->|"registers route"| node_audit_api
node_backend -->|"registers route"| node_lifecycle_api
node_backend -->|"registers route"| node_notifications_api
node_backend -->|"registers route"| node_export_api
node_review_api -->|"reclusters approved merge"| node_clusterer
node_review_api -->|"reads and writes review data"| node_store
node_lifecycle -->|"reads and updates profiles"| node_store
node_upload_api -.->|"parses CSV"| node_parser

click node_app "https://github.com/nilesh1381/infralink/blob/main/src/App.jsx"
click node_dashboard "https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/Dashboard.jsx"
click node_upload_ui "https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/CSVUpload.jsx"
click node_resolution_ui "https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/EntityResolution.jsx"
click node_graph_ui "https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/GraphVisualization.jsx"
click node_review_ui "https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/ReviewerPanel.jsx"
click node_analytics_ui "https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/AnalyticsPanel.jsx"
click node_risk_ui "https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/RiskIntelligence.jsx"
click node_profile_ui "https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/UBIDProfile.jsx"
click node_upload_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/upload.py"
click node_parser "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/utils/csv_parser.py"
click node_match_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/match.py"
click node_matcher "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/matcher.py"
click node_cluster_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/cluster.py"
click node_clusterer "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/clusterer.py"
click node_ubid_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/ubid.py"
click node_lifecycle_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/lifecycle.py"
click node_lifecycle "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/lifecycle_service.py"
click node_store "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/models/database.py"
click node_review_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/review.py"
click node_events_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/events.py"
click node_analytics_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/analytics.py"
click node_anomalies_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/anomalies.py"
click node_audit_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/audit.py"
click node_notifications_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/notifications.py"
click node_export_api "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/export.py"
click node_backend "https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/main.py"

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_app,node_dashboard,node_upload_ui,node_resolution_ui,node_graph_ui,node_review_ui,node_analytics_ui,node_risk_ui,node_profile_ui,node_user toneBlue
class node_upload_api,node_parser,node_match_api,node_matcher toneAmber
class node_cluster_api,node_clusterer,node_ubid_api,node_lifecycle_api,node_lifecycle toneMint
class node_store,node_review_api,node_events_api,node_analytics_api,node_anomalies_api,node_audit_api,node_notifications_api,node_export_api,node_backend toneRose
```

## Components

### User experience

- [Landing app](https://github.com/nilesh1381/infralink/blob/main/src/App.jsx): `src/App.jsx`
- [Dashboard](https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/Dashboard.jsx): `src/components/dashboard/Dashboard.jsx`
- [CSV upload](https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/CSVUpload.jsx): `src/components/dashboard/CSVUpload.jsx`
- [Resolution view](https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/EntityResolution.jsx): `src/components/dashboard/EntityResolution.jsx`
- [Graph view](https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/GraphVisualization.jsx): `src/components/dashboard/GraphVisualization.jsx`
- [Reviewer panel](https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/ReviewerPanel.jsx): `src/components/dashboard/ReviewerPanel.jsx`
- [Analytics panel](https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/AnalyticsPanel.jsx): `src/components/dashboard/AnalyticsPanel.jsx`
- [Risk intelligence](https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/RiskIntelligence.jsx): `src/components/dashboard/RiskIntelligence.jsx`
- [UBID profile](https://github.com/nilesh1381/infralink/blob/main/src/components/dashboard/UBIDProfile.jsx): `src/components/dashboard/UBIDProfile.jsx`

### Record resolution

- [Record upload API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/upload.py): `backend2/backend2/entitynet-backend/app/api/upload.py`
- [CSV parser](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/utils/csv_parser.py): `backend2/backend2/entitynet-backend/app/utils/csv_parser.py`
- [Matching API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/match.py): `backend2/backend2/entitynet-backend/app/api/match.py`
- [Entity matcher](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/matcher.py): `backend2/backend2/entitynet-backend/app/services/matcher.py`

### Identity intelligence

- [Clustering API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/cluster.py): `backend2/backend2/entitynet-backend/app/api/cluster.py`
- [Cluster and UBID service](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/clusterer.py): `backend2/backend2/entitynet-backend/app/services/clusterer.py`
- [UBID API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/ubid.py): `backend2/backend2/entitynet-backend/app/api/ubid.py`
- [Lifecycle API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/lifecycle.py): `backend2/backend2/entitynet-backend/app/api/lifecycle.py`
- [Lifecycle evaluation](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/lifecycle_service.py): `backend2/backend2/entitynet-backend/app/services/lifecycle_service.py`

### Governance and operations

- [Business data store](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/models/database.py): `backend2/backend2/entitynet-backend/app/models/database.py`
- [Human review API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/review.py): `backend2/backend2/entitynet-backend/app/api/review.py`
- [Activity events API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/events.py): `backend2/backend2/entitynet-backend/app/api/events.py`
- [Analytics API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/analytics.py): `backend2/backend2/entitynet-backend/app/api/analytics.py`
- [Anomaly API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/anomalies.py): `backend2/backend2/entitynet-backend/app/api/anomalies.py`
- [Audit API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/audit.py): `backend2/backend2/entitynet-backend/app/api/audit.py`
- [Notifications API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/notifications.py): `backend2/backend2/entitynet-backend/app/api/notifications.py`
- [Export API](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/export.py): `backend2/backend2/entitynet-backend/app/api/export.py`
- [FastAPI application](https://github.com/nilesh1381/infralink/blob/main/backend2/backend2/entitynet-backend/app/main.py): `backend2/backend2/entitynet-backend/app/main.py`

### Other components

- **Agency user**

## Connections

- Agency user → Landing app: opens
- Landing app → Dashboard: launches
- Reviewer panel → Human review API: requests decisions
- Reviewer panel → Activity events API: requests events
- FastAPI application → Record upload API: registers route
- FastAPI application → Matching API: registers route
- FastAPI application → Clustering API: registers route
- FastAPI application → Human review API: registers route
- FastAPI application → UBID API: registers route
- FastAPI application → Activity events API: registers route
- FastAPI application → Analytics API: registers route
- FastAPI application → Anomaly API: registers route
- FastAPI application → Audit API: registers route
- FastAPI application → Lifecycle API: registers route
- FastAPI application → Notifications API: registers route
- FastAPI application → Export API: registers route
- Human review API → Cluster and UBID service: reclusters approved merge
- Human review API → Business data store: reads and writes review data
- Lifecycle evaluation → Business data store: reads and updates profiles
- Record upload API → CSV parser: parses CSV
