How ji24077/htn works
ChatGPU is a distributed compute workspace: users submit Python jobs or chat requests, a planning coordinator turns work into tasks, workers execute and validate results, and the control plane records state and usage. The map also preserves the documented supervisor, fleet assistant, hosted-service, device-pairing, topology, and GPU Lab capabilities. README statements establish the principal runtime relationships; source excerpts support the API, storage, preprocessing, and UI links. Some subsystem implementations were not sampled, so their internal connections are shown only where documented.
Main entry points: app.py Server Runtime · service.py Job Coordinator · store.py PostgreSQL State · App.tsx Web App
Components 24
Workspace UI
- Web App
frontend/src/App.tsx - Job Workspace
frontend/src/components/TaskComposer.tsx - Fleet Topology
frontend/src/components/FleetNetwork.tsx - GPU Lab
frontend/src/components/GpuLab.tsx - Web API Client
frontend/src/api/client.ts
Control Plane
- Control API
backend/src/orchestrator/server/routes.py - Server Runtime
backend/src/orchestrator/server/app.py - Authentication
backend/src/orchestrator/server/auth.py - PostgreSQL State
backend/src/orchestrator/server/db/store.py - Usage Metering
backend/src/orchestrator/server/usage.py - Shared Contracts
backend/src/orchestrator/shared
Planning and Jobs
- Job Coordinator
backend/src/orchestrator/preprocessing/service.py - Job Models
backend/src/orchestrator/preprocessing/models.py - Job Artifacts
backend/src/orchestrator/preprocessing/artifacts.py - Job Persistence
backend/src/orchestrator/preprocessing/store.py
Workers and Devices
- Python Worker
backend/src/orchestrator/worker/agent.py - Job Executors
backend/src/orchestrator/worker/executors/python_project.py - Paired Device Agents
packages/agent/src/transport.ts
Fleet Capabilities
- Job Supervisor
backend/src/orchestrator/supervisor/service.py - Fleet Assistant
backend/src/orchestrator/server/chat.py - Hosted Services
backend/src/orchestrator/server/services.py
Other components
- User
- GPUShare Service
- LLM Provider
Connections 31
- User → Web App: uses
README.md - Web App → Job Workspace: opens job flow
frontend/src/App.tsx - Job Workspace → Web API Client: submits jobs
frontend/src/App.tsx - Web App → Web API Client: requests workspace data
frontend/src/App.tsx - Web API Client → Control API: calls API
README.md - Web App → Fleet Topology: renders topology
frontend/src/App.tsx - Web App → GPU Lab: opens experiments
frontend/src/App.tsx - GPU Lab → GPUShare Service: reads evidence
README.md - Control API → Authentication: checks access
backend/src/orchestrator/server/routes.py - Server Runtime → Control API: mounts routes
backend/src/orchestrator/server/app.py - Control API → PostgreSQL State: reads and writes state
backend/src/orchestrator/server/routes.py - Control API → Job Coordinator: accepts uploads
- Job Coordinator → Job Models: validates plans
backend/src/orchestrator/preprocessing/service.py - Job Coordinator → Job Artifacts: handles artifacts
backend/src/orchestrator/preprocessing/service.py - Job Coordinator → Job Persistence: persists job data
backend/src/orchestrator/preprocessing/service.py - Job Coordinator → PostgreSQL State: creates tasks
backend/src/orchestrator/preprocessing/service.py - Job Coordinator → LLM Provider: requests plans
README.md - Python Worker → Server Runtime: connects outbound
README.md - Server Runtime → PostgreSQL State: schedules leased work
README.md - Python Worker → Job Executors: runs assigned work
README.md - Job Executors → Python Worker: returns results
README.md - Python Worker → PostgreSQL State: reports results
README.md - Paired Device Agents → Server Runtime: connects and reports
README.md - Paired Device Agents → Server Runtime: submits signed results
README.md - Server Runtime → Shared Contracts: uses wire contracts
backend/src/orchestrator/server/app.py - Server Runtime → Usage Metering: meters attempts
README.md - Server Runtime → Job Supervisor: wakes job monitors
README.md - Job Supervisor → PostgreSQL State: reads and updates jobs
backend/src/orchestrator/supervisor/service.py - Fleet Assistant → PostgreSQL State: inspects and changes tasks
README.md - Server Runtime → Fleet Assistant: serves chat
backend/src/orchestrator/server/app.py - Python Worker → Hosted Services: hosts uploaded servers
README.md