# unknown420-alt/ai-dataset-labeling-marketplace architecture

> Architecture diagram of the GitHub repository unknown420-alt/ai-dataset-labeling-marketplace, 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/unknown420-alt/ai-dataset-labeling-marketplace
- Repository: https://github.com/unknown420-alt/ai-dataset-labeling-marketplace

## Overview

This is a two-sided dataset-labeling marketplace: owners publish datasets and tasks, while labelers claim tasks and submit per-item labels, with AI suggestions assisting the human workflow. Owners then review submissions, inspect consensus and analytics, and export labeled results; the README also documents model training and prediction. The graph preserves these product stages and the frontend/API/data layers. Some capabilities are documented but their implementation excerpts were not available, so those links are marked unverified rather than inferred as direct calls.

Main entry points: [`frontend/src/App.jsx`](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/App.jsx) (App and dashboard), [`app/api/v1/router.py`](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/router.py) (API router), [`frontend/src/api.js`](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/api.js) (API client), [`app/core/database.py`](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/core/database.py) (Async database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_spa["App and dashboard<br/>[App.jsx]"]
  node_authui["Signup and login<br/>[Login.jsx]"]
  node_taskui["Task management<br/>[TasksTab.jsx]"]
  node_datasetui["Dataset management<br/>[DatasetsTab.jsx]"]
  node_labelui["Labeling workspace<br/>[LabelingTab.jsx]"]
  node_reviewui["Review workspace<br/>[ReviewTab.jsx]"]
  node_analyticsui["Owner analytics<br/>[AnalyticsTab.jsx]"]
  node_uikit["Shared UI components"]
  node_clientapi["API client<br/>[api.js]"]
end

subgraph group_api["API workflows"]
  node_entry["FastAPI application<br/>[main.py]"]
  node_routes["API router<br/>[router.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_datasets["Dataset endpoints<br/>[datasets.py]"]
  node_tasks["Task endpoints<br/>[tasks.py]"]
  node_labeling["Labeling endpoints<br/>[labeling.py]"]
end

subgraph group_domain["Data and services"]
  node_ai["AI suggestions<br/>[llm.py]"]
  node_upload["Item upload<br/>[upload.py]"]
  node_security["Token security<br/>[security.py]"]
  node_models["Marketplace records"]
  node_database[("Async database<br/>[database.py]")]
end

subgraph group_insights["Review and training"]
  node_review["Review and exports<br/>[review.py]"]
  node_training["Train and predict<br/>[training.py]"]
end

node_owner(("Dataset owner"))
node_labeler(("Labeler"))
node_postgres[("PostgreSQL")]

node_owner -->|"uses"| node_spa
node_labeler -->|"uses"| node_spa
node_spa -->|"routes auth"| node_authui
node_spa -->|"shows dashboard"| node_taskui
node_spa -->|"shows dashboard"| node_datasetui
node_spa -->|"shows dashboard"| node_labelui
node_spa -->|"shows dashboard"| node_reviewui
node_spa -->|"shows dashboard"| node_analyticsui
node_authui -->|"calls"| node_clientapi
node_taskui -->|"calls"| node_clientapi
node_labelui -->|"calls"| node_clientapi
node_reviewui -->|"calls"| node_clientapi
node_clientapi -->|"HTTP requests"| node_entry
node_entry -->|"mounts routes"| node_routes
node_routes -->|"registers"| node_auth
node_routes -->|"registers"| node_datasets
node_routes -->|"registers"| node_tasks
node_routes -->|"registers"| node_labeling
node_routes -->|"registers"| node_review
node_auth -->|"uses"| node_security
node_tasks -->|"authenticates"| node_security
node_auth -->|"opens session"| node_database
node_tasks -->|"opens session"| node_database
node_review -->|"queries records"| node_database
node_database -.->|"stores data"| node_postgres
node_datasets -.->|"uses upload"| node_upload
node_labeling -.->|"requests suggestions"| node_ai
node_reviewui -->|"requests review data"| node_review
node_analyticsui -.->|"requests analytics"| node_review
node_datasets -.->|"trains and predicts"| node_training
node_tasks -->|"persists tasks"| node_database

click node_spa "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/Login.jsx"
click node_taskui "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/owner/TasksTab.jsx"
click node_datasetui "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/owner/DatasetsTab.jsx"
click node_labelui "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/labeler/LabelingTab.jsx"
click node_reviewui "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/owner/ReviewTab.jsx"
click node_analyticsui "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/owner/AnalyticsTab.jsx"
click node_uikit "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/tree/main/frontend/src/components/ui"
click node_clientapi "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/api.js"
click node_entry "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/main.py"
click node_routes "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/router.py"
click node_auth "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/auth.py"
click node_datasets "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/datasets.py"
click node_tasks "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/tasks.py"
click node_labeling "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/labeling.py"
click node_review "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/review.py"
click node_training "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/services/training.py"
click node_ai "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/services/llm.py"
click node_upload "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/services/upload.py"
click node_security "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/services/security.py"
click node_models "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/tree/main/app/models"
click node_database "https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/core/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_spa,node_authui,node_taskui,node_datasetui,node_labelui,node_reviewui,node_analyticsui,node_uikit,node_clientapi toneBlue
class node_entry,node_routes,node_auth,node_datasets,node_tasks,node_labeling,node_postgres toneAmber
class node_ai,node_upload,node_security,node_models,node_database toneMint
class node_review,node_training toneRose
class node_owner,node_labeler toneIndigo
```

## Components

### React client

- [App and dashboard](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Signup and login](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/Login.jsx): `frontend/src/components/Login.jsx`
- [Task management](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/owner/TasksTab.jsx): `frontend/src/components/owner/TasksTab.jsx`
- [Dataset management](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/owner/DatasetsTab.jsx): `frontend/src/components/owner/DatasetsTab.jsx`
- [Labeling workspace](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/labeler/LabelingTab.jsx): `frontend/src/components/labeler/LabelingTab.jsx`
- [Review workspace](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/owner/ReviewTab.jsx): `frontend/src/components/owner/ReviewTab.jsx`
- [Owner analytics](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/components/owner/AnalyticsTab.jsx): `frontend/src/components/owner/AnalyticsTab.jsx`
- [Shared UI components](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/tree/main/frontend/src/components/ui): `frontend/src/components/ui`
- [API client](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/frontend/src/api.js): `frontend/src/api.js`

### API workflows

- [FastAPI application](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/main.py): `app/main.py`
- [API router](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/router.py): `app/api/v1/router.py`
- [Authentication](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/auth.py): `app/api/v1/auth.py`
- [Dataset endpoints](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/datasets.py): `app/api/v1/datasets.py`
- [Task endpoints](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/tasks.py): `app/api/v1/tasks.py`
- [Labeling endpoints](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/labeling.py): `app/api/v1/labeling.py`

### Data and services

- [AI suggestions](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/services/llm.py): `app/services/llm.py`
- [Item upload](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/services/upload.py): `app/services/upload.py`
- [Token security](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/services/security.py): `app/services/security.py`
- [Marketplace records](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/tree/main/app/models): `app/models`
- [Async database](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/core/database.py): `app/core/database.py`

### Review and training

- [Review and exports](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/api/v1/review.py): `app/api/v1/review.py`
- [Train and predict](https://github.com/unknown420-alt/ai-dataset-labeling-marketplace/blob/main/app/services/training.py): `app/services/training.py`

### Other components

- **Dataset owner**
- **Labeler**
- **PostgreSQL**

## Connections

- Dataset owner → App and dashboard: uses (evidence: `README.md`)
- Labeler → App and dashboard: uses (evidence: `README.md`)
- App and dashboard → Signup and login: routes auth (evidence: `frontend/src/App.jsx`)
- App and dashboard → Task management: shows dashboard
- App and dashboard → Dataset management: shows dashboard
- App and dashboard → Labeling workspace: shows dashboard
- App and dashboard → Review workspace: shows dashboard
- App and dashboard → Owner analytics: shows dashboard
- Signup and login → API client: calls (evidence: `frontend/src/components/Login.jsx`)
- Task management → API client: calls (evidence: `frontend/src/components/owner/TasksTab.jsx`)
- Labeling workspace → API client: calls (evidence: `frontend/src/components/labeler/LabelingTab.jsx`)
- Review workspace → API client: calls (evidence: `frontend/src/components/owner/ReviewTab.jsx`)
- API client → FastAPI application: HTTP requests (evidence: `README.md`)
- FastAPI application → API router: mounts routes (evidence: `app/main.py`)
- API router → Authentication: registers (evidence: `app/api/v1/router.py`)
- API router → Dataset endpoints: registers (evidence: `app/api/v1/router.py`)
- API router → Task endpoints: registers (evidence: `app/api/v1/router.py`)
- API router → Labeling endpoints: registers (evidence: `app/api/v1/router.py`)
- API router → Review and exports: registers (evidence: `app/api/v1/router.py`)
- Authentication → Token security: uses (evidence: `app/api/v1/auth.py`)
- Task endpoints → Token security: authenticates (evidence: `app/api/v1/tasks.py`)
- Authentication → Async database: opens session (evidence: `app/api/v1/auth.py`)
- Task endpoints → Async database: opens session (evidence: `app/api/v1/tasks.py`)
- Review and exports → Async database: queries records (evidence: `app/api/v1/review.py`)
- Async database → PostgreSQL: stores data (evidence: `README.md`)
- Dataset endpoints → Item upload: uses upload
- Labeling endpoints → AI suggestions: requests suggestions
- Review workspace → Review and exports: requests review data (evidence: `frontend/src/components/owner/ReviewTab.jsx`)
- Owner analytics → Review and exports: requests analytics
- Dataset endpoints → Train and predict: trains and predicts (evidence: `README.md`)
- Task endpoints → Async database: persists tasks (evidence: `app/api/v1/tasks.py`)
