Skip to content
open tomato/ rafa-hub
GitHub
rafa-hub pages
  1. rafa-hub
  2. rafa-hub

rafa-hub

A server a team's devices sync their rafa effort records through, instead of each machine keeping its own copy.

rafa-hub is the server end of rafa's service sync strategy. Every rafa project keeps an effort store, its record of sessions, tasks, commits and what each cost. With a hub, a team's devices push their new records to it and pull the others', so every device sees the whole team's work.

WARN

rafa-hub is an early version. It is not on npm: it lives in rafa's repository, under packages/rafa-hub, and you build its container from a checkout. The client side, the module a device needs, also loads only from a checkout today; Connect devices explains.

Where it sits

The hub is the heaviest of rafa's ways to move effort records between devices, and most projects never need it:

SetupWhat to use
One laptopnothing: the store stays local
Two personal devices, now and thena file you copy (Several devices)
Personal projects that sync oftena private git repository (open spec, #326)
A company or several teamsa hub

A hub gives the team one source of truth and live status. Peer-to-peer sync was considered for teams and set aside for now, because it needs the devices online together and a way to find each other.

What it does at 0.47.0

The hub is one small web service with four routes: a health check, a status read, and a push and a pull of effort rows. It keeps the team's rows in a SQLite file, and it decides who may sync by asking GitHub: a device sends a GitHub token, and the hub serves it if that login holds write access or above on the repository the hub names. No keys are stored on the hub.

Coming

NOTE

Coming, in open specs: running the hub on a company's own service stack, with deploy, status and logs readable without logging in to a host (#503); the hub reading its config through the same loader as a rafa project, so a .ts config gets editor checks (#1092). A hub of hubs, rafa-hive, each serving its own devices, is named in #325 as a later idea, with no spec.

Next

Run a hub, then connect the devices.