A real-time collaborative writing experiment with branches, built on content addressable storage.
JavaScript HTML CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
couchapp
design
test
.bowerrc
.gitignore
.jshintrc
Gulpfile.js
README.md
TESTING.md
bower.json
package.json

README.md

Pillowfork

A shared space for experimental storytelling.

Every page is an opportunity to take the narrative in a new direction. All branches coexist for the reader to explore.

Uses

  • Choose (y)our own adventure
  • Story Ping-Pong
  • Collaborative Fan-fiction
  • Multi-POV narrative
  • Exploring concurrent events
  • Group brainstorming

Technology

Pillowfork is a CouchApp. The vast majority of the app code is “client-side” (runs in the user’s browser). Data from the server is synchronized with each client, and stored in client-side storage (see IndexedDB) if available. Additionally, draft content is stored in the author’s browser (this works even in older browsers) until the author is ready to publish it. This enables two interesting modes:

  • Offline: The site can be used fully-offline, including authoring. The only action which requires a net connection is publishing a finished page. Take it to the park. Changes sync next time you get a connection.
  • Real-time collaboration: New pages are sent immediately to other connected browsers immediately, enabling games like story ping-pong and story swarm.
  • Mobile-first: Works great on smartphones.

Theory

Pillowfork uses a data structure which is similar to that used by Git.

  • Pages are the basic building block of a story. Each page (except the first page of a story) has one or more predecessor.
  • Pages are content addressable via a SHA1 hash. This makes them immutable, supporting discourse with no take-backs. This technology is important for the future of distributed social systems. Check out Camlistore to for more theory.
  • The pages in a story form a tree (technically an acyclic directed graph, due to the multi-parent allowance), rooted at the first page.

Get involved

Installation

Prereqs

  1. Install or provision a CouchDB instance.
  • Iriscouch works, but we found the free plan to be too unreliable.
  • For local development on OSX, we use brew install couchdb (installs quick with Erlang from a “bottle”).
  • Ubuntu: Pillowfork.com is running Ubuntu Precise with the CouchDB packages from this PPA. More recent Ubuntu releases have up-to-date CouchDB packages.
  1. Build the BrowserID authentication plugin to support passwordless signin. Use this branch. TODO: more detail and maybe a pre-built copy of the plugin.
  2. Prereqs for building the CouchApp, only needed on your dev machine:
  • Node.JS
  • erica couchapp cli, which must be built using Erlang and rebar. There are also Python (couchapp/couchapp) and Node.js (grunt-couch) implementations, which work fine but do full upload on each run and so are much slower in development.

TODO: these install instructions are out of date. I’m transitioning to Gulp as the task runner.

npm install -g grunt-cli gulp
npm install
# pulls down webdriver stuff
grunt install

Happy forking!