# nitinmall-1390/infralink architecture

> Architecture diagram of the GitHub repository nitinmall-1390/infralink, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nitinmall-1390/infralink
- Repository: https://github.com/nitinmall-1390/infralink

## Overview

InfraLink is presented as a business-identity intelligence platform: government records are ingested, matched and clustered into UBIDs, then supported by review, lifecycle, risk and reporting capabilities. The React app presents the dashboard and its feature panels; FastAPI routes expose the backend capabilities. Backend implementation excerpts are incomplete, so unverified subsystem connections are omitted rather than inferred.

Main entry points: [`backend2/backend2/entitynet-backend/app/main.py`](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/main.py) (FastAPI router app), [`backend2/backend2/entitynet-backend/app/models/database.py`](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/models/database.py) (Relational database), [`src/components/dashboard/Dashboard.jsx`](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/Dashboard.jsx) (Dashboard), [`backend2/backend2/entitynet-backend/app/api/upload.py`](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/upload.py) (Upload API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Web interface"]
  node_app["App shell<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_entity_ui["Entity resolution UI"]
  node_graph_ui["Graph visualization"]
  node_profile_ui["UBID profile UI<br/>[UBIDProfile.jsx]"]
  node_review_ui["Review panel<br/>[ReviewerPanel.jsx]"]
  node_analytics_ui["Analytics panel<br/>[AnalyticsPanel.jsx]"]
  node_risk_ui["Risk intelligence UI"]
  node_upload_ui["CSV upload UI<br/>[CSVUpload.jsx]"]
  node_export_ui["Export menu<br/>[ExportMenu.jsx]"]
end

subgraph group_ingest["Record ingestion"]
  node_upload_api["Upload API<br/>[upload.py]"]
  node_csv_parser["CSV parser<br/>[csv_parser.py]"]
end

subgraph group_identity["Identity resolution"]
  node_match_api["Match API<br/>[match.py]"]
  node_matcher["Record matcher<br/>[matcher.py]"]
  node_cluster_api["Cluster API<br/>[cluster.py]"]
  node_clusterer["Cluster assignment<br/>[clusterer.py]"]
  node_review_api["Review API<br/>[review.py]"]
  node_ubid_api["UBID API<br/>[ubid.py]"]
end

subgraph group_intelligence["Business intelligence"]
  node_events_api["Activity events API<br/>[events.py]"]
  node_lifecycle_api["Lifecycle API<br/>[lifecycle.py]"]
  node_lifecycle_service["Lifecycle evaluation"]
  node_analytics_api["Analytics API<br/>[analytics.py]"]
  node_anomalies_api["Anomaly API<br/>[anomalies.py]"]
  node_notifications_api["Notifications API<br/>[notifications.py]"]
  node_audit_api["Audit API<br/>[audit.py]"]
  node_export_api["Export API<br/>[export.py]"]
end

subgraph group_platform["API and persistence"]
  node_api_app["FastAPI router app<br/>[main.py]"]
  node_database[("Relational database<br/>[database.py]")]
end

node_departments(("Agency records"))

node_app -->|"renders"| node_dashboard
node_dashboard -->|"renders"| node_entity_ui
node_dashboard -->|"renders"| node_graph_ui
node_dashboard -->|"renders"| node_profile_ui
node_dashboard -->|"renders"| node_review_ui
node_dashboard -->|"renders"| node_analytics_ui
node_dashboard -->|"renders"| node_risk_ui
node_dashboard -.->|"renders"| node_upload_ui
node_dashboard -->|"renders"| node_export_ui
node_review_ui -->|"submits decisions"| node_review_api
node_departments -.->|"supply records"| node_upload_ui
node_upload_api -->|"parses files"| node_csv_parser
node_upload_api -->|"matches records"| node_matcher
node_upload_api -->|"assigns clusters"| node_clusterer
node_match_api -->|"runs matching"| node_matcher
node_cluster_api -->|"runs clustering"| node_clusterer
node_cluster_api -->|"uses matching"| node_matcher
node_review_api -->|"reclusters approved"| node_clusterer
node_lifecycle_api -->|"evaluates status"| node_lifecycle_service
node_api_app -->|"registers router"| node_upload_api
node_api_app -->|"registers router"| node_match_api
node_api_app -->|"registers router"| node_cluster_api
node_api_app -->|"registers router"| node_review_api
node_api_app -->|"registers router"| node_ubid_api
node_api_app -->|"registers router"| node_events_api
node_api_app -->|"registers router"| node_analytics_api
node_api_app -->|"registers router"| node_anomalies_api
node_api_app -->|"registers router"| node_audit_api
node_api_app -->|"registers router"| node_lifecycle_api
node_api_app -->|"registers router"| node_notifications_api
node_api_app -->|"registers router"| node_export_api
node_upload_api -.->|"persists records"| node_database
node_match_api -->|"accesses records"| node_database
node_cluster_api -->|"accesses records"| node_database
node_review_api -->|"reads and writes"| node_database
node_ubid_api -->|"accesses profiles"| node_database
node_events_api -.->|"accesses events"| node_database
node_lifecycle_api -->|"accesses profiles"| node_database
node_analytics_api -->|"queries metrics"| node_database
node_anomalies_api -->|"queries records"| node_database
node_audit_api -.->|"accesses audit data"| node_database
node_notifications_api -.->|"accesses data"| node_database
node_export_api -->|"queries export data"| node_database

click node_app "https://github.com/nitinmall-1390/infralink/blob/main/src/App.jsx"
click node_dashboard "https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/Dashboard.jsx"
click node_entity_ui "https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/EntityResolution.jsx"
click node_graph_ui "https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/GraphVisualization.jsx"
click node_profile_ui "https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/UBIDProfile.jsx"
click node_review_ui "https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/ReviewerPanel.jsx"
click node_analytics_ui "https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/AnalyticsPanel.jsx"
click node_risk_ui "https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/RiskIntelligence.jsx"
click node_upload_ui "https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/CSVUpload.jsx"
click node_export_ui "https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/ExportMenu.jsx"
click node_upload_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/upload.py"
click node_csv_parser "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/utils/csv_parser.py"
click node_match_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/match.py"
click node_matcher "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/matcher.py"
click node_cluster_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/cluster.py"
click node_clusterer "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/clusterer.py"
click node_review_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/review.py"
click node_ubid_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/ubid.py"
click node_events_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/events.py"
click node_lifecycle_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/lifecycle.py"
click node_lifecycle_service "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/lifecycle_service.py"
click node_analytics_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/analytics.py"
click node_anomalies_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/anomalies.py"
click node_notifications_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/notifications.py"
click node_audit_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/audit.py"
click node_export_api "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/export.py"
click node_api_app "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/main.py"
click node_database "https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/models/database.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_entity_ui,node_graph_ui,node_profile_ui,node_review_ui,node_analytics_ui,node_risk_ui,node_upload_ui,node_export_ui toneBlue
class node_upload_api,node_csv_parser toneAmber
class node_match_api,node_matcher,node_cluster_api,node_clusterer,node_review_api,node_ubid_api toneMint
class node_events_api,node_lifecycle_api,node_lifecycle_service,node_analytics_api,node_anomalies_api,node_notifications_api,node_audit_api,node_export_api toneRose
class node_api_app,node_database,node_departments toneIndigo
```

## Components

### Web interface

- [App shell](https://github.com/nitinmall-1390/infralink/blob/main/src/App.jsx): `src/App.jsx`
- [Dashboard](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/Dashboard.jsx): `src/components/dashboard/Dashboard.jsx`
- [Entity resolution UI](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/EntityResolution.jsx): `src/components/dashboard/EntityResolution.jsx`
- [Graph visualization](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/GraphVisualization.jsx): `src/components/dashboard/GraphVisualization.jsx`
- [UBID profile UI](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/UBIDProfile.jsx): `src/components/dashboard/UBIDProfile.jsx`
- [Review panel](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/ReviewerPanel.jsx): `src/components/dashboard/ReviewerPanel.jsx`
- [Analytics panel](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/AnalyticsPanel.jsx): `src/components/dashboard/AnalyticsPanel.jsx`
- [Risk intelligence UI](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/RiskIntelligence.jsx): `src/components/dashboard/RiskIntelligence.jsx`
- [CSV upload UI](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/CSVUpload.jsx): `src/components/dashboard/CSVUpload.jsx`
- [Export menu](https://github.com/nitinmall-1390/infralink/blob/main/src/components/dashboard/ExportMenu.jsx): `src/components/dashboard/ExportMenu.jsx`

### Record ingestion

- [Upload API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/upload.py): `backend2/backend2/entitynet-backend/app/api/upload.py`
- [CSV parser](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/utils/csv_parser.py): `backend2/backend2/entitynet-backend/app/utils/csv_parser.py`

### Identity resolution

- [Match API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/match.py): `backend2/backend2/entitynet-backend/app/api/match.py`
- [Record matcher](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/matcher.py): `backend2/backend2/entitynet-backend/app/services/matcher.py`
- [Cluster API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/cluster.py): `backend2/backend2/entitynet-backend/app/api/cluster.py`
- [Cluster assignment](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/clusterer.py): `backend2/backend2/entitynet-backend/app/services/clusterer.py`
- [Review API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/review.py): `backend2/backend2/entitynet-backend/app/api/review.py`
- [UBID API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/ubid.py): `backend2/backend2/entitynet-backend/app/api/ubid.py`

### Business intelligence

- [Activity events API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/events.py): `backend2/backend2/entitynet-backend/app/api/events.py`
- [Lifecycle API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/lifecycle.py): `backend2/backend2/entitynet-backend/app/api/lifecycle.py`
- [Lifecycle evaluation](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/services/lifecycle_service.py): `backend2/backend2/entitynet-backend/app/services/lifecycle_service.py`
- [Analytics API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/analytics.py): `backend2/backend2/entitynet-backend/app/api/analytics.py`
- [Anomaly API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/anomalies.py): `backend2/backend2/entitynet-backend/app/api/anomalies.py`
- [Notifications API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/notifications.py): `backend2/backend2/entitynet-backend/app/api/notifications.py`
- [Audit API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/audit.py): `backend2/backend2/entitynet-backend/app/api/audit.py`
- [Export API](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/api/export.py): `backend2/backend2/entitynet-backend/app/api/export.py`

### API and persistence

- [FastAPI router app](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/main.py): `backend2/backend2/entitynet-backend/app/main.py`
- [Relational database](https://github.com/nitinmall-1390/infralink/blob/main/backend2/backend2/entitynet-backend/app/models/database.py): `backend2/backend2/entitynet-backend/app/models/database.py`

### Other components

- **Agency records**

## Connections

- App shell → Dashboard: renders (evidence: `src/App.jsx`)
- Dashboard → Entity resolution UI: renders (evidence: `src/components/dashboard/Dashboard.jsx`)
- Dashboard → Graph visualization: renders (evidence: `src/components/dashboard/Dashboard.jsx`)
- Dashboard → UBID profile UI: renders (evidence: `src/components/dashboard/Dashboard.jsx`)
- Dashboard → Review panel: renders (evidence: `src/components/dashboard/Dashboard.jsx`)
- Dashboard → Analytics panel: renders (evidence: `src/components/dashboard/Dashboard.jsx`)
- Dashboard → Risk intelligence UI: renders (evidence: `src/components/dashboard/Dashboard.jsx`)
- Dashboard → CSV upload UI: renders
- Dashboard → Export menu: renders (evidence: `src/components/dashboard/Dashboard.jsx`)
- Review panel → Review API: submits decisions (evidence: `src/components/dashboard/ReviewerPanel.jsx`)
- Agency records → CSV upload UI: supply records
- Upload API → CSV parser: parses files (evidence: `backend2/backend2/entitynet-backend/app/api/upload.py`)
- Upload API → Record matcher: matches records (evidence: `backend2/backend2/entitynet-backend/app/api/upload.py`)
- Upload API → Cluster assignment: assigns clusters (evidence: `backend2/backend2/entitynet-backend/app/api/upload.py`)
- Match API → Record matcher: runs matching (evidence: `backend2/backend2/entitynet-backend/app/api/match.py`)
- Cluster API → Cluster assignment: runs clustering (evidence: `backend2/backend2/entitynet-backend/app/api/cluster.py`)
- Cluster API → Record matcher: uses matching (evidence: `backend2/backend2/entitynet-backend/app/api/cluster.py`)
- Review API → Cluster assignment: reclusters approved (evidence: `backend2/backend2/entitynet-backend/app/api/review.py`)
- Lifecycle API → Lifecycle evaluation: evaluates status (evidence: `backend2/backend2/entitynet-backend/app/api/lifecycle.py`)
- FastAPI router app → Upload API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Match API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Cluster API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Review API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → UBID API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Activity events API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Analytics API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Anomaly API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Audit API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Lifecycle API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Notifications API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- FastAPI router app → Export API: registers router (evidence: `backend2/backend2/entitynet-backend/app/main.py`)
- Upload API → Relational database: persists records (evidence: `backend2/backend2/entitynet-backend/app/api/upload.py`)
- Match API → Relational database: accesses records (evidence: `backend2/backend2/entitynet-backend/app/api/match.py`)
- Cluster API → Relational database: accesses records (evidence: `backend2/backend2/entitynet-backend/app/api/cluster.py`)
- Review API → Relational database: reads and writes (evidence: `backend2/backend2/entitynet-backend/app/api/review.py`)
- UBID API → Relational database: accesses profiles (evidence: `backend2/backend2/entitynet-backend/app/api/ubid.py`)
- Activity events API → Relational database: accesses events (evidence: `backend2/backend2/entitynet-backend/app/api/events.py`)
- Lifecycle API → Relational database: accesses profiles (evidence: `backend2/backend2/entitynet-backend/app/api/lifecycle.py`)
- Analytics API → Relational database: queries metrics (evidence: `backend2/backend2/entitynet-backend/app/api/analytics.py`)
- Anomaly API → Relational database: queries records (evidence: `backend2/backend2/entitynet-backend/app/api/anomalies.py`)
- Audit API → Relational database: accesses audit data (evidence: `backend2/backend2/entitynet-backend/app/api/audit.py`)
- Notifications API → Relational database: accesses data (evidence: `backend2/backend2/entitynet-backend/app/api/notifications.py`)
- Export API → Relational database: queries export data (evidence: `backend2/backend2/entitynet-backend/app/api/export.py`)
