Collaborative text editor using operational transformations
JavaScript Python CSS HTML
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.
editor
server
.gitignore
README.md Update README.md Jan 24, 2018
manage.py
requirements.txt

README.md

Editor

Collaborative editor using operational transformations.

OT algorithms and code based on Tim Baumann's project.

Client textarea uses CodeMirror.

Server is a Django app. Updates are sent over Fanout Cloud or Pushpin.

There is a public instance available here: http://editor.fanoutapp.com.

Usage

Install dependencies and setup database:

virtualenv venv
. venv/bin/activate
pip install -r requirements.txt
python manage.py migrate

Note: default storage is sqlite.

Running with Fanout Cloud

Create a .env file containing GRIP_URL:

GRIP_URL=https://api.fanout.io/realm/{realm-id}?iss={realm-id}&key=base64:{realm-key}

Be sure to replace {realm-id} and {realm-key} with the values from the Fanout control panel.

In a separate shell, run ngrok for local tunneling:

ngrok http 8000

In the Fanout control panel, set the ngrok host/port as the Origin Server.

Run a local instance of the project:

python manage.py runserver

Then open up two browser windows to your Fanout Cloud domain (e.g. https://{realm-id}.fanoutcdn.com/). Requests made to Fanout Cloud should be routed through ngrok to the local instance.

Running with Pushpin

Create a .env file containing GRIP_URL:

GRIP_URL=http://localhost:5561

Run Pushpin:

pushpin --route="* localhost:8000"

Run the server:

python manage.py runserver

Then open up two browser windows to http://localhost:7999/.