commune-os / weird

Weird web pages
https://weird.one
Other
12 stars 6 forks source link

Create Graph Data Explorer CLI Tool #51

Open zicklag opened 2 weeks ago

zicklag commented 2 weeks ago

Right now it's tricky to see what data is in our database, since we use a custom graph format, so we should have a CLI tool that can be used to explore, edit, and export our graph data.

This is kind of a necessity at this point for debugging purposes. We can do a simple CLI interface using ratatui.

zicklag commented 2 weeks ago

Now that we have improved the graph format to be more intuitive and inspectable, we can wait for a full-on data explorer. I'm moving this towards a later step, and a more immediately useful feature would be a way to export the graph database to YAML, which will satisfy the need for seeing into the database as well as be useful for backups.

gold-silver-copper commented 1 week ago

This library could perhaps be useful for prior art, although it doesn't seem too complete at the moment?

https://crates.io/crates/tui-nodes/0.4.0

gold-silver-copper commented 1 week ago

Would be a good idea to create a mock up of what we would want the explorer to look like, and document the features we would want for it.

gold-silver-copper commented 1 week ago

Is it being a CLI tool a hard requirement? egui has really good graph widgets, that may be more clear and usable for a really large database:

https://github.com/blitzarx1/egui_graphs

zicklag commented 1 week ago

Is it being a CLI tool a hard requirement?

Yeah, I think we want to start with a terminal UI because one major use-case would be debugging the production database on a remote server over SSH.

Having an Egui UI would be awesome, too, but terminal is the higher priority.


Would be a good idea to create a mock up of what we would want the explorer to look like, and document the features we would want for it.

Definitely, here are my thoughts on it so far:

It might also be good to have a "raw" browser mode where it just lists every key on the left, and the value of the selected key on the right.

Here's the really raw work-in-progress view of what is currently in the repo:

image


So we don't really need like a connected graph view for the database. We want something almost more like a "wiki page browser", where I can just kind of walk through the structure of the graph.