A modular REA implementation for Holochain
The simplest setup is with Yarn, Docker and Docker Compose.
npm i -g yarn
using the version of node you plan on developing this project against (for recommended, see .nvmrc
). You can setup your modules manually using npm link
if you prefer, but Yarn's workspaces feature will save you a lot of time.If you wish to proceed with setting up a local Go toolchain and running hcdev
locally, feel free to add instructions on this method here.
yarn install
from the root of this repo. This will setup all necessary node_modules
folders and symlinks between repositories kept in this package which depend on each other.npm start
gets you both a webserver pointing to src/ui
and a Holochain 0.0.1 Prototype DHT running for your backend. If you wish to run these commands separately (useful when troubleshooting the DHT code), see the scripts in package.json
prefixed with dev:
.PLEASE NOTE: you will see the error "TypeScript emitted no output for [...]" when running the frontend. This issue appears to be intermittent. If you simply open the source file experiencing the issue in your editor and re-save it, compilation appears to succeed in subsequent rounds.
When running in development mode, these are the components which will be booted up & where to find them:
http://localhost:3000
http://localhost:3000/graphql
http://localhost:3141
http://localhost:3141/fn/*
1. Apollo Client Developer Tools
For assisting with writing and debugging GraphQL queries.
For assisting with debugging application state- both the Apollo cache and other UI state.
localhost
, port 7999
localhost
, port 7999
Note there are some platform-specific quirks, and you may be forced to use the Chrome version as the Firefox extension has some bugs.
/bin
: output files from the TypeScript compilation of the source DHT code kept in src/HoloREA/dna
/build
: shell commands used to build the DHT code and setup the repo/docs
: more in-depth documentation files to understand particular areas of the app/src/graphql-adapter
: a REA-flavoured, client-side GraphQL adapter for the 0.0.1
Holochain zome REST APIs, used by the frontend app/src/HoloREA
: the Holochain app DHT code/src/lib
: helper files used in DHT code/src/tests
: Holochain app unit tests & demonstration scenarios/src/ui
: Example frontend app which talks to the DHT/src/ui/config
: Webpack configuration files for frontend app/src/ui/scripts
: shell commands for running development tasks/src/ui/public
: directory to serve alongside bundled JS files, incl. webpage template/src/ui/src
: bulk of the frontend app code