• This repository has been archived on 30/Apr/2019
  • Stars
    star
    161
  • Rank 233,470 (Top 5 %)
  • Language
    JavaScript
  • Created over 7 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fully distributed twitter built on holochain

Clutter

Code Status Build Status In Progress Chat License: GPL v3

P2P twitter-clone built on Holochain A group of cats is called a Clutter, Cludder, Clowder, Kendle, or Kindle. Maybe it's time for a peer-to-peer shoutcast system to eat a certain blue bird.

Clutter is a work in progress. It's a sample application designed to demonstrate how easy it is to build applications on Holochain.

If you would like to simply download a build version of the latest Clutter, download and unzip the latest release

Code Status: Pre-alpha. Not for production use. This application has not been audited for any security validation.

Clutter Installation

From Holochain Release

If you want to just see Clutter in action and haven't yet installed Holochain, the best way to try it out is simply to use the version included in the latest Holochain release. Go to the Holochain Releases page and download and unzip the archive for your machine. That archive contains a full version of clutter, along with instructions for running it.

From Clutter Release

You can download the latest Clutter release directly from the Clutter Release page.

Via hcdev

Prerequiste: Install holochain on your machine and make sure you do the step to set the $GOPATH.

Run the command:

hcdev init -cloneExample=clutter

This will create a copy of the Clutter source code in a clutter directory.

You can then run clutter in development mode with:

cd clutter
hcdev web

and point your browser at http://localhost:4141 to access the UI.

--or--,

assuming that you've already setup your Holochain environment with hcadmin init you can join and run Clutter with:

cd clutter
hcadmin join . clutter
hcd clutter

and point your browser at http://localhost:3141 to access the UI.

Installation: for Developers

Prerequiste: Install Holochain on your machine and make sure you do the step to set the $GOPATH.

Dependencies: If you want to work on the Clutter UI, you will need nodejs (https://nodejs.org/en/) (LTS) installed, with npm or yarn (https://yarnpkg.com/lang/en/docs/install) to be able to build and copy it from the ui-src to the ui directory:

The following commands will clone the latest build of clutter to your machine (you may want to use your own fork instead of our repo) and then you will either install npm or yarn to build the UI for the app.

git clone https://github.com/Holochain/clutter.git
cd clutter/ui-src
npm install # (or yarn install)
npm run build # (or yarn build)
cd ..

After npm run build, npm start to configure and start the React UI.

Running Clutter in Dev mode

Now if you want to run the app, you can run:

hcdev web

Running Clutter with Local Boostrap

Holochain does local discovery with MDNS which is not always availble on Windows machines. So during development instead you may want to run your own local bootstrap server for node discovery. These instructions detail how to run 2 instances of Clutter and your own Bootstrap server.

Make two copies of your your clutter folder one called clutter1 and the other clutter2. Both folders will need to have a dna folder and a ui folder in each.

Firstly run the bootstrap server which will let each instance of Clutter know about its peers. The bs command is part of the Holochain install. If it doesn't work you probably need to set the $GO_PATH variable. (Soon we won't need this step)

  bs

You will get a response like

2018/01/11 11:24:03 app version: 0.0.2; Holochain bootstrap server
2018/01/11 11:24:03 starting up on port 3142

Now start up Clutter in each folder.

  cd clutter1
  hcdev -DHTport=6001 -agentID=lucy -bootstrapServer=localhost:3142 web 3141

  cd ..
  cd clutter2
  hcdev -DHTport=6002 -agentID=phil -bootstrapServer=localhost:3142 web 4141

You will see a response like:

Copying chain to: /Users/philipbeadle/.holochaindev
Serving holochain with DNA hash:QmVbbeDAHVxC9cTvx6UhNEeTCK99SRKfxKDz3s4mR6TnsS on port:3141

Now open a browser at http://localhost:3142/QmVbbeDAHVxC9cTvx6UhNEeTCK99SRKfxKDz3s4mR6TnsS (substituting in the DNA hash from the response above if different) and look at the Bootstrap server. You will see 2 records like this

  [{"Req":{"Version":1,"NodeID":"QmTAjDmQHobs2oQZp4UrbSzkShUGVKcsQUdakHeQ4YYxRX","NodeAddr":"/ip4/0.0.0.0/tcp/6003"},"Remote":"[::1]:63187","LastSeen":"2018-01-11T12:32:15.659887156+11:00"},{"Req":{"Version":1,"NodeID":"QmWQVaqEayZJWnvxLtsKr1iyeTDp3s7m7TTE36HhAUTiTK","NodeAddr":"/ip4/0.0.0.0/tcp/6002"},"Remote":"[::1]:63153","LastSeen":"2018-01-11T12:28:40.85765899+11:00"}]

