Orbit-db: WebUI to manage OrbitDB and databases

Created on 5 Nov 2017  路  12Comments  路  Source: orbitdb/orbit-db

OrbitDB should have a WebUI app through which OrbitDB instance can be managed.

This would include:

  • Create new databases
  • Query databases
  • Add databases to replicate
  • Network and connection status
  • Display database information, such as: data directory info, keys, size (bytes or entries), replication status, etc.

At the moment, as we don't have a daemon nor http server, this could simply be a browser app where OrbitDB is embedded. Later on, we can serve the WebUI via a daemon or http server and connect to and manage a "backend / server" instance of OrbitDB.

This is a fairly large task but also not hugely complicated and would be a great task for someone looking to contribute in a big and meaningful way! If you want to work on it, comment here.

Medium enhancement help wanted

Most helpful comment

Ah, good news @natachadelarosa! You don't have to start from scratch. Check out: https://github.com/orbitdb/orbit-db-control-center

All 12 comments

Excellent work going on here! it's pretty similar to the work I wanted to get rolling for Code for San Francisco, but never was able to get off the ground.

As for this Web UI, building it out seems like it'd be dependent on a functioning HTTP server for the frontend to interact with (so long as you want the ui and api decoupled, which would make the most sense for this, imo, then it wouldn't matter what you build the frontend in: React, angular, jquery, swift, whatever), so would this be dependent on #233?

Additionally, some additional requirements would need to be defined, like what devices this should be accessible on for the mvp, if there are any framework restrictions, etc. I'd be happy to take a look at helping out with coding in some spare time on the weekend, as well as code reviews during the week.

@therebelrobot thanks for jumping in and sharing your thoughts!

There's not much design for this yet, so I'd be happy with whatever the implementor decides to use here. Couple of personal preferences and thoughts around it:

  • This will be a fairly extensive app (eventually) in terms of the frontend, so using a framework would make sense. I personally like React and would love to use it, but I'd be fine with other well-known frameworks as well. Whatever you're comfortable with.
  • I think we could get an MVP without the HTTP API: OrbitDB can be embedded into a browser app just like any other module. When embedded, the databases get created in the browser's storage just the same as they would on a filesystem (same for IPFS). So what we can do to get started, is to manage databases "local-to-browser". We'd be able to create, modify and replicate the databases between two browsers just as they would between two Nodejs/http-api instances of OrbitDB. Here's an example how OrbitDB can be embedded to a browser app.
  • As you propose @therebelrobot, we should definitely separate the layer that interacts with the http-api or the (embedded) OrbitDB instance. If we start with the embedded OrbitDB instance and separate that, we can later replace db.add("hello") with fetch("http://localhost:37373/add/<database_address>/ and it should work all the same.
  • Platforms: the cool thing about js-ipfs is that it works both in the browser and in Node.js. And with the browser version, we can run it on any OS and platform that has a browser, including mobile devices! :) So if we go with the embedded approach, we would have the MVP running on mobile devices too without any extra effort, which would be really cool imo.

Hope this helps! Let me know if you have more questions, suggestions, ideas or otherwise want to explore further 馃槃

Or if you have the motivation and time to work on this, I'd be more than happy to help you get started and otherwise. #orbitdb on IRC (Freenode) would be the best way to chat in real-time.

Hello, @haadcode @RichardLitt I would like to work on this if you guys approve it!

Awesome! Yeah, we'd love for you to help out. You're already an old hand from your other repo; if you need to ask general questions, Gitter (which it looks like you joined recently?) is probably the best place. :) All systems go.

Thank you @RichardLitt! I'll begin to work based on the message that @haadcode wrote above if I have any question I'll let you know! Thanks!!

@natachadelarosa Did you end up making any progress with this?

@phillmac @RichardLitt I'm so sorry this just fell out completely for me. A lot of things happened, do you mind if I start again on this?

Ah, good news @natachadelarosa! You don't have to start from scratch. Check out: https://github.com/orbitdb/orbit-db-control-center

It's alright, @natachadelarosa! Thanks for following up, regardless. :)

@natachadelarosa Life happens to all of us; I'm certainly no exception. :grin: One of the goals I had in mind was to create a front end for the http api as a sort of control panel, an alternative to running a full node in browser. I've not gotten very far at all with it . One of the intermediate goals was to create a drop in replacement for the orbit-db- package that was 100% compatible, instead backed by the api. I'd still like to have a go at both of these :grin:

Sounds great @phillmac! I'll go with the HTTP API front-end!

Ok so here's the state of things, orbitdb/orbit-db-http-api is quite outdated and has a few silly bugs in it. however it's mostly working. I really need to update it.
phillmac/orbit-db-http-api-dev is my own fork with a lot of non-standard features for debugging / manipulating the base orbit-db instance. On the other hand It's reasonably up to-date
Usually I fix bugs as quickly as I can however its definitely to be considered 'unstable' and I end up completely breaking it on occasion
There's respective docker images here:

https://hub.docker.com/r/orbitdb/orbit-db-http-api

and here:

https://hub.docker.com/r/phillmac/orbit-db-http-api-dev

if they're any use to you.
Here's an example docker-compose.yml:

https://github.com/orbitdb/orbit-db-http-api/issues/26#issuecomment-608962546

Here's an example with external ssl via lets'encrypt, certbot & nginx

https://github.com/phillmac/compose-example-orbit-db-http-api

Please do let me know what I can help with esp. if you run into a bug or something doesn't make sense

Was this page helpful?
0 / 5 - 0 ratings

Related issues

crazyrabbitLTC picture crazyrabbitLTC  路  6Comments

BartKnucle picture BartKnucle  路  4Comments

varcario picture varcario  路  5Comments

maxkerp picture maxkerp  路  6Comments

phillmac picture phillmac  路  4Comments