Collaborative editing is a dance.
Before biting off the actual Operation Transform implementation we have decided to implement a very basic chat server and web client as it holds a lot of the periphery tooling we will need for the ultimate goal: Websockets, sqlite, JWT - for details see notes on google docs.
The foxtrot backend server is written in Go with a REST inspired HTTP API for chat message history and access to other resources. Websockets are used for new messages.
- Pre-requisites: go 1.16, golangci-lint, GNU make
- Build with
make - View build options with
make help
Start the foxtrot server with a transient in-memory DB and some test
sample data with make run. For more options run
make build
out/foxtrot --help
to see for instance how to specify the path to a new or existing Sqlite data store or define the authenticator secret.
Access the foxtrot API server locally with
curl 'localhost:8080/api/history?room=$Kitchen'
curl localhost:8080/api/version
Foxtrot uses Sqlite3 as its data store. Interactively set up transient in memory DB with
sqlite3
.read pkg/foxtrot/sql/schema.sql
.read pkg/foxtrot/sql/sample_data.sql
Alternatively, create a persistent DB with
sqlite3 out/foxtrot.db \
'.read pkg/foxtrot/sql/schema.sql' \
'.read pkg/foxtrot/sql/sample_data.sql'
The frontend is a SPA built with SvelteJS.
All frontend code and build tools are contained in frontend/. To work with it
first cd frontend
- Pre-requisites: node v15.5GNU make
- Initialise with
npm install - Develop with
npm run dev - Build with
npm buildand view output withnpm run start
On every successful merge to master on GitHub, the Semver patch
version number is bumped and used as git tag. Additionally
cross-platform docker images are built for linux/amd64 and linux/arm/v7
and pushed to
foxygoat/foxtrot
with the corresponding version tag.