Now open a browser to http://localhost:3141 and you will see Clutter. Open another tab to http://localhost:4141 and you now have 2 instances of Clutter that you can chat between. Add a handle in each and then meow and follow each instance and you will see the meows!!

Docker Usage

You can do all this much easier with Docker. Download the latest release from Clutter Release, unzip it and cd into the folder. Then run

  cd ui-src
  npm install # (or yarn install)
  npm run build # (or yarn build)
  cd ..
  TARGETDIR=$(pwd) docker-compose up

This will build the source into a React app and install it in Holochain. Then you can open browsers to

  http://localhost:3142 - Bootstrap
  http://localhost:3141 - Clutter
  http://localhost:4141 - Clutter
  http://localhost:5141 - Clutter

and try out Clutter.

Tests

To run all the stand alone DNA tests:

hcdev test

Scenarios

Scenario - Collision Of Handles - Sequence Diagram

  hcdev scenario collisionOfHandles

followAndShare

hcdev scenario followAndShare

This test spins up two nodes jane and joe and tests that following and reading posts works. To watch the network traffic and details try:

hcdev -debug scenario followAndShare

scaling

This test is designed to be run on separate machines and spins up many clones on each and confirms that they all talk to each other.

UI automation

in clutter folder

  hcdev -execpath=$HOME/.holochaindev1 -DHTport=6001 -agentID=agent3141 web 3141
  hcdev -execpath=$HOME/.holochaindev2 -DHTport=6002 -agentID=agent4141 web 4141
  hcdev -execpath=$HOME/.holochaindev3 -DHTport=6003 -agentID=agent5141 web 5141

if running all in one terminal you will need to kill the processes between restarts.

  kill -kill `lsof -t -i tcp:3141` & kill -kill `lsof -t -i tcp:4141` & kill -kill `lsof -t -i tcp:5141`

What the Automated build does

When a branch is pushed to Github Travis runs a build. The build does the following:

  1. Installs docker-compose
  2. Runs docker-compose up -d which spins up a bootstrap server and 3 instances of clutter
  3. Installs the cypress dependencies
  4. Runs the Cypress e2e tests.
  5. If on master a new release is published to github releases. (coming soon)

Feature Roadmap and Current Progress

  • Set default handle from AgentID string
  • Enable users to change their handle
  • Share mews (tweets) -- up to 256 characters
  • Follow someone (by specified handle)
  • Unfollow someone
  • View post stream of people you follow sorted by time
  • Provide React/Redux UI
  • Implement Cypress and Storybook UI testing
  • Detect #hashtags in post text
  • Create hashtag anchors if they don't exist
  • Link from hashtag anchor to posts with that hashtag
  • Show posts which have a particular hashtag
  • Mark posts as a favorite ⭐
  • Link favorited posts from a user/handle
  • Show someone's ⭐ favorited posts
  • Edit a previous post (partially implemented)
  • Refollow someone previously unfollowed (partially implemented - Have to fix put/del/put links sequence)
  • Detect @mentions in post text
  • Link from handle posts which @mention them
  • Show @mentions for a user/handle
  • Lists - Special anchor type with text being "[userhandle]-[listname]" with links to users on a named list which is named unique-per-user
  • Reply to mew (add reply-to link + link to replies)
  • Remew/Retweet (link to original in content of post? + new content?)
  • Enable direct messages via N2N private messaging
  • Detect links
  • Include links (w/ link shortening?) as linked link
  • Pretty display of OpenGraph data for first link
  • Create/Read/Update/Delete User profile info (first name, last name, location, picture, website, etc.)
  • Keyword indexing/search with Holodex integration
  • Search with result groupings/tabs (people, posts, tags, trending, )
  • Add UI tabs/views: feed, mentions, direct messages, lists
  • Embed pictures ("pic" link to url) with pretty render
  • Integrate with Twitter for publishing mews to tweets from your unique userspace
  • Integrate with DPKI for bridging app contexts

Contribute

We welcome pull requests and issue tickets. Find us on gitter to chat.

Contributors to this project are expected to follow our development protocols & practices.

License

License: GPL v3

Copyright (C) 2017, The MetaCurrency Project (Eric Harris-Braun, Arthur Brock, et. al.)

This program is free software: you can redistribute it and/or modify it under the terms of the license provided in the LICENSE file (GPLv3). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Note: We are considering other 'looser' licensing options (like MIT license) but at this stage are using GPL while we're getting the matter sorted out.

More Repositories

1

holochain

The current, performant & industrial strength version of Holochain on Rust.
Rust
1,170
star
2

holochain-rust

DEPRECATED. The Holochain framework implemented in rust with a redux style internal state-model.
Rust
1,121
star
3

holochain-proto

Holographic storage for distributed applications -- a validating monotonic DHT "backed" by authoritative hashchains for data provenance (a Ceptr sub-project)
Go
878
star
4

