openalice-spatial
[Atlas card](https://atlas.blal.pro/repos/openalice-spatial)
Architecture rating
Strong doc scaffolding: valid manifest with NANO-PATH summary, AGENTS.md, ROADMAP.md, docs/ dir, 19 declared features; dragged down by 111 missing docstrings across codebase and README that merely links to Atlas card with no local onboarding content.
Zero circular deps and dead imports, valid manifest, AGENTS.md, conventional docker-compose layout; undermined by 9 god modules, 3 duplicate signatures, max cyclomatic complexity 36, and env-drift (2 undeclared vars in use).
Health probe live at /health (200, 100% 24h uptime) and job-queue pull/push pattern shows some design intent, but 8 broad excepts swallow failures; no evidence of graceful SIGTERM shutdown, timeouts, retries, or idempotency keys on job submission.
Health endpoint is the sole positive signal; 35 console statements indicate printf-debugging over structured logging; RUST_LOG declared but unused (env drift) means Rust tracing not wired; no metrics, spans, or alerting evidence.
No evidence of authn/authz on any endpoint; worker pull/push routes appear unauthenticated; 8 bare/broad excepts can swallow security-relevant errors; env drift (DOMAIN, MODEL_PATH undeclared) suggests ad-hoc secret handling; no rate-limit or security-header signals found.
Owns 3 tables (jobs, worlds, images) per manifest but no migrations directory visible in repo structure; no evidence of FK constraints, RLS, tenant isolation, or GDPR tooling; schema governance entirely unknown.
No test directory visible in repo tree; inspector reports no test count; CI workflow passes but likely build-only — zero evidence of unit, integration, or regression tests for a pipeline with image ingestion + GPU worker coordination.
source · auto-grader-2026-06-18
Ecosystem manifest
.atlas-deps.yml3D world generation service — NANO-PATH architecture: Gemini multi-view images → AnySplat Gaussian Splatting → PLY/GLTF for WebGPU rendering.
- PORT
- SPATIAL_WORK_DIR
- RUST_LOG
- VIEW_API_URL
- VIEW_API_KEY
- GPU_WORKER_PULL
- GPU_WORKER_URL
- RUNPOD_ENDPOINT_URL
- RUNPOD_ENDPOINT_ID
- RUNPOD_API_KEY
- RUNPOD_BASE_URL
- ANYSPLAT_DOCKER_IMAGE
- GEMINI_API_KEY
- GEMINI_API_URL
- GEMINI_MODEL
- DIFFSPLAT_MODEL
- DIFFSPLAT_MODE
- DIFFSPLAT_RUNPOD_ENDPOINT
- DIFFSPLAT_RUNPOD_KEY
- docker_image: openalice-spatial
- http_endpoint: POST /v1/generate — submit text/image → 3D world job
- http_endpoint: GET /v1/jobs/:id — poll job status
- http_endpoint: GET /v1/worlds/:id — download PLY/GLTF
- http_endpoint: GET /v1/worker/pull — GPU worker long-poll queue
- http_endpoint: POST /v1/worker/push — GPU worker result delivery
- npm_package: @openalice/spatial-viewer — React 19 + Three.js + SparkJS Gaussian-splat .ply viewer (orbit/walk/fly camera)
- npm_package: @openalice/spatial-editor — React 19 3D world editor built on @openalice/spatial-viewer (zustand+immer state, object list, property panels, AI generate panel)
- jobs
- worlds
- images
Atlas grepped the repo's source for env reads (rust env::var · ts process.env · py os.environ · shell $VAR) and diffed against the manifest's consumes_env. Two lists below: stale declarations and undeclared reads.
- DOMAIN
- MODEL_PATH
- PORT
- RUST_LOG
Roadmap · what's planned next
- diffsplat-pipelineplanned5%Wire the DiffSplat alternative pipeline (DIFFSPLAT_* env block) so callers can A/B AnySplat vs DiffSplat output quality on the same input prompt.
- world-share-cdnplanned3%Push finished .ply / .gltf worlds to a CDN bucket instead of streaming via /v1/worlds/:id so large scenes don't hold an axum task open for the full download.
- nano-path-anysplatdone100%Ship the NANO-PATH pipeline: Gemini multi-view image generation → AnySplat Gaussian Splatting → PLY/GLTF output consumable by WebGPU renderers.
- gpu-worker-pull-modedone100%Support PULL-mode GPU workers polling /v1/worker/pull so on-prem operators can attach their own RTX boxes alongside RunPod serverless endpoints.
Code composition
tokei · loc- Rust50.0%
- TSX18.6%
- TypeScript12.5%
- Python11.3%
- Batch2.7%
- Other5.0%
- Rust50.0%
- TSX18.6%
- TypeScript12.5%
- Python11.3%
- Batch2.7%
- Other5.0%
- Rust50.0%· 2,168
- TSX18.6%· 805
- TypeScript12.5%· 541
- Python11.3%· 490
- Batch2.7%· 116
- JSON2.0%· 87
- YAML1.5%· 65
- Shell0.7%· 31
- +2 more0.7%· 32 · 2 files
| Language | % code | code | comments | blanks | files |
|---|---|---|---|---|---|
| Rust | 50.0% | 2,168 | 87 | 284 | 9 |
| TSX | 18.6% | 805 | 107 | 88 | 8 |
| TypeScript | 12.5% | 541 | 121 | 81 | 9 |
| Python | 11.3% | 490 | 26 | 129 | 5 |
| Batch | 2.7% | 116 | 7 | 23 | 3 |
| JSON | 2.0% | 87 | 0 | 0 | 5 |
| YAML | 1.5% | 65 | 13 | 4 | 3 |
| Shell | 0.7% | 31 | 2 | 7 | 1 |
| TOML | 0.4% | 18 | 4 | 4 | 1 |
| Dockerfile | 0.3% | 14 | 2 | 2 | 1 |
| Markdown | 0.0% | 0 | 619 | 147 | 7 |
| Plain Text | 0.0% | 0 | 21 | 0 | 1 |
Telemetry ribbon · last 90 days
5 eventsplatform/spatial
13 features- platform.spatial.editorpackages/spatial-editor/src/SpatialEditor.tsx:1Three-panel layout: object list/library (left), 3D viewer with toolbar (center), properties inspector (right), AI generate panel (bottom). Auto-saves every 30 s by default. Undo/redo history stack managed by useEditorStore. Loads/saves world state via spatial API.
- platform.spatial.editor.generated-objectpackages/spatial-editor/src/hooks/useGeneratedObject.ts:2(GET /v1/jobs/:id) after GeneratePanel submits, surfaces live progress/status, and on `completed` loads the resulting GLTF/PLY into the scene by adding a PlacedObject whose sourceId is the job's result_url. Mirrors the spatial-viewer useSplatLoader poll cadence. Polling logic is split into a pure `pollGeneratedObject` so it is testable without a DOM.
- platform.spatial.editor.generated-object.testpackages/spatial-editor/src/hooks/useGeneratedObject.test.ts:2loads the GLTF/PLY result into the scene (PlacedObject from result_url) on completion, handles failure / completed-without-url / transient errors, respects the poll budget, and aborts cleanly. Runs under `node --test` (Node 22 strips types) — no DOM/vitest needed.
- platform.spatial.editor.generate-panelpackages/spatial-editor/src/components/GeneratePanel.tsx:2accepts a text prompt, quality preset (1k/2k/4k), and object vs world mode; calls Spatial API to submit a generation job and returns the job ID for polling progress.
- platform.spatial.editor.object-panelpackages/spatial-editor/src/components/ObjectPanel.tsx:2the Spatial API library and placed objects in the current scene; supports add, duplicate, and remove operations through the editor store.
- platform.spatial.editor.properties-panelpackages/spatial-editor/src/components/PropertiesPanel.tsx:2(position/rotation/scale), material, and metadata of the currently selected 3D object; writes updates through editor store with undo/redo support.
- platform.spatial.editor.storepackages/spatial-editor/src/hooks/useEditorStore.ts:2placed objects, camera presets, lighting config, dirty flag, and undo/redo history stack; single source of truth for all SpatialEditor panel components.
- platform.spatial.editor.toolbarpackages/spatial-editor/src/components/EditorToolbar.tsx:2/delete/camera); highlights active tool from editor store; keyboard shortcut labels (V/G/R/S).
- platform.spatial.hooks.navigationpackages/spatial-viewer/src/hooks/useNavigation.ts:2supports 'orbit', 'fly', and 'walk' modes; dispatches custom DOM events consumed by the Three.js render loop so React state never bottlenecks 60 fps.
- platform.spatial.hooks.splat-loaderpackages/spatial-viewer/src/hooks/useSplatLoader.ts:2.splat) file from a world ID via the Spatial API or direct URL; tracks loading progress (0-100%) and exposes error state; cancels in-flight fetch on unmount.
- platform.spatial.viewerpackages/spatial-viewer/src/SpatialViewer.tsx:1Renders .ply splat files loaded from a worldId API URL or a direct splatUrl prop. Camera modes: orbit (default), walk, fly. Quality: auto/low/medium/high. Whitelabel-ready via `branding` prop (custom logo, hideWatermark). FPS counter optional. Used in the platform dashboard and exportable for licensees (e.g. ImmoClip virtual tours).
- platform.spatial.viewer.controlspackages/spatial-viewer/src/SpatialControls.tsx:2walk) with reset-camera and screenshot buttons; designed to sit in the corner of the canvas without blocking the splat view.
- platform.spatial.viewer.toolbarpackages/spatial-viewer/src/SpatialToolbar.tsx:2screenshot, and stats-overlay toggle buttons; composable into any SpatialViewer instance; color-customizable for theme matching.
spatial/generate
2 features- spatial.generate.objectsrc/main.rs:659Shortcut endpoint to generate a single 3D object (mode=object) with prompt or image.api:POST /v1/objectssince 0.1.0
- spatial.generate.worldsrc/main.rs:257Submit text or image prompt to generate a 3D world via NANO-PATH (multi-view → Gaussian Splat).api:POST /v1/generatesince 0.1.0
spatial/jobs
1 feature- spatial.jobs.statussrc/main.rs:457Poll a generation job's status (Queued/Generating/Fitting/Completed/Failed) with progress.api:GET /v1/jobs/:idsince 0.1.0
spatial/worker
1 feature- spatial.worker.pullsrc/main.rs:739GPU worker long-polls the queue (≤30s) for a pending DiffSplat/MV3D task.api:GET /v1/worker/pullsince 0.1.0
spatial/world
2 features- spatial.world.downloadsrc/main.rs:484Download a generated 3D world (PLY/GLTF) for client-side WebGPU rendering.api:GET /v1/worlds/:idsince 0.1.0
- spatial.world.save-statesrc/main.rs:576Persist a composed world state (objects, camera presets, lighting) to disk by world_id.api:POST /v1/worlds/:id/statesince 0.1.0