# saurabh11072004/dental-x-ray-gen-ai architecture

> Architecture diagram of the GitHub repository saurabh11072004/dental-x-ray-gen-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saurabh11072004/dental-x-ray-gen-ai
- Repository: https://github.com/saurabh11072004/dental-x-ray-gen-ai

## Overview

DentaMind AI is a local research application for explainable dental-radiograph analysis, with a React interface, FastAPI services, and a Python ML library. The main user workflow is to upload or select an image, run analysis, inspect uncertainty and findings, then review regions and generate an unconfirmed report. Research capabilities also include annotation, active learning, training, experiments, and model registration. Edges reflect README-documented capabilities and the sampled wiring; unsampled service internals are not inferred.

Main entry points: [`backend/services/pipeline.py`](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/services/pipeline.py) (Analysis pipeline), [`backend/services/container.py`](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/services/container.py) (Service container), [`backend/main.py`](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/main.py) (API application), [`frontend/src/services/api.js`](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/frontend/src/services/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_webapp["Application shell<br/>[App.jsx]"]
  node_analysispage["Image analysis<br/>[Analysis.jsx]"]
  node_reviewui["Region review<br/>[RegionReview.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["Application API"]
  node_fastapi["API application<br/>[main.py]"]
  node_schemas["Request schemas<br/>[models.py]"]
  node_services["Service container<br/>[container.py]"]
end

subgraph group_analysis["Image analysis"]
  node_analysis_service["Analysis pipeline<br/>[pipeline.py]"]
  node_ml_pipeline["ML pipeline<br/>[pipeline.py]"]
  node_models["Dental models"]
  node_uncertainty["Uncertainty scoring<br/>[measures.py]"]
  node_numbering["Tooth numbering<br/>[tooth_numbering.py]"]
end

subgraph group_research["Research workflow"]
  node_review["Review audit trail<br/>[reviews.py]"]
  node_active_learning["Active learning<br/>[selection.py]"]
  node_annotation["Annotation integration<br/>[labelstudio.py]"]
  node_training["Model training<br/>[trainers.py]"]
  node_experiments["Experiments<br/>[experiments.py]"]
  node_registry["Model registry<br/>[registry.py]"]
  node_reports["Multilingual reports<br/>[i18n.py]"]
end

subgraph group_platform["Runtime platform"]
  node_database[("Metadata database<br/>[storage.py]")]
  node_settings["Runtime configuration<br/>[config.py]"]
end

node_researcher(("Research user"))

node_researcher -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_analysispage
node_analysispage -.->|"requests analysis"| node_api_client
node_reviewui -->|"submits decisions"| node_api_client
node_api_client -.->|"calls API"| node_fastapi
node_fastapi -.->|"routes requests"| node_services
node_fastapi -->|"validates inputs"| node_schemas
node_services -->|"creates service"| node_analysis_service
node_analysis_service -->|"runs analysis"| node_ml_pipeline
node_analysis_service -->|"computes signals"| node_uncertainty
node_analysis_service -->|"numbers teeth"| node_numbering
node_ml_pipeline -->|"uses registry"| node_registry
node_reviewui -.->|"records review"| node_review
node_researcher -->|"selects cases"| node_active_learning
node_researcher -->|"labels cases"| node_annotation
node_researcher -->|"starts training"| node_training
node_researcher -->|"runs experiments"| node_experiments
node_researcher -->|"requests report"| node_reports
node_services -.->|"stores metadata"| node_database
node_services -->|"uses settings"| node_settings
node_training -.->|"registers models"| node_registry
node_analysis_service -.->|"runs checkpoints"| node_models

click node_webapp "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/frontend/src/App.jsx"
click node_analysispage "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/frontend/src/pages/Analysis.jsx"
click node_reviewui "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/frontend/src/components/RegionReview.jsx"
click node_api_client "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/frontend/src/services/api.js"
click node_fastapi "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/main.py"
click node_schemas "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/schemas/models.py"
click node_services "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/services/container.py"
click node_analysis_service "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/services/pipeline.py"
click node_ml_pipeline "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/pipeline.py"
click node_models "https://github.com/saurabh11072004/dental-x-ray-gen-ai/tree/main/src/dentexmodel/models"
click node_uncertainty "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/uncertainty/measures.py"
click node_numbering "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/inference/tooth_numbering.py"
click node_review "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/annotation/reviews.py"
click node_active_learning "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/active_learning/selection.py"
click node_annotation "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/annotation/labelstudio.py"
click node_training "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/training/trainers.py"
click node_experiments "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/services/experiments.py"
click node_registry "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/inference/registry.py"
click node_reports "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/reporting/i18n.py"
click node_database "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/storage.py"
click node_settings "https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/config.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_webapp,node_analysispage,node_reviewui,node_api_client,node_researcher toneBlue
class node_fastapi,node_schemas,node_services toneAmber
class node_analysis_service,node_ml_pipeline,node_models,node_uncertainty,node_numbering toneMint
class node_review,node_active_learning,node_annotation,node_training,node_experiments,node_registry,node_reports toneRose
class node_database,node_settings toneIndigo
```

## Components

### User interface

- [Application shell](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Image analysis](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/frontend/src/pages/Analysis.jsx): `frontend/src/pages/Analysis.jsx`
- [Region review](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/frontend/src/components/RegionReview.jsx): `frontend/src/components/RegionReview.jsx`
- [API client](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Application API

- [API application](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/main.py): `backend/main.py`
- [Request schemas](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/schemas/models.py): `backend/schemas/models.py`
- [Service container](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/services/container.py): `backend/services/container.py`

### Image analysis

- [Analysis pipeline](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/services/pipeline.py): `backend/services/pipeline.py`
- [ML pipeline](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/pipeline.py): `src/dentexmodel/pipeline.py`
- [Dental models](https://github.com/saurabh11072004/dental-x-ray-gen-ai/tree/main/src/dentexmodel/models): `src/dentexmodel/models`
- [Uncertainty scoring](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/uncertainty/measures.py): `src/dentexmodel/uncertainty/measures.py`
- [Tooth numbering](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/inference/tooth_numbering.py): `src/dentexmodel/inference/tooth_numbering.py`

### Research workflow

- [Review audit trail](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/annotation/reviews.py): `src/dentexmodel/annotation/reviews.py`
- [Active learning](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/active_learning/selection.py): `src/dentexmodel/active_learning/selection.py`
- [Annotation integration](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/annotation/labelstudio.py): `src/dentexmodel/annotation/labelstudio.py`
- [Model training](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/training/trainers.py): `src/dentexmodel/training/trainers.py`
- [Experiments](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/backend/services/experiments.py): `backend/services/experiments.py`
- [Model registry](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/inference/registry.py): `src/dentexmodel/inference/registry.py`
- [Multilingual reports](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/reporting/i18n.py): `src/dentexmodel/reporting/i18n.py`

### Runtime platform

- [Metadata database](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/storage.py): `src/dentexmodel/storage.py`
- [Runtime configuration](https://github.com/saurabh11072004/dental-x-ray-gen-ai/blob/main/src/dentexmodel/config.py): `src/dentexmodel/config.py`

### Other components

- **Research user**

## Connections

- Research user → Application shell: uses (evidence: `README.md`)
- Application shell → Image analysis: routes to (evidence: `frontend/src/App.jsx`)
- Image analysis → API client: requests analysis
- Region review → API client: submits decisions (evidence: `frontend/src/components/RegionReview.jsx`)
- API client → API application: calls API
- API application → Service container: routes requests
- API application → Request schemas: validates inputs
- Service container → Analysis pipeline: creates service (evidence: `backend/services/container.py`)
- Analysis pipeline → ML pipeline: runs analysis (evidence: `backend/services/pipeline.py`)
- Analysis pipeline → Uncertainty scoring: computes signals (evidence: `backend/services/pipeline.py`)
- Analysis pipeline → Tooth numbering: numbers teeth (evidence: `backend/services/pipeline.py`)
- ML pipeline → Model registry: uses registry (evidence: `src/dentexmodel/pipeline.py`)
- Region review → Review audit trail: records review
- Research user → Active learning: selects cases (evidence: `README.md`)
- Research user → Annotation integration: labels cases (evidence: `README.md`)
- Research user → Model training: starts training (evidence: `README.md`)
- Research user → Experiments: runs experiments (evidence: `README.md`)
- Research user → Multilingual reports: requests report (evidence: `README.md`)
- Service container → Metadata database: stores metadata
- Service container → Runtime configuration: uses settings
- Model training → Model registry: registers models
- Analysis pipeline → Dental models: runs checkpoints
