First of all, what’s Holochain and why is this new blockchain architecture different from others?

Well, Holochain applications (DApps) are held entirely by people. No trusted third parties. No central points of failure. They enable direct architectural consent and cryptographic communication that are low risk, for less cost.

Each agent owns an immutable hash chain and stores public data as a monotonic DHT node. Think lightweight, secure decentralized computing possible on mobile devices!

Every application runs its own holochain on its own terms, with cheaper hosting overhead. Since users are hosts, as more agents use an app, more hosting power and storage becomes available. The load gets lighter!

Each agent’s source chain holds the app’s “DNA” — the code that runs the app. Its peer validation requirements ensure secure apps. That data cannot be counterfeited, tampered with, or lost. Each app stores its data in a validating DHT creating redundancy of public data across randomized nodes. When nodes go offline, the DHT is self-healing and rebalances the data to different nodes. And if someone alters their own app code they effectively fork themselves out of the shared DHT space into an entirely different application.

More info:

Prerequisites

@angular/cli if you don’t have Angular 6 installed in your system go to https://angular.io/guide/quickstart

Install

Installing Holochain cli

Download Go. Download the “Archive” or “Installer” for version 1.8 or later for your CPU and OS. The “Source” download does not contain an executable and step 3 will fail.

Install Go on your system.

Add a new environment variable called GOPATH which points to the directory on your computer where Go libraries get installed. How to do this depends on your computer and operating system. Instructions for the most common platforms are below.

For Mac and Linux

If you DO NOT have a shell profile file, follow ALL these instructions in your terminal.

$ cd ~

$ touch .bash_profile

$ open .bash_profile

If open .bash_profile doesn’t work use xdg-open .bash_profile

In your editor, add the following to .bash_profile, and save it

export GOPATH="$HOME/go"

export PATH="$GOPATH/bin:$PATH" $ source .bash_profile

For Windows

First you’ll need to install some necessary programs if you don’t already have them.

Install Windows git. Be sure to select the appropriate options so that git is accessible from the Windows command line.

Install GnuWin32 make.

Next, in your Control Panel, select System>Advanced system settings>Environment Variables… and under System Variablesdo the following:

Add a new entry with the name GOPATH and the value %USERPROFILE%\go (Or your Go workspace folder). Double-click Path, and in the window that pops up add the following entries:

%GOPATH%\bin

C:\Go\bin (Or wherever you installed Go to+ \bin ).

C:\Program Files (x86)\GnuWin32\bin (Or wherever you installed GnuWin32 make to+ \bin ).

Run the following command in a terminal to download the library and command lines tools

Lastly, change directories into the new holochain-proto directory, and run make to build the library and command lines tools for your computer.

MAC and LINUX: $ cd $GOPATH/src/ $ cd $GOPATH/src/ github.com/holochain/holochain-proto WINDOWS: $ cd %GOPATH%/src/ $ cd %GOPATH%/src/ github.com/holochain/holochain-proto and then (on both) $ make

To see an initial confirmation that it works, you can try running one of the commands to check your version. You should see a result something like the following.

$ hcadmin -v

hcadmin version 0.0.x (holochain y)

Init Holochain App

You need to initialize a new Holochain app folder, with all the new files necessary to run a Holochain app, but you don’t want to create them all manually. From the command line, enter the directory where you’d like to create a new folder. Instead of creating it yourself, just run

$ hcdev init your-app-name

This will create the folder, and within it you’ll find all the starter files you need to start coding. Change directories into your new app folder (of the same name as your app). From here, two commands will help you.

The following will get you a web server for your new Holochain app running.

$ hcdev web

Deploy Angular App

Now go the folder of your angular app

$ ng build --prod

Go to folder dist/app-name/ , copy all the files generated it and paste it in holochain-app-name/ui/

Running the app on the Holochain blockchain

Before going any further though, you MUST have initialized Holochain on your device. Do this using

$ hcadmin init your-email@address.com

Replacing your-email@address.com with an email address that you’re willing to identify yourself within Holochain applications as. You will only need to do this once after installing Holochain.

Now you can join the Holochain app. You need to change directories into the folder containing the the code which is the EXACT configuration of the app that you want to join. If the code, or the DNA, differs in even the tiniest way from another user’s version of that code, you will actually be running a different app. Run

$ hcadmin join . app-name

The . is a reference to the current directory, assuming that's the Holochain app you want to run. You could run the command from a different directory, and modify that path. The app-name can be set by you to what you want, but you should give it a descriptive name. Now, to run the application, run

$ hcd app-name

This will start the app, and you can access it and start to see activity of your own, and your peers, by using the UI at http://localhost:3141.

That's all folks

Donations

BTC — 1H17HT6HSXUUPUsNgWW41UZJ1S6JDK2Gs5

BCH — qqcxu636r93dne2unp7gdvzdpkwtnx6vlyp3klw48y

ETH — 0xb0808267441b5eb1b7c87a949a8cf5b6f416da1a

LTC — LPQeUXYJ1pThNSLXPJYYHobKEh92sWQyUT

ZEC — t1fkrzNFqwSb2PHtQsKU6i2SVnxmsQMbXKr