How banrod/unit works
Unit is a visual programming language and web environment: users compose programs as graphs of multi-input/multi-output units, then run them in a system and inspect or render results. The core runtime is centered on Graph, Unit, Pin, and System; specs represent and parse programs, while the client environment provides interaction and rendering. The README documents booting a system and instantiating a bundle, and the sampled storage primitive shows a platform API backed by browser storage. Some environment and integration links are documented only at a high level; unsampled implementation details are not inferred.
Main entry points: Graph/index.ts Graph execution · system.ts System context · boot/index.ts System boot · parser.ts Spec parser
Components 18
Visual authoring
- Visual environment
src/client/component.ts - Graph editor
src/client/graph.ts
Language and specs
- Spec parser
src/spec/parser.ts - Graph specs
src/types/GraphSpec.ts - Spec evaluation
src/spec/evaluateDataValue.ts - Unit library
src/system/f
Graph runtime
- System boot
src/boot/index.ts - System context
src/system.ts - Graph execution
src/Class/Graph/index.ts - Unit FSM
src/Class/Unit/index.ts - MIMO pins
src/Pin.ts
Client and platform
- Client rendering
src/client/render/index.ts - Browser APIs
src/API.ts
System services
- Storage unit
src/system/platform/api/storage/Storage_.ts - Browser storage
src/client/util/storage.ts - Remote client
src/RemoteClient.ts - Runtime inspection
src/debug/index.ts
Other components
- Programmer
Connections 17
- Programmer → Visual environment: composes programs
- Visual environment → Graph editor: edits graphs
- Graph editor → Graph specs: expresses graph specs
- Spec parser → Graph specs: parses specs
- Spec parser → Unit library: resolves unit values
src/spec/parser.ts - Programmer → System boot: boots and instantiates
- System boot → System context: creates context
src/boot/index.ts - System boot → Graph execution: starts bundle
src/boot/index.ts - System context → Graph execution: provides runtime context
src/system.ts - Graph execution → Unit FSM: manages units
src/Class/Graph/index.ts - Unit FSM → MIMO pins: maintains input and output pins
src/Class/Unit/index.ts - Programmer → Client rendering: renders bundles
- Client rendering → Graph execution: returns running graph
- System context → Browser APIs: exposes APIs
src/system.ts - Storage unit → Browser storage: reads and writes
src/system/platform/api/storage/Storage_.ts - Remote client → System context: uses remote system
- Runtime inspection → Graph execution: watches graph
src/debug/index.ts