Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ node_modules/
videos/
.DS_Store
screenshots/
ui/
build/
npm-debug.log
yarn.lock
Expand Down
85 changes: 63 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,84 @@
[![Code Status](https://img.shields.io/badge/Code-Pre--Alpha-orange.svg)](https://github.com/holochain/clutter#feature-roadmap-and-current-progress)
[![Build Status](https://travis-ci.org/holochain/clutter.svg?branch=develop)](https://travis-ci.org/Holochain/clutter)
[![In Progress](https://img.shields.io/waffle/label/holochain/clutter/in%20progress.svg)](http://waffle.io/holochain/clutter)
[![Gitter](https://badges.gitter.im/metacurrency/holochain.svg)](https://gitter.im/metacurrency/holochain?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge)
[![Chat](https://img.shields.io/badge/chat-live-brightgreen.svg)](https://chat.holochain.net/appsup/channels/app-clutter)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)

**P2P twitter-clone built on holochain**
**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](https://github.com/holochain/holochain-proto).

If you would like to simply download a build version of the latest Clutter, download and unzip the [latest release](https://github.com/holochain/clutter/releases) Or this [archive](https://drive.google.com/file/d/11xRHfLPJkHATFo0NJYg_rhX1i3JgUvCv/view?usp=sharing)

If you would like to simply download a build version of the latest Clutter, download and unzip the [latest release](https://github.com/holochain/clutter/releases)

**[Code Status:](https://github.com/metacurrency/holochain/milestones?direction=asc&sort=completeness&state=all)** Pre-alpha. Not for production use. This application has not been audited for any security validation.

## Installation & Usage
## 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](https://github.com/holochain/holochain-proto/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](https://github.com/Holochain/clutter/releases).

### Via `hcdev`

**Prerequiste:** [Install holochain](http://developer.holochain.org/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:

``` shell
cd clutter
hcdev web
```
and point your browser at `http://localhost:4141` to access the UI.

**--or--**,

**Prerequiste:** [Install holochain](http://developer.holochain.org/Install_Holochain) on your machine and make sure you do the step to set the $GOPATH.
assuming that you've already setup your Holochain environment with [`hcadmin init`](https://developer.holochain.org/Command_Line_Tools#hcadmin_init) you can join and run Clutter with:

**Dependencies:** If you want to run Clutter locally, you will need `nodejs` (https://nodejs.org/en/) (LTS) installed, with `npm` or `yarn` (https://yarnpkg.com/lang/en/docs/install):
``` shell
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](http://developer.holochain.org/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 ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

```

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 # if you want to just run it temporarily and test it out, with scratch data
```
or
```
hcd web # if you want to really start to use the app
hcdev web
```

If you want to just see Clutter in action, the best way to try out Clutter on your own is to run 2 instances of Clutter and your own Bootstrap server. So download the latest release from [Clutter Release](https://github.com/Holochain/clutter/releases), unzip it and make 2 copies of the contents into folders called clutter1 and clutter2. Both folders will have a dna folder and a ui folder in each.
### 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)
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
```
Expand All @@ -63,13 +104,13 @@ 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
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
```doQmVbbeDAHVxC9cTvx6UhNEeTCK99SRKfxKDz3s4mR6TnsS
[{"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!!
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
## Docker Usage
You can do all this much easier with Docker. Download the latest release from [Clutter Release](https://github.com/Holochain/clutter/releases), unzip it and cd into the folder. Then run
```
cd ui-src
Expand All @@ -87,7 +128,7 @@ This will build the source into a React app and install it in Holochain. Then yo
```
and try out Clutter.

### Tests
## Tests
To run all the stand alone DNA tests:

``` shell
Expand Down Expand Up @@ -132,10 +173,10 @@ if running all in one terminal you will need to kill the processes between resta

## What the Automated build does

When a branch is pushed to Github Travis runs a build. The build does the following:
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. Install the cypress dependencies
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)

Expand Down Expand Up @@ -177,7 +218,7 @@ When a branch is pushed to Github Travis runs a build. The build does the follo


## Contribute
We welcome pull requests and issue tickets. Find us on [gitter](https://gitter.im/metacurrency/holochain) to chat.
We welcome pull requests and issue tickets. Find us on [gitter](https://gitter.im/metacurrency/holochain) to chat.

Contributors to this project are expected to follow our [development protocols & practices](https://github.com/metacurrency/holochain/wiki/Development-Protocols).

Expand All @@ -186,6 +227,6 @@ Contributors to this project are expected to follow our [development protocols &

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.
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.
6 changes: 6 additions & 0 deletions ui/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"main.css": "static/css/main.65027555.css",
"main.css.map": "static/css/main.65027555.css.map",
"main.js": "static/js/main.a0ec06ac.js",
"main.js.map": "static/js/main.a0ec06ac.js.map"
}
Binary file added ui/cat-eating-bird-circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/cats.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.png"><script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"><script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><link href="/style.css" rel="stylesheet"/><title>Clutter</title><link href="/static/css/main.65027555.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/static/js/main.a0ec06ac.js"></script></body></html>
15 changes: 15 additions & 0 deletions ui/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
1 change: 1 addition & 0 deletions ui/service-worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ui/static/css/main.65027555.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ui/static/css/main.65027555.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ui/static/js/main.a0ec06ac.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ui/static/js/main.a0ec06ac.js.map

Large diffs are not rendered by default.

Loading