harlantwood / basic-chat

A barebones chat hApp for learning and testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Holochain Basic Chat

A simple chat app designed to get new users up, running and developing on Holochain

Alt text

Get started using nix-shell

Nix shell is a way to set up a dev environment that is easy to replicate on different machines. See https://github.com/holochain/holonix for more info.

  • Install nix tooling on mac/linux
  curl https://nixos.org/nix/install | sh
  • Start a new nix-shell. This uses the local default.nix file to set up the correct versions of the holochain binaries and build tools.
  nix-shell
  • You should end up with a [nix-shell: prompt in your shell.

Building from Source

Holochain DNA

There are some helpers scripts in the root package.json for building, running and testing the holochain code.

npm run hc:build

or use the CLI directly

mkdir -p dna
cd dna-src
hc package -o ../dna/basic-chat.dna.json

Be careful! If you are trying to network with other agents it is best to distribute a single compiled dna file. Any differences in compiler configuration may lead to the DNA hash being different and the nodes will not be able to communicate.

UI

cd ui-src
npm install
npm start

Using with Holoscape

If you want to use Holoscape (and you definitely should!) you can build a Holoscape ready package by running

npm run hc:make-holoscape

You can then use the holoscape-bundle in the project root to install. Note: You most likely will need to change the DNA hash in the holoscape-bundle.toml file

Built With

A huge acknowledgement to Pusher for providing an open source React chat UI (https://github.com/pusher/react-slack-clone)

Authors

License

This project is licensed under the GPL-3 License - see the LICENSE.md file for details

About

A barebones chat hApp for learning and testing

License:GNU General Public License v3.0


Languages

Language:JavaScript 47.2%Language:Rust 30.7%Language:CSS 14.9%Language:Nix 4.8%Language:HTML 2.3%