Skip to content

Commit 41f14d0

Browse files
docs: Phase 6 — README for the skeleton; drop unused Database model
README documents run instructions (workspace + local NodeDB path dep), project structure, and the ConnectionService backend seam. Removed the unused Database model (no-dead-code); per-database collection models plug in via models/ + ConnectionService when needed. Build is warning-clean (only a transitive future-incompat from a Dioxus macOS dep). added specs
1 parent 475eced commit 41f14d0

4 files changed

Lines changed: 73 additions & 41 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,5 @@ dmypy.json
105105

106106
# Local reference only — not tracked
107107
docs/nodedb_lab_studio_mockup_v4.html
108+
specs/*
108109
.DS_Store

README.md

Lines changed: 72 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,94 @@
11
# NodeDB Studio
22

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.
48

5-
## Features (Planned)
9+
## Status: UI skeleton
610

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).
1515

16-
## Install
16+
Implemented:
1717

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.
2129

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
2331

24-
## Building from Source
32+
This is a Cargo workspace; the app is the `nodedb-studio` member crate.
2533

2634
```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
3037
```
3138

32-
The binary is at `target/release/nodedb-studio`.
39+
### Local NodeDB dependency
3340

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`:
3544

3645
```toml
37-
[patch.crates-io]
3846
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
4078
```
4179

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.
4389

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`.
4592

4693
## License
4794

nodedb-studio/src/models/database.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

nodedb-studio/src/models/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
//! databases, notifications); live UI state lives in `crate::state`.
33
44
pub mod collection;
5-
pub mod database;
65
pub mod notification;

0 commit comments

Comments
 (0)