launcher-tauri

Desktop launcher to install and use Holochain apps locally
Vue
262
star
5

holochain-client-js

A JavaScript client for the Holochain Conductor API
TypeScript
258
star
6

cryptographic-autonomy-license

The Cryptographic Autonomy License is a new breed of open license that protects not just the app developers and users of the source code but also end user privacy and control of identity and data.
241
star
7

scaffolding

Scaffolding tool to quickly generate and edit holochain applications
Handlebars
220
star
8

holonix-archive

NixOS && Holochain
Nix
150
star
9

holochain-ui

UI for composing Holochain experiences. First app is the Abundance of Presence chat & meeting coordination tool. Also includes Persona and Profile Management with Vault.
TypeScript
99
star
10

holochain-client-rust

A Rust client for the Holochain Conductor API
Rust
97
star
11

happ-build-tutorial

Tutorial on how to build hApp DNAs for Holochain RSM
TypeScript
96
star
12

docs-pages

The hosted static files for the Holochain developer documentation
Nunjucks
96
star
13

peer-chat-redux

Instant messaging application running on Holochain-redux in Holoscape [For chat on Holochain rsm see https://github.com/holochain/elemental-chat/]
JavaScript
90
star
14

syn

Generalized Holochain DNA and UI library for building real-time shared state hApps
TypeScript
89
star
15

elemental-chat

A chat DNA for Holochain RSM
TypeScript
81
star
16

apps

Your guide to fnding, installing, and running holochain apps
HTML
71
star
17

deepkey

A Holochain implementation of decentralized public key infrastructure
Rust
68
star
18

CRISPR-Holochain-redux

Electron app for designing and generating Zomes with UI Components
Vue
66
star
19

tx5

Holochain WebRTC P2P Communication Ecosystem
Rust
66
star
20

holoscape

A complete end-user deployment of a Holochain conductor with UI for administration and a run-time for hApp UIs
HTML
63
star
21

holochain-wasmer

Rust
61
star
22

devhub-dnas

DNAs for sharing source code and distributing compiled WASM that comprise Holochain Apps.
Rust
60
star
23

wind-tunnel

Performance testing for Holochain
Rust
60
star
24

hc-utils

A util crate for holochain-rsm
Rust
58
star
25

launcher

Desktop launcher to install and use Holochain apps locally (Electron version)
TypeScript
58
star
26

HoloWorld

Basic Hello World app for Holochain
JavaScript
57
star
27

holochat

Multi-room P2P chat (like a distributed Slack) which runs on holochain
HTML
56
star
28

holochain-nixpkgs

Nix
56
star
29

dpki

Distributed Public Key Infrastructure which runs on holochain
JavaScript
56
star
30

how

Embodment of a Holochain emegent standards process
TypeScript
55
star
31

hc-web-client-redux

RPC WebSocket client for Holochain web UIs
JavaScript
54
star
32

holochain-serialization

Abstractions to probably serialize and deserialize things properly without forgetting or doubling
Rust
49
star
33

website

jekyll website for holochain.org
HTML
48
star
34

n3h

nodejs implementation of holochain networking / p2p backend process
JavaScript
48
star
35

elemental-chat-ui

A Vue.js + Vuetify + Vuex web app for Elemental Chat DNA.
JavaScript
48
star
36

scaffold

Web-based wizard for generating scaffolding for holochain applications.
JavaScript
46
star
37

devhub-gui

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

lib3h

The lib3h p2p communication rust library.
Rust
44
star
39

hc-zome-lib

This is a pkgs with multiple zomes that can be used in your holochain dna
Rust
43
star
40

lair

secret lair private keystore
Rust
42
star
41

sodoken

Libsodium wrapper providing tokio safe memory secure api access.
Rust
42
star
42

minersweeper

Massively Multiplayer Distributed Minesweeper on Holochain
TypeScript
41
star
43

hdk-assemblyscript

The Holochain Developer Kit for Assemblyscript
JavaScript
41
star
44

holochain-anchors

A core pattern for storing AND FINDING data in a Holochain DHT. Anchors are a predictable hash (by using known content) from which you can attach links
Rust
39
star
45

holochain-blog-theme

The Ghost theme files for blog.holochain.org
CSS
38
star
46

hcSeedBundle

Javascript SeedBundle parsing and generation library.
TypeScript
36
star
47

holochain-cmd

Developer Command Line Tools for Holochain
Rust
36
star
48

holochain-load-test

Load testing for Holochain
Python
35
star
49

influxive

Opinionated tools for working with InfluxDB from Rust
Rust
35
star
50

holochain-client-python

A Python client for the Holochain Conductor API
Python
32
star
51

ghost_actor

GhostActor makes it simple, ergonomic, and idiomatic to implement async / concurrent code using an Actor model.
Rust
32
star
52

holochain-serialization-python

Rust
31
star
53

app-store-dnas

DNAs for Holochain App discovery and download.
Rust
31
star
54

bootstrap2

Holochain bootstrap peer discovery.
Rust
31
star
55

bootstrap

Bootstrap nodes onto a network by allowing existing nodes to list themselves under a URL
TypeScript
30
star
56

tryorama

Toolset to manage Holochain conductors and facilitate test scenarios
TypeScript
30
star
57

hc-spin

CLI to run Holochain Apps in Development Mode
TypeScript
30
star
58

hc-ts-template

Typescript + React + Redux + holochain-proto starter app
JavaScript
29
star
59

integrity-template

establishing patterns for separating integrity zomes from accessor zomes for Holochain apps
Rust
29
star
60

holosqape

Qt and QML based Holochain container app
C++
28
star
61

holochain-serialization-js

A JavaScript Wasm binding of the Holochain serialization and hashing algorithm (JaWaHoSeHa)
JavaScript
28
star
62

hc-tel

holochain telemetry experiment
Rust
27
star
63

benchmarks

sample apps used to establish initial holo fuel pricing
JavaScript
26
star
64

happ-client-call-tutorial

How to call your hApp
Rust
26
star
65

HCHC

The Holochain of Holochains
JavaScript
26
star
66

cointoss

example holochain app for "trustable random initiation"
JavaScript
26
star
67

holochain-nodejs

Test Holochain apps (hApps) within a nodejs container.
Rust
25
star
68

holochain-logging

Rust
25
star
69

identity-manager

DeepKey + Personas & Profiles
TypeScript
25
star
70

portal-dna

A DNA for providing zome function access across networks
Rust
25
star
71

react-graphql-template

JavaScript
24
star
72

app-store-gui

A web-based UI that works with Holochain's collection of App Store DNAs.
JavaScript
24
star
73

web-components

Library of React Web Components for Holochain Apps
JavaScript
24
star
74

mapOnHolochain

23
star
75

dao

Holochain implementation of standard ethereum DAO (Decentralized Autonomous Organization)
JavaScript
23
star
76

hc-spin-rust-utils

Rust node add-ons for hc-spin
JavaScript
23
star
77

hdk-rust

HDK Rust HAS MOVED -> https://github.com/holochain/holochain-rust/tree/develop/hdk-rust
Rust
23
star
78

holodex

Holochain application indexing engine for distributed apps which run on holochains
JavaScript
23
star
79

hc-test-utils

A lib of testing utility crates to support testing with holochain beta releases.
Rust
23
star
80

hc-state-cli-node

JavaScript
22
star
81

soa-toolbox

soa-toolbox is a set of plugins for Miro that give special functionality
JavaScript
22
star
82

hackathon-happs

hApps developed at various hackathons and training events
Rust
22
star
83

personas-profiles-redux

Holochain-redux (deprecated) app for people to manage how other apps access their personal information.
TypeScript
22
star
84

happ-index

"The poor man's hApp store" - short term interim solution until decentralized hApp store running on Holochain is up
21
star
85

holochat-rust

An extremely simple and small P2P chat app, with chat rooms
HTML
20
star
86

tasktaskic

an example app for holochain-rust 0.0.1 developer preview
Rust
20
star
87

hc-siderun

Helper utility for initializing a cluster of holochain nodes all connecting to a local bootstrap server (and thus, to each other)
Shell
20
star
88

holochain-persistence

Abstractions for saving and retrieving data locally
Rust
20
star
89

dev-camp-tests-rust

A test-driven development way to learn Holochain!
JavaScript
20
star
90

holochain-forum-theme

The Discourse theme for forum.holochain.org
20
star
91

hcrs

nodejs scaffold generation for holochain-rust
JavaScript
20
star
92

tx3

tx3 p2p communications
Rust
19
star
93

hc-rtc-demo

Holochain webrtc PoC / demo application
19
star
94

docs-pages-redux

Developer docs for Holochain Redux (legacy)
HTML
19
star
95

vue-cli-preset-holochain

Preset for creating Vue, Vuetify, Vuex, dexie Holochain apps.
19
star
96

dna-to-openapi

given holochain dna, generate a swagger / openapi spec file
JavaScript
18
star
97

core-concepts-examples-redux

A selection of example projects to illustrate the core concepts of Holochain
Rust
18
star
98

app-spec-rust

App Spec Rust HAS MOVED into holochain-rust repository!
Rust
18
star
99

vue-cli-plugin-holochain

Vue plugin that sets up a complete Vue + Vuetify + Vuex + Dexie + Holochain app
Vue
18
star
100

hc-rtc-sig

holochain webrtc signal server / client
18
star