BRICKS Project is in preview. The API and tooling may change.
Why code?
- Type safety — catch errors at compile time with full TypeScript support
- Version control — track changes with Git, review diffs, and collaborate
- AI-assisted development — work with AI coding agents that can read and write your project files
- Automation — deploy via CLI or CI/CD pipelines like GitHub Actions
Core concepts
A BRICKS application is a tree of composable entities. Here’s how they fit together:Subspaces
A subspace is a self-contained unit of functionality — think of it as a screen or feature module. Each subspace has its own bricks, generators, data, canvases, and animations. The application has arootSubspace as its entry point.
Canvases
A canvas defines a view layout. It positions items (bricks or subspace references) on a grid usingframe coordinates (x, y, width, height). Canvases support lifecycle events (firstEnter, enter, exit) and can switch between each other for navigation.
Bricks
Bricks are the visual building blocks — UI components that display content and handle interaction. Examples include:| Brick | Purpose |
|---|---|
| Text | Display text with styling |
| TextInput | Editable text field |
| Image | Display images |
| Video | Video playback |
| WebView | Embedded web content |
| Lottie / Rive | Vector animations |
| Chart | Data visualizations |
| Icon | FontAwesome 6 Pro icons |
| QrCode | QR code display |
| Camera | Live camera feed |
| Maps | Map display |
| Rect | Container with background, border, shadow |
Generators
Generators handle all external I/O and data processing. They connect your app to APIs, databases, hardware, AI models, and more. Each generator has outlets (output channels) that feed into data, and events that trigger actions. Categories of generators include:| Category | Examples |
|---|---|
| AI & LLM | Assistant, LLM (GGML/OpenAI/Anthropic/ONNX), Vector Store, Reranker |
| Speech | Text-to-Speech, Speech-to-Text, VAD, Realtime Transcription |
| Network | HTTP, WebSocket, GraphQL, MQTT, TCP, UDP, HTTP Server |
| Storage | File, SQLite, Data Bank, Media Flow |
| Hardware | Bluetooth LE, Serial Port, Camera, Keyboard |
| Control flow | Tick (timer), Alarm Clock, Step, Iterator, Watchdog |
| Other | WebRTC, Web Crawler, MCP, Thermal Printer |
Data
Data nodes store application state. They are typed (string, number, boolean, array, object) and can be linked to brick or generator properties for reactive updates. When a generator outlet emits a value, the linked data updates, and any bricks bound to that data re-render automatically.Data calculations
Data calculations are JavaScript functions that transform data. They run in a sandboxed environment with 25+ built-in libraries (lodash, moment, crypto, and more). Use them for formatting, parsing, or computing derived values.Actions and events
Actions are commands triggered by events. Bricks and generators emit events (press, response, error, timer tick), and you wire them to actions like changing a canvas, updating data, triggering a generator, or running an animation.Project structure
A BRICKS project has the following structure:bun compile transforms them into the JSON configuration that the BRICKS runtime executes.
Next steps
Get started
Set up your environment and create your first BRICKS project.