ThanhHuyen8x / devhub-gui

A web-based UI that works with Holochain's collection of DevHub DNAs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DevHub GUI

A web-based UI that works with Holochain's collection of DevHub DNAs.

Beta User Testing

This project has completed single conductor multi-agent testing. It is now ready for multi-conductor multi-agent testing using real-world networking.

Testing Setup

Clone repo

git clone git@github.com:holochain/devhub-gui.git --branch develop
cd devhub-gui

Enter nix shell for Holochain and Lair binaries

nix-shell

Run Holochain

[nix-shell:devhub-gui]$ npm i
[nix-shell:devhub-gui]$ make run-holochain

The required DNAs must be downloaded into the ./dnas/ directory.

[nix-shell:devhub-gui]$ ls -l ./dnas
total 3576
-rw-r--r-- 1 user group 1755087 Aug 24 18:03 dnarepo.dna
-rw-r--r-- 1 user group 1056049 Aug 24 18:03 happs.dna
-rw-r--r-- 1 user group  846196 Aug 24 18:03 webassets.dna

Run all administrative calls to setup DNAs, Agent, and App.

[nix-shell:devhub-gui]$ make setup

View the created agent pubkey

[nix-shell:devhub-gui]$ cat ./tests/AGENT
uhCAkQ1xBkDZwHKD05MKrLaIJQDvJG_RwlDbKNfMbEoqwDvrqs5Wx

Build GUI assets

[nix-shell:devhub-gui]$ make dist

Run any simple HTTP server from the dist directory.

Example

cd dist; python3 -m http.server 8888

Browser console commands

Set the agent pubkey that was created during make setup.

// Example - you must replace this Agent pubkey with the one in ./tests/AGENT
localStorage.setItem( "AGENT_PUBKEY", "uhCAkQ1xBkDZwHKD05MKrLaIJQDvJG_RwlDbKNfMbEoqwDvrqs5Wx" );

Optional settings

If you change the app port in ./tests/setup.js, override the default port with APP_PORT

localStorage.setItem( "APP_PORT", 44001 );

If you follow the CONTRIBUTING.md instructions for setting up an SPA for push state, you can set the app host with APP_HOST.

localStorage.setItem( "APP_HOST", "devhub.holochain.org" );
localStorage.setItem( "PUSH_STATE", "true" );

Turn on logging

localStorage.setItem( "LOG_LEVEL", "trace" );
// trace, debug, info, normal, warn, error, fatal

Reset Environment

This will reset the environment by removing the Holochain databases & configuration, Lair databases, and saved hash files.

make reset-holochain

Contributing

See CONTRIBUTING.md

About

A web-based UI that works with Holochain's collection of DevHub DNAs.


Languages

Language:JavaScript 56.7%Language:HTML 41.2%Language:Makefile 1.5%Language:CSS 0.5%Language:Nix 0.2%