# neekshith3/data-sentinel architecture

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

- Interactive diagram: https://gitdiagram.com/neekshith3/data-sentinel
- Repository: https://github.com/neekshith3/data-sentinel

## Overview

Data Sentinel accepts CSV and Excel uploads, profiles datasets, runs deterministic quality checks, computes quality and ML-readiness assessments, and presents results in an interactive dashboard. The assistant explains findings rather than determining metrics; Gemini is optional. The map preserves documented drift and large-file capabilities. Edges rely on the README or source-index references; unsampled internals are not assumed beyond those references.

Main entry points: [`app/api/routes.py`](https://github.com/neekshith3/data-sentinel/blob/main/app/api/routes.py) (Analysis API), [`app/services/analysis_service.py`](https://github.com/neekshith3/data-sentinel/blob/main/app/services/analysis_service.py) (Analysis orchestration), [`app/profiler/shared_metadata.py`](https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/shared_metadata.py) (Shared metadata), [`app/quality_engine/quality_engine.py`](https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/quality_engine.py) (Quality detection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_main["Application entry<br/>[main.py]"]
  node_api["Analysis API<br/>[routes.py]"]
  node_schemas["Analysis schemas<br/>[analysis.py]"]
end

subgraph group_profile["Profiling"]
  node_loader["Dataset loading"]
  node_roles["Column roles<br/>[column_roles.py]"]
  node_missing["Missing-value utilities<br/>[missing_values.py]"]
  node_sentinels["Sentinel detection"]
  node_understanding["Dataset understanding"]
  node_metadata["Shared metadata<br/>[shared_metadata.py]"]
  node_snapshot["Dataset snapshots"]
end

subgraph group_analysis["Quality analysis"]
  node_service["Analysis orchestration"]
  node_quality["Quality detection<br/>[quality_engine.py]"]
  node_findings["Structured findings<br/>[findings.py]"]
  node_score["Quality scoring<br/>[quality_score.py]"]
  node_readiness["ML readiness<br/>[ml_readiness.py]"]
  node_drift["Drift analysis<br/>[drift_engine.py]"]
  node_large["Large-file analysis<br/>[large_dataset.py]"]
end

subgraph group_presentation["Results and explanations"]
  node_frontend["Dashboard<br/>[app.js]"]
  node_assistant["Finding explanations<br/>[assistant.py]"]
  node_chat["Assistant chat<br/>[chat_resolver.py]"]
end

node_user(("Dataset user"))
node_gemini["Google Gemini"]

node_user -->|"uploads data"| node_frontend
node_frontend -->|"requests analysis"| node_api
node_main -->|"mounts routes"| node_api
node_api -->|"uses schemas"| node_schemas
node_api -->|"loads datasets"| node_loader
node_api -->|"requests analysis"| node_service
node_api -->|"handles large files"| node_large
node_api -->|"requests explanations"| node_assistant
node_service -->|"computes metadata"| node_metadata
node_service -->|"uses snapshots"| node_snapshot
node_service -->|"runs checks"| node_quality
node_service -->|"calculates score"| node_score
node_service -->|"assesses readiness"| node_readiness
node_service -->|"detects drift"| node_drift
node_metadata -->|"uses roles"| node_roles
node_metadata -->|"counts missing"| node_missing
node_metadata -->|"checks sentinels"| node_sentinels
node_understanding -->|"uses roles"| node_roles
node_understanding -->|"checks missing"| node_missing
node_understanding -->|"checks sentinels"| node_sentinels
node_quality -->|"builds findings"| node_findings
node_quality -->|"checks missing"| node_missing
node_quality -->|"checks sentinels"| node_sentinels
node_score -.->|"scores findings"| node_findings
node_drift -.->|"compares snapshots"| node_snapshot
node_assistant -->|"uses chat resolver"| node_chat
node_assistant -.->|"rewrites explanations"| node_gemini
node_api -->|"returns results"| node_frontend

click node_frontend "https://github.com/neekshith3/data-sentinel/blob/main/frontend/js/app.js"
click node_main "https://github.com/neekshith3/data-sentinel/blob/main/main.py"
click node_api "https://github.com/neekshith3/data-sentinel/blob/main/app/api/routes.py"
click node_schemas "https://github.com/neekshith3/data-sentinel/blob/main/app/schemas/analysis.py"
click node_loader "https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/dataset_profiler.py"
click node_roles "https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/column_roles.py"
click node_missing "https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/missing_values.py"
click node_sentinels "https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/sentinel_detector.py"
click node_understanding "https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/dataset_understanding.py"
click node_metadata "https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/shared_metadata.py"
click node_snapshot "https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/dataset_snapshot.py"
click node_service "https://github.com/neekshith3/data-sentinel/blob/main/app/services/analysis_service.py"
click node_quality "https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/quality_engine.py"
click node_findings "https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/findings.py"
click node_score "https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/quality_score.py"
click node_readiness "https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/ml_readiness.py"
click node_drift "https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/drift_engine.py"
click node_large "https://github.com/neekshith3/data-sentinel/blob/main/app/analytics/large_dataset.py"
click node_assistant "https://github.com/neekshith3/data-sentinel/blob/main/app/ai/assistant.py"
click node_chat "https://github.com/neekshith3/data-sentinel/blob/main/app/ai/chat_resolver.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_main,node_api,node_schemas,node_user toneBlue
class node_loader,node_roles,node_missing,node_sentinels,node_understanding,node_metadata,node_snapshot toneAmber
class node_service,node_quality,node_findings,node_score,node_readiness,node_drift,node_large toneMint
class node_frontend,node_assistant,node_chat toneRose
class node_gemini toneIndigo
```

## Components

### Application entry

- [Application entry](https://github.com/neekshith3/data-sentinel/blob/main/main.py): `main.py`
- [Analysis API](https://github.com/neekshith3/data-sentinel/blob/main/app/api/routes.py): `app/api/routes.py`
- [Analysis schemas](https://github.com/neekshith3/data-sentinel/blob/main/app/schemas/analysis.py): `app/schemas/analysis.py`

### Profiling

- [Dataset loading](https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/dataset_profiler.py): `app/profiler/dataset_profiler.py`
- [Column roles](https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/column_roles.py): `app/profiler/column_roles.py`
- [Missing-value utilities](https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/missing_values.py): `app/profiler/missing_values.py`
- [Sentinel detection](https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/sentinel_detector.py): `app/profiler/sentinel_detector.py`
- [Dataset understanding](https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/dataset_understanding.py): `app/profiler/dataset_understanding.py`
- [Shared metadata](https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/shared_metadata.py): `app/profiler/shared_metadata.py`
- [Dataset snapshots](https://github.com/neekshith3/data-sentinel/blob/main/app/profiler/dataset_snapshot.py): `app/profiler/dataset_snapshot.py`

### Quality analysis

- [Analysis orchestration](https://github.com/neekshith3/data-sentinel/blob/main/app/services/analysis_service.py): `app/services/analysis_service.py`
- [Quality detection](https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/quality_engine.py): `app/quality_engine/quality_engine.py`
- [Structured findings](https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/findings.py): `app/quality_engine/findings.py`
- [Quality scoring](https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/quality_score.py): `app/quality_engine/quality_score.py`
- [ML readiness](https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/ml_readiness.py): `app/quality_engine/ml_readiness.py`
- [Drift analysis](https://github.com/neekshith3/data-sentinel/blob/main/app/quality_engine/drift_engine.py): `app/quality_engine/drift_engine.py`
- [Large-file analysis](https://github.com/neekshith3/data-sentinel/blob/main/app/analytics/large_dataset.py): `app/analytics/large_dataset.py`

### Results and explanations

- [Dashboard](https://github.com/neekshith3/data-sentinel/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Finding explanations](https://github.com/neekshith3/data-sentinel/blob/main/app/ai/assistant.py): `app/ai/assistant.py`
- [Assistant chat](https://github.com/neekshith3/data-sentinel/blob/main/app/ai/chat_resolver.py): `app/ai/chat_resolver.py`

### Other components

- **Dataset user**
- **Google Gemini**

## Connections

- Dataset user → Dashboard: uploads data
- Dashboard → Analysis API: requests analysis
- Application entry → Analysis API: mounts routes (evidence: `main.py`)
- Analysis API → Analysis schemas: uses schemas (evidence: `app/api/routes.py`)
- Analysis API → Dataset loading: loads datasets (evidence: `app/api/routes.py`)
- Analysis API → Analysis orchestration: requests analysis (evidence: `app/api/routes.py`)
- Analysis API → Large-file analysis: handles large files (evidence: `app/api/routes.py`)
- Analysis API → Finding explanations: requests explanations (evidence: `app/api/routes.py`)
- Analysis orchestration → Shared metadata: computes metadata (evidence: `app/services/analysis_service.py`)
- Analysis orchestration → Dataset snapshots: uses snapshots (evidence: `app/services/analysis_service.py`)
- Analysis orchestration → Quality detection: runs checks (evidence: `app/services/analysis_service.py`)
- Analysis orchestration → Quality scoring: calculates score (evidence: `app/services/analysis_service.py`)
- Analysis orchestration → ML readiness: assesses readiness (evidence: `app/services/analysis_service.py`)
- Analysis orchestration → Drift analysis: detects drift (evidence: `app/services/analysis_service.py`)
- Shared metadata → Column roles: uses roles (evidence: `app/profiler/shared_metadata.py`)
- Shared metadata → Missing-value utilities: counts missing (evidence: `app/profiler/shared_metadata.py`)
- Shared metadata → Sentinel detection: checks sentinels (evidence: `app/profiler/shared_metadata.py`)
- Dataset understanding → Column roles: uses roles (evidence: `app/profiler/dataset_understanding.py`)
- Dataset understanding → Missing-value utilities: checks missing (evidence: `app/profiler/dataset_understanding.py`)
- Dataset understanding → Sentinel detection: checks sentinels (evidence: `app/profiler/dataset_understanding.py`)
- Quality detection → Structured findings: builds findings (evidence: `app/quality_engine/quality_engine.py`)
- Quality detection → Missing-value utilities: checks missing (evidence: `app/quality_engine/quality_engine.py`)
- Quality detection → Sentinel detection: checks sentinels (evidence: `app/quality_engine/quality_engine.py`)
- Quality scoring → Structured findings: scores findings
- Drift analysis → Dataset snapshots: compares snapshots
- Finding explanations → Assistant chat: uses chat resolver (evidence: `app/ai/assistant.py`)
- Finding explanations → Google Gemini: rewrites explanations
- Analysis API → Dashboard: returns results
