# vishalgitgeek/dataforge architecture

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

- Interactive diagram: https://gitdiagram.com/vishalgitgeek/dataforge
- Repository: https://github.com/vishalgitgeek/dataforge

## Overview

DataForge is scaffolded as a FastAPI backend for a data-analysis platform. The visible runtime initializes configuration, request logging, API routing, and an async PostgreSQL connection; its ORM schema models users, dataset versions, processing, quality, analytics, and query history. The README is empty, and route and design-document contents were not sampled, so the domain capabilities are represented as schema responsibilities rather than an asserted working upload-to-analysis pipeline.

Main entry points: [`app/main.py`](https://github.com/vishalgitgeek/dataforge/blob/main/app/main.py) (FastAPI app), [`app/models.py`](https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py) (Datasets and versions), [`app/infrastructure/database.py`](https://github.com/vishalgitgeek/dataforge/blob/main/app/infrastructure/database.py) (DB engine), [`app/api/router.py`](https://github.com/vishalgitgeek/dataforge/blob/main/app/api/router.py) (API router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["API runtime"]
  node_application["FastAPI app<br/>[main.py]"]
  node_api_router["API router<br/>[router.py]"]
  node_health["Health route<br/>[health.py]"]
  node_settings["Settings<br/>[config.py]"]
  node_logging["Request logging<br/>[logging.py]"]
end

subgraph group_persistence["PostgreSQL persistence"]
  node_database["DB engine<br/>[database.py]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_domain["Data platform domain"]
  node_models["ORM models<br/>[models.py]"]
  node_identity["Users and tokens<br/>[models.py]"]
  node_datasets["Datasets and versions<br/>[models.py]"]
  node_processing["Processing jobs<br/>[models.py]"]
  node_quality["Quality results<br/>[models.py]"]
  node_analytics["Analysis results<br/>[models.py]"]
  node_query_history["Query history<br/>[models.py]"]
end

node_client(("API client"))

node_client -->|"sends requests"| node_application
node_application -->|"mounts routes"| node_api_router
node_api_router -->|"includes route"| node_health
node_application -->|"loads settings"| node_settings
node_application -->|"configures logging"| node_logging
node_application -->|"disposes on shutdown"| node_database
node_database -->|"reads URL"| node_settings
node_database -->|"connects"| node_postgres
node_models -->|"uses declarative base"| node_database
node_identity -->|"owns"| node_datasets
node_datasets -->|"tracks jobs"| node_processing
node_datasets -->|"records checks"| node_quality
node_datasets -->|"records analyses"| node_analytics
node_identity -->|"tracks queries"| node_query_history

click node_application "https://github.com/vishalgitgeek/dataforge/blob/main/app/main.py"
click node_api_router "https://github.com/vishalgitgeek/dataforge/blob/main/app/api/router.py"
click node_health "https://github.com/vishalgitgeek/dataforge/blob/main/app/api/routes/health.py"
click node_settings "https://github.com/vishalgitgeek/dataforge/blob/main/app/core/config.py"
click node_logging "https://github.com/vishalgitgeek/dataforge/blob/main/app/core/logging.py"
click node_database "https://github.com/vishalgitgeek/dataforge/blob/main/app/infrastructure/database.py"
click node_models "https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py"
click node_identity "https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py"
click node_datasets "https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py"
click node_processing "https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py"
click node_quality "https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py"
click node_analytics "https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py"
click node_query_history "https://github.com/vishalgitgeek/dataforge/blob/main/app/models.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_application,node_api_router,node_health,node_settings,node_logging,node_client toneBlue
class node_database,node_postgres toneAmber
class node_models,node_identity,node_datasets,node_processing,node_quality,node_analytics,node_query_history toneMint
```

## Components

### API runtime

- [FastAPI app](https://github.com/vishalgitgeek/dataforge/blob/main/app/main.py): `app/main.py`
- [API router](https://github.com/vishalgitgeek/dataforge/blob/main/app/api/router.py): `app/api/router.py`
- [Health route](https://github.com/vishalgitgeek/dataforge/blob/main/app/api/routes/health.py): `app/api/routes/health.py`
- [Settings](https://github.com/vishalgitgeek/dataforge/blob/main/app/core/config.py): `app/core/config.py`
- [Request logging](https://github.com/vishalgitgeek/dataforge/blob/main/app/core/logging.py): `app/core/logging.py`

### PostgreSQL persistence

- [DB engine](https://github.com/vishalgitgeek/dataforge/blob/main/app/infrastructure/database.py): `app/infrastructure/database.py`
- **PostgreSQL**

### Data platform domain

- [ORM models](https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py): `app/models.py`
- [Users and tokens](https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py): `app/models.py`
- [Datasets and versions](https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py): `app/models.py`
- [Processing jobs](https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py): `app/models.py`
- [Quality results](https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py): `app/models.py`
- [Analysis results](https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py): `app/models.py`
- [Query history](https://github.com/vishalgitgeek/dataforge/blob/main/app/models.py): `app/models.py`

### Other components

- **API client**

## Connections

- API client → FastAPI app: sends requests
- FastAPI app → API router: mounts routes
- API router → Health route: includes route
- FastAPI app → Settings: loads settings
- FastAPI app → Request logging: configures logging
- FastAPI app → DB engine: disposes on shutdown
- DB engine → Settings: reads URL
- DB engine → PostgreSQL: connects
- ORM models → DB engine: uses declarative base
- Users and tokens → Datasets and versions: owns
- Datasets and versions → Processing jobs: tracks jobs
- Datasets and versions → Quality results: records checks
- Datasets and versions → Analysis results: records analyses
- Users and tokens → Query history: tracks queries
