# sumet-saeyi/humanoidth architecture

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

- Interactive diagram: https://gitdiagram.com/sumet-saeyi/humanoidth
- Repository: https://github.com/sumet-saeyi/humanoidth

## Overview

Thailand Humanoid Atlas is a research and community platform for collecting and exploring Thailand’s humanoid-robotics ecosystem. Its principal workflow is to gather records through source adapters and community submissions, persist them, then expose the resulting robot registry, perspectives, contributions, and inventory through browsing, mapping, analytics, and network views. The graph includes the documented product areas even where their page implementations were not sampled; links for those areas are omitted when wiring is not evidenced. The tree also contains a Python atlas runtime, shown as a separate subsystem because its integration with the Next.js app is not established by the excerpts.

Main entry points: [`lib/prisma.ts`](https://github.com/sumet-saeyi/humanoidth/blob/main/lib/prisma.ts) (Prisma access), [`src/humanoid_atlas/cli.py`](https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/cli.py) (Python CLI), [`src/humanoid_atlas/viewer/server.py`](https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/viewer/server.py) (Python web viewer), [`app/page.tsx`](https://github.com/sumet-saeyi/humanoidth/blob/main/app/page.tsx) (Atlas overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Atlas experience"]
  node_overview["Atlas overview<br/>[page.tsx]"]
  node_robots["Robot registry<br/>[page.tsx]"]
  node_perspectives["Media perspectives<br/>[page.tsx]"]
  node_contributions["Contributions<br/>[page.tsx]"]
  node_inventory["Asset inventory<br/>[page.tsx]"]
  node_map["Contribution map<br/>[page.tsx]"]
  node_network["Network explorer"]
  node_analytics["Analytics<br/>[page.tsx]"]
  node_database_ui["Database browser<br/>[page.tsx]"]
end

subgraph group_collection["Collection and review"]
  node_data_pulls["Data-pull controls<br/>[page.tsx]"]
  node_ingest_api["Ingest endpoint<br/>[route.ts]"]
  node_adapters["Source adapters<br/>[adapters.ts]"]
  node_community["Community submission<br/>[page.tsx]"]
  node_admin["Submission review<br/>[page.tsx]"]
  node_export["CSV export<br/>[route.ts]"]
end

subgraph group_data["Data and analysis"]
  node_db_client["Prisma access<br/>[prisma.ts]"]
  node_postgres[("Atlas database")]
  node_network_api["Network API<br/>[route.ts]"]
  node_graph_builder["Graph builder<br/>[network-graph.ts]"]
end

subgraph group_python["Python runtime"]
  node_python_cli["Python CLI<br/>[cli.py]"]
  node_python_adapters["Python adapters"]
  node_python_pipeline["Analysis pipeline"]
  node_python_repos["Python repositories<br/>[repos.py]"]
  node_python_db[("SQLite database<br/>[session.py]")]
  node_python_viewer["Python web viewer<br/>[server.py]"]
end

node_visitor(("Researcher / visitor"))
node_source_services{{"External source services"}}

node_visitor -->|"browses"| node_overview
node_visitor -->|"explores"| node_robots
node_visitor -->|"explores"| node_perspectives
node_visitor -->|"explores"| node_contributions
node_visitor -->|"explores"| node_inventory
node_visitor -->|"explores"| node_map
node_visitor -->|"explores"| node_network
node_visitor -->|"explores"| node_analytics
node_visitor -->|"starts pulls"| node_data_pulls
node_visitor -->|"submits records"| node_community
node_data_pulls -->|"triggers"| node_ingest_api
node_ingest_api -->|"runs adapter"| node_adapters
node_adapters -.->|"retrieves records"| node_source_services
node_community -->|"submits data"| node_db_client
node_admin -->|"reviews records"| node_db_client
node_export -->|"reads records"| node_db_client
node_overview -->|"reads metrics"| node_db_client
node_network_api -->|"builds graph"| node_graph_builder
node_graph_builder -->|"reads records"| node_db_client
node_db_client -->|"queries"| node_postgres
node_python_cli -->|"runs collection"| node_python_adapters
node_python_cli -->|"runs analysis"| node_python_pipeline
node_python_adapters -.->|"retrieves records"| node_source_services
node_python_viewer -->|"queries data"| node_python_repos
node_python_viewer -->|"rebuilds caches"| node_python_pipeline
node_python_repos -->|"accesses"| node_python_db

click node_overview "https://github.com/sumet-saeyi/humanoidth/blob/main/app/page.tsx"
click node_robots "https://github.com/sumet-saeyi/humanoidth/blob/main/app/robots/page.tsx"
click node_perspectives "https://github.com/sumet-saeyi/humanoidth/blob/main/app/perspectives/page.tsx"
click node_contributions "https://github.com/sumet-saeyi/humanoidth/blob/main/app/contributions/page.tsx"
click node_inventory "https://github.com/sumet-saeyi/humanoidth/blob/main/app/inventory/page.tsx"
click node_map "https://github.com/sumet-saeyi/humanoidth/blob/main/app/map/page.tsx"
click node_network "https://github.com/sumet-saeyi/humanoidth/blob/main/app/network/NetworkGraphClient.tsx"
click node_analytics "https://github.com/sumet-saeyi/humanoidth/blob/main/app/analytics/page.tsx"
click node_database_ui "https://github.com/sumet-saeyi/humanoidth/blob/main/app/database/page.tsx"
click node_data_pulls "https://github.com/sumet-saeyi/humanoidth/blob/main/app/data-pulls/page.tsx"
click node_ingest_api "https://github.com/sumet-saeyi/humanoidth/blob/main/app/api/ingest/%5Badapter%5D/route.ts"
click node_adapters "https://github.com/sumet-saeyi/humanoidth/blob/main/lib/ingest/adapters.ts"
click node_community "https://github.com/sumet-saeyi/humanoidth/blob/main/app/submit-data/page.tsx"
click node_admin "https://github.com/sumet-saeyi/humanoidth/blob/main/app/admin/submitted-data/page.tsx"
click node_export "https://github.com/sumet-saeyi/humanoidth/blob/main/app/api/export/route.ts"
click node_db_client "https://github.com/sumet-saeyi/humanoidth/blob/main/lib/prisma.ts"
click node_network_api "https://github.com/sumet-saeyi/humanoidth/blob/main/app/api/network/graph/route.ts"
click node_graph_builder "https://github.com/sumet-saeyi/humanoidth/blob/main/lib/network-graph.ts"
click node_python_cli "https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/cli.py"
click node_python_adapters "https://github.com/sumet-saeyi/humanoidth/tree/main/src/humanoid_atlas/adapters"
click node_python_pipeline "https://github.com/sumet-saeyi/humanoidth/tree/main/src/humanoid_atlas/pipeline"
click node_python_repos "https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/db/repos.py"
click node_python_db "https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/db/session.py"
click node_python_viewer "https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/viewer/server.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_overview,node_robots,node_perspectives,node_contributions,node_inventory,node_map,node_network,node_analytics,node_database_ui toneBlue
class node_data_pulls,node_ingest_api,node_adapters,node_community,node_admin,node_export toneAmber
class node_db_client,node_postgres,node_network_api,node_graph_builder toneMint
class node_python_cli,node_python_adapters,node_python_pipeline,node_python_repos,node_python_db,node_python_viewer toneRose
class node_visitor,node_source_services toneIndigo
```

## Components

### Atlas experience

- [Atlas overview](https://github.com/sumet-saeyi/humanoidth/blob/main/app/page.tsx): `app/page.tsx`
- [Robot registry](https://github.com/sumet-saeyi/humanoidth/blob/main/app/robots/page.tsx): `app/robots/page.tsx`
- [Media perspectives](https://github.com/sumet-saeyi/humanoidth/blob/main/app/perspectives/page.tsx): `app/perspectives/page.tsx`
- [Contributions](https://github.com/sumet-saeyi/humanoidth/blob/main/app/contributions/page.tsx): `app/contributions/page.tsx`
- [Asset inventory](https://github.com/sumet-saeyi/humanoidth/blob/main/app/inventory/page.tsx): `app/inventory/page.tsx`
- [Contribution map](https://github.com/sumet-saeyi/humanoidth/blob/main/app/map/page.tsx): `app/map/page.tsx`
- [Network explorer](https://github.com/sumet-saeyi/humanoidth/blob/main/app/network/NetworkGraphClient.tsx): `app/network/NetworkGraphClient.tsx`
- [Analytics](https://github.com/sumet-saeyi/humanoidth/blob/main/app/analytics/page.tsx): `app/analytics/page.tsx`
- [Database browser](https://github.com/sumet-saeyi/humanoidth/blob/main/app/database/page.tsx): `app/database/page.tsx`

### Collection and review

- [Data-pull controls](https://github.com/sumet-saeyi/humanoidth/blob/main/app/data-pulls/page.tsx): `app/data-pulls/page.tsx`
- [Ingest endpoint](https://github.com/sumet-saeyi/humanoidth/blob/main/app/api/ingest/%5Badapter%5D/route.ts): `app/api/ingest/[adapter]/route.ts`
- [Source adapters](https://github.com/sumet-saeyi/humanoidth/blob/main/lib/ingest/adapters.ts): `lib/ingest/adapters.ts`
- [Community submission](https://github.com/sumet-saeyi/humanoidth/blob/main/app/submit-data/page.tsx): `app/submit-data/page.tsx`
- [Submission review](https://github.com/sumet-saeyi/humanoidth/blob/main/app/admin/submitted-data/page.tsx): `app/admin/submitted-data/page.tsx`
- [CSV export](https://github.com/sumet-saeyi/humanoidth/blob/main/app/api/export/route.ts): `app/api/export/route.ts`

### Data and analysis

- [Prisma access](https://github.com/sumet-saeyi/humanoidth/blob/main/lib/prisma.ts): `lib/prisma.ts`
- **Atlas database**
- [Network API](https://github.com/sumet-saeyi/humanoidth/blob/main/app/api/network/graph/route.ts): `app/api/network/graph/route.ts`
- [Graph builder](https://github.com/sumet-saeyi/humanoidth/blob/main/lib/network-graph.ts): `lib/network-graph.ts`

### Python runtime

- [Python CLI](https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/cli.py): `src/humanoid_atlas/cli.py`
- [Python adapters](https://github.com/sumet-saeyi/humanoidth/tree/main/src/humanoid_atlas/adapters): `src/humanoid_atlas/adapters`
- [Analysis pipeline](https://github.com/sumet-saeyi/humanoidth/tree/main/src/humanoid_atlas/pipeline): `src/humanoid_atlas/pipeline`
- [Python repositories](https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/db/repos.py): `src/humanoid_atlas/db/repos.py`
- [SQLite database](https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/db/session.py): `src/humanoid_atlas/db/session.py`
- [Python web viewer](https://github.com/sumet-saeyi/humanoidth/blob/main/src/humanoid_atlas/viewer/server.py): `src/humanoid_atlas/viewer/server.py`

### Other components

- **Researcher / visitor**
- **External source services**

## Connections

- Researcher / visitor → Atlas overview: browses
- Researcher / visitor → Robot registry: explores
- Researcher / visitor → Media perspectives: explores
- Researcher / visitor → Contributions: explores
- Researcher / visitor → Asset inventory: explores
- Researcher / visitor → Contribution map: explores
- Researcher / visitor → Network explorer: explores
- Researcher / visitor → Analytics: explores
- Researcher / visitor → Data-pull controls: starts pulls
- Researcher / visitor → Community submission: submits records
- Data-pull controls → Ingest endpoint: triggers
- Ingest endpoint → Source adapters: runs adapter
- Source adapters → External source services: retrieves records
- Community submission → Prisma access: submits data
- Submission review → Prisma access: reviews records
- CSV export → Prisma access: reads records
- Atlas overview → Prisma access: reads metrics
- Network API → Graph builder: builds graph
- Graph builder → Prisma access: reads records
- Prisma access → Atlas database: queries
- Python CLI → Python adapters: runs collection
- Python CLI → Analysis pipeline: runs analysis
- Python adapters → External source services: retrieves records
- Python web viewer → Python repositories: queries data
- Python web viewer → Analysis pipeline: rebuilds caches
- Python repositories → SQLite database: accesses
