How nukehub-dev/nukelab works
NukeLab is a multi-user scientific-computing platform: users navigate the React application, authenticate and manage servers through the FastAPI API, and receive containerized environments subject to permissions, plans, quotas, and credit billing. Background workers support lifecycle operations, scheduling, metrics, and crash recovery; PostgreSQL and Redis provide persistent and operational state. The README documents these major capabilities and integrations. Source excerpts are partial, so detailed service-to-service links are omitted where their call paths were not shown.
Main entry points: worker.py Background workers · main.tsx React application · main.py FastAPI application · servers.py Server API
Components 20
User experience
- React application
frontend/src/main.tsx - Server workflows
frontend/src/routes/servers.index.tsx - Admin workflows
frontend/src/routes/admin.index.tsx
API and governance
- FastAPI application
backend/app/main.py - Authentication
backend/app/api/auth.py - Server API
backend/app/api/servers.py - Access control
backend/app/core/permissions.py - Credit billing
backend/app/services/credit_service.py
Compute operations
- Server lifecycle
backend/app/services/server_lifecycle_service.py - Server launch
backend/app/services/server_launch_service.py - Environment registry
backend/app/services/environment_service.py - Container driver
backend/app/container/factory.py - Background workers
backend/app/worker.py - Crash recovery
backend/app/services/operation_reconciler.py
Platform state
- Monitoring
backend/app/services/metrics_collector.py - PostgreSQL
backend/app/db/session.py - Redis
backend/app/core/redis_client.py - Docker or Podman
- Observability stack
Other components
- Platform user
Connections 20
- Platform user → React application: uses
README.md - React application → Server workflows: routes to
frontend/src/main.tsx - React application → Admin workflows: routes to
frontend/src/main.tsx - React application → FastAPI application: sends requests
README.md - FastAPI application → Authentication: registers
backend/app/main.py - FastAPI application → Server API: registers
backend/app/main.py - Authentication → PostgreSQL: queries users
backend/app/api/auth.py - Server API → Server lifecycle: dispatches
- Server API → Access control: checks access
- Server lifecycle → Server launch: manages launches
- Server launch → Environment registry: resolves environment
- Server launch → Container driver: starts containers
- Background workers → PostgreSQL: uses
README.md - Background workers → Redis: uses
README.md - Background workers → Container driver: orchestrates
README.md - Background workers → Crash recovery: runs recovery
backend/app/tasks.py - Background workers → Monitoring: collects metrics
backend/app/tasks.py - FastAPI application → PostgreSQL: uses
README.md - Container driver → Docker or Podman: controls
README.md - Monitoring → Observability stack: exports metrics