You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AimDB turns data contracts into the architecture. Define your schemas once and deploy them unchanged across microcontrollers, edge gateways, Kubernetes and the browser.
26
26
27
-
---
28
-
29
-
### Vision
27
+
[](https://aimdb.dev)
30
28
31
-
A future where every system, from a $2 sensor to a global fleet, shares one data language. Contracts define how data flows, evolves and how it is observed. Infrastructure adapts to data, not the other way around.
29
+
> **[See it running →](https://aimdb.dev)** Live weather stations streaming typed contracts across MCU, edge and cloud.
32
30
33
31
---
34
32
35
-
### Design Philosophy
36
-
37
-
In a data-driven architecture, every design decision starts with the data, not the service that produces it.
38
-
39
-
**Records declare their own semantics.** When you register a record in AimDB, you choose a buffer type that defines how the data moves:
These are the three universal primitives of data movement — portable, typed and runtime-agnostic.
33
+
## Why AimDB exists
48
34
49
-
**Observability becomes automatic.** A record that exists is observable by definition. Every producer and consumer relationship is declared in the builder, not discovered through instrumentation.
35
+
Most distributed systems layer observability, sync and schema management on top. AimDB builds them into the data model itself.
50
36
51
-
**Synchronization becomes declarative.** You don't build a sync layer between your MCU, edge gateway and cloud backend. You declare a record with connector metadata on its key and the same typed data flows across all environments without translation.
37
+
-**No glue code between layers** — the buffer type on a record defines how it moves. No manual queue wiring.
38
+
-**Every record is observable by default** — no separate metrics layer to wire up.
39
+
-**Sync is part of the schema, not a service** — declare a connector on the key, not as a separate process.
40
+
-**Schema evolution, serialization and connectors derive from the type** — add a trait, not a dependency.
52
41
53
-
**Cross-cutting concerns derive from the schema.** Instead of adding observability libraries, feature flag SDKs and experiment frameworks as separate integrations, they become intrinsic properties of records — declared once, applied everywhere.
42
+
→ [The Next Era of Software Architecture Is Data-First](https://aimdb.dev/blog/data-driven-design)
54
43
55
44
---
56
45
57
-
### How It Works
46
+
##Quick start
58
47
59
-
Define your contracts, choose buffer semantics and wire up connectors — all in one builder block:
48
+
### Run it locally in 5 min
60
49
61
-
```rust
62
-
// A sensor node: produce temperature readings, publish over MQTT
.tap(log_tap::<Temperature>("edge")) // [edge] 22.5 °C
83
-
.finish();
84
-
});
50
+
```bash
51
+
cargo new my-aimdb-app &&cd my-aimdb-app
52
+
cargo add aimdb-core aimdb-tokio-adapter tokio --features tokio/full
85
53
```
86
54
87
-
Transport topics can be passed as strings to `link_to` / `link_from`, or declared on key enums with `#[link_address = "mqtt://..."]` and resolved at runtime. No separate instrumentation. No SDK integration. No sync code.
88
-
89
-
---
90
-
91
-
### Data Contracts
92
-
93
-
Data contracts are the heart of AimDB. A contract is a plain Rust struct that carries its own identity, version and capabilities — the single source of truth from sensor firmware to browser UI.
This struct compiles for `no_std` embedded targets and standard Rust alike. `SchemaType` gives the record its identity and version. `Settable` provides a canonical constructor so producers can create records from a raw value — this is the interface used by `producer.send(Temperature::set(reading, now()))` in the builder.
94
+
`cargo run` — three temperature readings stream through a typed pipeline. The same code compiles for Embassy on a Cortex-M4 or WASM in the browser by swapping the runtime adapter — nothing else changes.
119
95
120
-
#### Contract Attributes
96
+
###Run a real weather mesh in less than 30 min
121
97
122
-
Contracts gain capabilities through trait implementations. Each trait is a compile-time declaration of what a contract *can do*, not a runtime configuration:
98
+
A full MCU → edge → cloud mesh: three weather stations, MQTT broker and a central hub.
123
99
124
-
| Attribute | Trait | What It Enables |
125
-
|-----------|-------|-----------------|
126
-
|**Settable**|`Settable`| Canonical constructor from a raw value — the interface behind `producer.send(T::set(value, ts))`. |
127
-
|**Streamable**|`Streamable`| Cross-boundary transport — WASM, WebSocket, CLI. One registry, zero parallel type systems. |
128
-
|**Migratable**|`MigrationStep`| Bidirectional schema evolution with typed up/down transforms and chained version steps. |
129
-
|**Observable**|`Observable`| Signal extraction for thresholds, logging and monitoring. Icon, unit and `format_log()` built in. |
130
-
|**Linkable**|`Linkable`| Wire-format serialization for connectors — MQTT, KNX and any future transport. |
131
-
|**Simulatable**|`Simulatable`| Realistic test data generation with random walks, trends and configurable parameters. |
100
+
```bash
101
+
git clone https://github.com/aimdb-dev/aimdb
102
+
cd aimdb/examples/weather-mesh-demo
103
+
docker compose up
104
+
```
132
105
133
-
For example, `Observable` turns a contract into a loggable, monitorable signal:
106
+
→ [Walkthrough in the docs](https://aimdb.dev/docs/getting-started)
134
107
135
-
```rust
136
-
implObservableforTemperature {
137
-
typeSignal=f32;
138
-
constICON:&'staticstr="thermometer";
139
-
constUNIT:&'staticstr="°C";
108
+
---
140
109
141
-
fnsignal(&self) ->f32 { self.celsius }
110
+
## What you get
142
111
143
-
fnformat_log(&self, node_id:&str) ->String {
144
-
format!("[{}] {:.1} °C", node_id, self.celsius)
145
-
}
146
-
}
147
-
```
112
+
-**One async API across MCU, edge, cloud and browser.** Tokio, Embassy, WASM — same code, different runtime adapter. → [How the runtime abstraction works](https://aimdb.dev/blog/building-aimdb-one-async-api)
113
+
-**Typed Rust structs are the schema.** No IDL, no codegen step, no schema registry.
114
+
-**Three buffer primitives** that cover most data-movement patterns:
-**Capabilities are unlocked by traits.** Implement `Streamable` to cross WASM/WebSocket/CLI boundaries, `Migratable` for typed schema evolution, `Observable` for monitoring, `Linkable` for wire-format connectors. Without the trait, the type system says no.
123
+
-**Connectors that ship today:** MQTT, KNX, WebSocket. Writing your own is one trait impl.
148
124
149
-
Each trait you implement unlocks a capability — contracts without `Observable` simply can't be tapped; contracts without `Linkable` can't be wired to connectors. The type system enforces what your data can do.
Connect an MCP-compatible editor to the live demo and query your data in natural language — no install required:
186
-
187
-
<palign="center">
188
-
<imgsrc="assets/copilot-communication.gif"alt="AimDB MCP Live Demo"width="600">
189
-
</p>
190
-
191
-
Add the remote MCP server to your workspace:
153
+
Try it against the live demo — no install required. Add this to your workspace:
192
154
193
155
`.vscode/mcp.json`:
194
156
@@ -203,27 +165,18 @@ Add the remote MCP server to your workspace:
203
165
}
204
166
```
205
167
206
-
Then ask: *"What's the current temperature in Munich?"* — see the [MCP server docs](tools/aimdb-mcp/) for Claude Desktop and other editors.
207
-
208
-
#### 3. Run locally
168
+
Then ask: *"What's the current temperature in Munich?"*
209
169
210
-
Spin up a full MCU → edge → cloud mesh with one command:
170
+
See the [MCP server docs](tools/aimdb-mcp/) for Claude Desktop and other editors or read the deep dive: [AI-Assisted System Introspection: AimDB Meets the Model Context Protocol](https://aimdb.dev/blog/ai-introspection-with-mcp).
211
171
212
-
```bash
213
-
cd examples/weather-mesh-demo
214
-
docker compose up
215
-
```
216
-
217
-
This starts three weather stations, an MQTT broker and a central hub — all wired together with typed data contracts.
172
+
---
218
173
219
-
#### 4. Build your own
174
+
##Learn more
220
175
221
-
-[Quick Start Guide](https://aimdb.dev/docs/getting-started) — Dependencies, platform setup and your first contract
222
-
-[Data Contracts](https://aimdb.dev/docs/data-contracts) — Type-safe schemas with built-in capabilities
223
-
-[Connectors](https://aimdb.dev/docs/connectors) — MQTT, KNX, WebSocket and more
224
-
-[Deployment](https://aimdb.dev/docs/deployment) — Running on MCU, edge, cloud and browser
225
-
-[API Reference](https://docs.rs/aimdb-core) — Full Rust API documentation
226
-
-[Blog](https://aimdb.dev/blog) — News, tutorials and insights from the AimDB team
176
+
-[Quick Start Guide](https://aimdb.dev/docs/getting-started) — dependencies, platform setup, your first contract
177
+
-[API reference (docs.rs)](https://docs.rs/aimdb-core) — full Rust API
178
+
-[Blog](https://aimdb.dev/blog) — design notes, deep dives, release write-ups
0 commit comments