dreamstack/docs/generated/codebase-map.md
enzotar b0440e2e47 feat(compiler): v0.4 + v0.5 — CLI modularity, diagnostic pipeline, test suite
v0.4 — CLI Modularity:
- Split monolithic main.rs (2,038 lines) into 8 command modules + slim dispatch (107 lines)
- Add 12 JS codegen tests (signals, derived, views, events, loops, match, enums, components, interpolation, springs, tree-shaking)

v0.5 — Diagnostic Quality + Analyzer Confidence:
- Add From<ParseError> for Diagnostic (E0001) in ds-diagnostic
- Add errors_as_diagnostics() to TypeChecker (E0100–E0110)
- Wire Elm-style diagnostics through dreamstack check and build commands
- Switch incremental compiler to parse_program_resilient() for multi-error collection
- Add 12 analyzer tests (chains, fan-out, diamond deps, empty programs, conditionals, handlers, views)
- Add 2 diagnostic conversion tests

Test suite: 97 → 123 tests (26 new, 0 failures)
2026-03-10 09:09:02 -07:00

119 lines
4.9 KiB
Markdown

# Codebase Map
> Auto-generated by Space Operator Context extension.
> Links are relative — click to navigate to source files.
## Project Structure
- **[bench/](../../bench/)**
- [benches/](../../bench/benches/)
- [Cargo.toml](../../bench/Cargo.toml)
- [src/](../../bench/src/)
- [BITSTREAM_INTEGRATION.md](../../BITSTREAM_INTEGRATION.md)
- [Cargo.lock](../../Cargo.lock)
- [Cargo.toml](../../Cargo.toml)
- [CHANGELOG.md](../../CHANGELOG.md)
- [cliff.toml](../../cliff.toml)
- **[compiler/](../../compiler/)**
- [ds-analyzer/](../../compiler/ds-analyzer/)
- [ds-cli/](../../compiler/ds-cli/)
- [ds-codegen/](../../compiler/ds-codegen/)
- [ds-incremental/](../../compiler/ds-incremental/)
- [ds-layout/](../../compiler/ds-layout/)
- [ds-parser/](../../compiler/ds-parser/)
- [ds-types/](../../compiler/ds-types/)
- **[devices/](../../devices/)**
- [panel-preview/](../../devices/panel-preview/)
- [waveshare-p4-panel/](../../devices/waveshare-p4-panel/)
- **[docs/](../)** — Project documentation
- [explorations.md](../explorations.md)
- [fabric-display-build-guide.md](../fabric-display-build-guide.md)
- [fabric-display-overview.md](../fabric-display-overview.md)
- [generated/](/)
- [integration.md](../integration.md)
- [panel-ir-spec.md](../panel-ir-spec.md)
- [DREAMSTACK.md](../../DREAMSTACK.md)
- **[engine/](../../engine/)**
- [ds-physics/](../../engine/ds-physics/)
- [ds-screencast/](../../engine/ds-screencast/)
- [ds-stream/](../../engine/ds-stream/)
- [ds-stream-wasm/](../../engine/ds-stream-wasm/)
- **[examples/](../../examples/)**
- [beats-viewer.ds](../../examples/beats-viewer.ds)
- [bench-signals.ds](../../examples/bench-signals.ds)
- [benchmarks.html](../../examples/benchmarks.html)
- [builtins.ds](../../examples/builtins.ds)
- [callback-demo.ds](../../examples/callback-demo.ds)
- [component-gallery.ds](../../examples/component-gallery.ds)
- [compose-dashboard.ds](../../examples/compose-dashboard.ds)
- [compose-master.ds](../../examples/compose-master.ds)
- [compose-metrics.ds](../../examples/compose-metrics.ds)
- [compose-search-map.ds](../../examples/compose-search-map.ds)
- [compose-widgets.ds](../../examples/compose-widgets.ds)
- [counter.ds](../../examples/counter.ds)
- [dashboard.ds](../../examples/dashboard.ds)
- [dashboard.html](../../examples/dashboard.html)
- [each-demo.ds](../../examples/each-demo.ds)
- [form.ds](../../examples/form.ds)
- [game-breakout.ds](../../examples/game-breakout.ds)
- [game-pong.ds](../../examples/game-pong.ds)
- [game-pong.html](../../examples/game-pong.html)
- [game-reaction.ds](../../examples/game-reaction.ds)
- [IMPLEMENTATION_PLAN.md](../../IMPLEMENTATION_PLAN.md)
- **[pkg/](../../pkg/)**
- [ds-stream-wasm/](../../pkg/ds-stream-wasm/)
- **[registry/](../../registry/)**
- [components/](../../registry/components/)
- [registry.json](../../registry/registry.json)
- **[scripts/](../../scripts/)**
- [release.sh](../../scripts/release.sh)
- **[sdk/](../../sdk/)**
- [dreamstack-embed.js](../../sdk/dreamstack-embed.js)
- [STREAM_COMPOSITION.md](../../STREAM_COMPOSITION.md)
- [TODO.md](../../TODO.md)
- [USE_CASES.md](../../USE_CASES.md)
## Rust Dependencies (Key Crates)
### Local Crates
| Crate | Path |
|-------|------|
| `ds-parser` | [compiler/ds-parser](../../compiler/ds-parser) |
| `ds-analyzer` | [compiler/ds-analyzer](../../compiler/ds-analyzer) |
| `ds-codegen` | [compiler/ds-codegen](../../compiler/ds-codegen) |
| `ds-layout` | [compiler/ds-layout](../../compiler/ds-layout) |
| `ds-types` | [compiler/ds-types](../../compiler/ds-types) |
| `ds-incremental` | [compiler/ds-incremental](../../compiler/ds-incremental) |
| `ds-physics` | [engine/ds-physics](../../engine/ds-physics) |
| `ds-stream` | [engine/ds-stream](../../engine/ds-stream) |
| `ds-stream-wasm` | [engine/ds-stream-wasm](../../engine/ds-stream-wasm) |
## Tauri Backend Modules
## Frontend (p2p-ui)
React + TypeScript desktop UI built with Tauri.
### Key Pages
| Page | Description |
|------|-------------|
| ConnectionPage | Connect to a remote Space Operator server |
| ProviderPage | Register as a P2P compute provider |
| LocalServerPage | Run an embedded flow backend locally |
| CommandsPage | Browse and test registered flow commands |
| NodeDevPage | Develop and test new nodes |
| KeypairsPage | Manage Solana keypairs |
| DiscoveryPage | P2P network node discovery |
## Flow Backend
The flow engine (git submodule) provides:
- **flow** — Core flow graph execution engine
- **flow-lib** — Shared types: `CommandTrait`, `Value`, `CommandContext`
- **flow-rpc** — Cap'n Proto RPC for distributed node execution
- **cmds-std** — Standard nodes: HTTP, JSON, string ops, storage, KV store
- **cmds-solana** — Solana blockchain nodes: token ops, DeFi, NFT, governance
- **cmds-deno** — JavaScript/TypeScript node runtime via Deno
- **rhai-script** — Rhai scripting language nodes