|
1 | 1 | # NodeDB Studio |
2 | 2 |
|
3 | | -**GUI client for [NodeDB](https://github.com/NodeDB-Lab/nodedb).** Query editor, data browser, and administration -- built with Dioxus for desktop and web. |
| 3 | +**Desktop GUI client for [NodeDB](https://github.com/NodeDB-Lab/nodedb)** — a single-engine, |
| 4 | +multi-modal database. Built with Dioxus + Rust. Studio is the visual surface for one NodeDB |
| 5 | +instance, which exposes eight internal **storage modes** (Document, Strict, Vector, Graph, |
| 6 | +Timeseries, KV, Spatial, FTS) — not separate engines. Studio renders a purpose-built UI per mode |
| 7 | +within one connection. |
4 | 8 |
|
5 | | -## Features (Planned) |
| 9 | +## Status: UI skeleton |
6 | 10 |
|
7 | | -- **Query editor** -- SQL editor with syntax highlighting, auto-complete, and query history |
8 | | -- **Data browser** -- Browse, filter, and edit documents, vectors, graph nodes, timeseries, and KV pairs |
9 | | -- **Graph explorer** -- Interactive visualization of graph relationships and traversal results |
10 | | -- **Vector space viewer** -- 2D/3D projection of vector collections with cluster visualization |
11 | | -- **Collection management** -- Create, alter, drop, and inspect collections across all engines |
12 | | -- **Real-time monitor** -- Live metrics, active queries, CDC streams, and resource usage |
13 | | -- **Sync dashboard** -- CRDT sync status, pending deltas, conflict resolution, device overview |
14 | | -- **Multi-connection** -- Connect to multiple NodeDB instances and switch between them |
| 11 | +This repository is currently a **production-quality UI skeleton**: real Dioxus components, |
| 12 | +routing, signal/context state, a faithful CSS port of the design, typed models, and hardcoded |
| 13 | +mock data wired into the full interactive flow. There is **no network/database I/O yet** — every |
| 14 | +backend touchpoint is a typed stub behind the `ConnectionService` seam (see below). |
15 | 15 |
|
16 | | -## Install |
| 16 | +Implemented: |
17 | 17 |
|
18 | | -```bash |
19 | | -cargo install nodedb-studio |
20 | | -``` |
| 18 | +- Connection Manager → studio shell two-state flow |
| 19 | +- Capability-driven rail and Admin sub-tabs (hide per the active connection's `Capabilities`) |
| 20 | +- Engine-aware Explorer (collection click swaps the per-storage-mode viewer) |
| 21 | +- Connection / database / notification / avatar popovers; per-connection identity |
| 22 | +- Command palette (⌘K), Preferences (⌘,), Disconnect (⌘D), Esc — pure Rust, no JS interop |
| 23 | +- Streams lateral nav, Admin sub-tabs with cluster gating, and all Phase-6 standalone views |
| 24 | +- New-connection and Preferences modals |
| 25 | +- Light/dark theme follows the OS |
| 26 | + |
| 27 | +Heavy widgets (graph/chart/map renderers, code editor) are intentionally static SVG / `<pre>` / |
| 28 | +`<textarea>` placeholders — the production library for each is a `// TODO` decision, not made here. |
21 | 29 |
|
22 | | -Pre-built binaries for Linux, macOS, and Windows will be available on the [releases page](https://github.com/NodeDB-Lab/nodedb-studio/releases). |
| 30 | +## Building & running |
23 | 31 |
|
24 | | -## Building from Source |
| 32 | +This is a Cargo workspace; the app is the `nodedb-studio` member crate. |
25 | 33 |
|
26 | 34 | ```bash |
27 | | -git clone https://github.com/NodeDB-Lab/nodedb-studio.git |
28 | | -cd nodedb-studio |
29 | | -cargo build --release |
| 35 | +cargo run -p nodedb-studio # opens the desktop window (1440x900) |
| 36 | +cargo build --release # binary at target/release/nodedb-studio |
30 | 37 | ``` |
31 | 38 |
|
32 | | -The binary is at `target/release/nodedb-studio`. |
| 39 | +### Local NodeDB dependency |
33 | 40 |
|
34 | | -For local development against the NodeDB workspace, create `.cargo/config.toml`: |
| 41 | +The crate depends on `nodedb-client` / `nodedb-types`. The published `0.0.0` crates are broken |
| 42 | +placeholders, so the workspace points these at a **local NodeDB checkout** via path deps in the |
| 43 | +root `Cargo.toml`: |
35 | 44 |
|
36 | 45 | ```toml |
37 | | -[patch.crates-io] |
38 | 46 | nodedb-client = { path = "../nodedb/nodedb-client" } |
39 | | -nodedb-types = { path = "../nodedb/nodedb-types" } |
| 47 | +nodedb-types = { path = "../nodedb/nodedb-types" } |
| 48 | +``` |
| 49 | + |
| 50 | +Adjust those paths if your NodeDB checkout lives elsewhere. (The skeleton does not yet import these |
| 51 | +crates — they compile as dependencies only.) |
| 52 | + |
| 53 | +## Project structure |
| 54 | + |
| 55 | +``` |
| 56 | +nodedb-studio/ workspace root |
| 57 | +└── nodedb-studio/ the app crate |
| 58 | + ├── assets/styles.css CSS ported verbatim from the design (tokens + classes) |
| 59 | + └── src/ |
| 60 | + ├── main.rs desktop launch + window config |
| 61 | + ├── app.rs root: context providers + two-state machine |
| 62 | + ├── routes.rs studio Route enum + StudioLayout (chrome + Outlet) |
| 63 | + ├── state/ live UI state (signals): connection, registry, |
| 64 | + │ notifications, preferences, ui (popover/modal kinds) |
| 65 | + ├── models/ typed data: StorageMode + Collection, Notification |
| 66 | + ├── data/mock.rs ALL hardcoded mock data, in one place |
| 67 | + ├── services/ ConnectionService trait + MockConnectionService |
| 68 | + ├── components/ shell chrome: rail, topbar, statusbar, command_palette, |
| 69 | + │ modal, snav, subnav, popovers/ |
| 70 | + ├── modals/ new_connection + preferences bodies + ModalHost |
| 71 | + └── views/ one screen per rail destination |
| 72 | + ├── connection_manager.rs, studio_shell.rs |
| 73 | + ├── explorer/ sidebar + viewers/ (one per storage mode) |
| 74 | + ├── streams/ landing + cdc/mv/topics/notify/cron |
| 75 | + ├── admin/ cluster/shards/nodes/raft/rbac/rls/audit |
| 76 | + └── query, designer, graph_explorer/, vector_space, sync, |
| 77 | + console, timeseries_dashboard, spatial_view, fts_inspector |
40 | 78 | ``` |
41 | 79 |
|
42 | | -## Status |
| 80 | +## Where the backend plugs in |
| 81 | + |
| 82 | +Everything the UI needs from the outside world goes through one trait: |
| 83 | + |
| 84 | +`src/services/connection_service.rs` — `ConnectionService` (`list_connections`, `notifications`, |
| 85 | +`connect`). Today the only implementor is `MockConnectionService`, reading `src/data/mock.rs`. It |
| 86 | +is provided as `Rc<dyn ConnectionService>` via context in `app.rs`, so a real NodeDB-client-backed |
| 87 | +implementor is a one-line swap. **Async** (`use_resource`) is introduced at this boundary when the |
| 88 | +real client lands — not sprinkled through the views. |
43 | 89 |
|
44 | | -Early development. Not yet usable. |
| 90 | +When richer per-database data is needed (e.g. an Explorer that lists a database's collections), add |
| 91 | +the model under `src/models/` and surface it through `ConnectionService`. |
45 | 92 |
|
46 | 93 | ## License |
47 | 94 |
|
|
0 commit comments