Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/holochain/peer-chat-redux
Instant messaging application running on Holochain-redux in Holoscape [For chat on Holochain rsm see https://github.com/holochain/elemental-chat/]
https://github.com/holochain/peer-chat-redux
Last synced: 3 months ago
JSON representation
Instant messaging application running on Holochain-redux in Holoscape [For chat on Holochain rsm see https://github.com/holochain/elemental-chat/]
- Host: GitHub
- URL: https://github.com/holochain/peer-chat-redux
- Owner: holochain
- License: gpl-3.0
- Archived: true
- Created: 2019-02-15T22:27:07.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2021-05-11T20:54:02.000Z (over 3 years ago)
- Last Synced: 2024-05-19T02:59:47.037Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 35.2 MB
- Stars: 90
- Watchers: 24
- Forks: 12
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG-UNRELEASED.md
- License: LICENSE
Awesome Lists containing this project
README
# Holochain Basic Chat
> NOTE: this chat is for the deprecated holochain-redux, for a more recent chat example on holochain-rsm please see [elemental-chat](https://github.com/holochain/elemental-chat/)
A simple chat app designed to get new users up, running and developing on Holochain
![Alt text](doc/screen.png?raw=true)
# Get chatting using nix & the latest released basic-chat
- Install nix tooling on mac/linux
```
curl https://nixos.org/nix/install | sh
```- Start a new nix-shell that has everything we need, this commit in the URL will install 0.0.14-alpha-1
```
nix-shell https://github.com/holochain/holochain-rust/archive/3b42375dc31442b62855cff8c339a6422c447176.tar.gz
```- Get the latest released basic-chat
```
wget --header='Accept:application/octet-conversation' https://api.github.com/repos/holochain/peer-chat/releases/assets/12405253 -O basic-chat.zip
unzip basic-chat.zip
```- Open the my-conductor-config.toml file in your favourite editor
- Create yourself an Agent Keystore and update the [[agents]] section of the my-conductor-config.toml following the steps at the top of the [[agents]] section
```
hc keygenThis will create a new agent keystore and populate it with an agent keybundle
containing a public and a private key, for signing and encryption by the agent.
This keybundle will be stored encrypted by passphrase within the keystore file.
The passphrase is securing the keys and will be needed, together with the file,
in order to use the key.
Please enter a secret passphrase below. You will have to enter it again
when unlocking the keybundle to use within a Holochain conductor.
Passphrase:
Re-enter passphrase:
Generating keystore (this will take a few moments)...Succesfully created new agent keystore.
Public address: HcScjdnxMF3Stafva7bpiFhst7Sywx9c3ip7AnuaFfhjeerdyIdWBOiVn6udsar
Keystore written to: /Users/philipbeadle/Library/Preferences/org.holochain.holochain/keys/HcScjdnxMF3Stafva7bpiFhst7Sywx9c3ip7AnuaFfhjeerdyIdWBOiVn6udsarYou can set this file in a conductor config as keystore_file for an agent.
```
- Run basic-chat on holochain
```
holochain -c ./my-conductor-config.toml
```sudo lsof -i :PORT
sudo kill -9 PID## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
### Prerequisites
At a minimum you will need to have the binaries for the holochain conductor installed on your system. See [the official installation instructions](https://developer.holochain.org/start.html).
**Be sure to use the v0.0.17-alpha2 release for the CLI and Conductor.**
### Running
From the project root, run the script to download the DNA/UI and then start the conductor
```
npm install
npm run fetch
npm run hc:start
```or alternatively to call the conductor directly
```
npm install
npm run fetch
holochain -c ./conductor-config.toml
```This will run the DNA as well serve the user interface. To load the app, just browse to [http://localhost:3000](http://localhost:3000).
### Networking
If you want to try and connect to other nodes this also requires the holochain networking library [n3h](https://github.com/holochain/n3h).
Instructions for networking can be found in the [conductor config](conductor-config.toml) file.
## Building from Source
### Holochain DNA
Building the DNA also requires that the holochain developer CLI, `hc`, is installed. You can run the helper script
```
npm run hc:build
```or use the CLI directly
```
mkdir -p dna
cd dna-src
hc package --strip-meta -o ../dna/peer-chat.hcpkg
```*Be careful!* If you are trying to network with other agents it is best to use a pre-built DNA. 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 run build
```## Built With
* [Holochain](https://developer.holochain.org/)
* [React](https://reactjs.org/)A huge acknowledgement to Pusher for providing an open source React chat UI (https://github.com/pusher/react-slack-clone)
## Authors
* **Willem Olding** - *Initial work* - [willemolding](https://github.com/willemolding)
## License
This project is licensed under the GPL-3 License - see the [LICENSE.md](LICENSE.md) file for details