edgesync
v 0.0.0-dev status alpha github docs

edgesync

A NATS-native sync engine for Fossil SCM repositories. Mesh topology. Optional iroh tunneling. Bidirectional messaging built in.

Projectedgesync — NATS-native Fossil sync engine
LanguageGo (modules github.com/danmestas/EdgeSync/{leaf,bridge})
Built onlibfossil · NATS embedded · iroh (optional)
Binaries3 (edgesync · leaf · bridge)
Statusv0.0.0-dev · alpha · pre-release · wire protocol stable, CLI may shift
§01

Install install

shell
$ go install github.com/danmestas/EdgeSync/cmd/edgesync@latest
$ edgesync doctor

One static binary, no CGo. The doctor subcommand checks your environment (Go version, SQLite driver, NATS reachability) and prints a clean report.

§02

What it is overview

EdgeSync is a sync engine for Fossil SCM repositories that swaps Fossil's HTTP-based /xfer protocol for NATS messaging. The leaf agent reads and writes .fossil SQLite files via the libfossil library, and exchanges blobs with peer agents over an embedded NATS mesh.

There is no central server in the default topology — each agent runs its own NATS server in-process, and gossip happens leaf-to-leaf. An optional bridge process translates between NATS and HTTP /xfer for talking to unmodified upstream Fossil servers.

§03

Why you might want it why

Three shapes of problem where EdgeSync is the right tool.

You're running many small Fossil repos across edge devices. Robotics fleets, retail kiosks, CDN nodes, on-prem appliances — anywhere the topology is "many small sites, intermittent connectivity, no central server." EdgeSync's mesh-first design means a new device pairs with one peer and converges with the rest of the fleet from there.

You need bidirectional messaging alongside repo sync. Most version-control stacks bolt chat or notifications on as a separate service. EdgeSync ships notify as a first-class channel using the same NATS mesh: an agent commits and the human's phone gets a push, the human replies and the agent acts on it.

You want zero infrastructure. Embedded NATS server + iroh transport = no broker to operate, no central server to scale, no CDN to point clients at. Two laptops on a coffee-shop wifi can sync to each other directly.

§04

How it fits together architecture

EdgeSync architectureApps (cli, daemon, mobile) call the leaf agent, which embeds libfossil and a NATS server. The agent persists to a .fossil SQLite repo and exchanges sync rounds with peer leaves over NATS, optionally tunneled through iroh QUIC, with a bridge translating to HTTP for legacy Fossil servers.appsleaf agentmeshclidaemonmobilelibfossilNATS servernotifypeerirohbridge.fossil (SQLite)callssynceventspersist

The leaf agent embeds libfossil (Fossil repo I/O), a full NATS server (peer/hub/leaf role configurable), and the notify pub-sub. Mesh column lists the three transport options — pick any combination per agent. Persistence is always a regular .fossil SQLite file readable by the upstream fossil binary.

§05

Compared to neighbors comparison

EdgeSyncupstream fossil servergit + chat stack
Topologymesh (peer/hub/leaf)client/serverclient/server
NAT traversaliroh QUIC (built-in)nonedepends on host
Bidir messagingnotify (built-in)forum/wiki (in-repo)separate service
Storage format.fossil (compatible).fossil.git
Static binaryyesyesvaries
Runtime depsnonenonevaries
API stabilityalphastablestable

EdgeSync is not a Fossil replacement — it reuses the .fossil format and the /xfer wire protocol via libfossil. The comparison above is about operating shape, not feature parity with the upstream Fossil server (which still wins on web UI, wiki, forum, tickets).

§06

What it is not limits

Not a Fossil replacement. EdgeSync moves .fossil blobs around. The format and protocol come from the upstream Fossil project; EdgeSync just changes the envelope. Run the upstream fossil binary alongside if you need the web UI, wiki, forum, or ticket system.

Alpha. The wire protocol (Fossil /xfer cards) is stable, but EdgeSync's CLI flags, agent config schema, and notify message shape may change before v1.

Not a database sync engine. EdgeSync replicates .fossil repositories, not arbitrary SQLite databases. If you want general SQLite replication, look at Litestream or LiteFS.

No web UI yet. The leaf agent serves /xfer for sync but does not render HTML. Use upstream fossil bound to a local repo if you need a UI.

§07

Get going start

shell
$ go install github.com/danmestas/EdgeSync/cmd/edgesync@latest
$ edgesync new my-project.fossil               # create a repo
$ edgesync sync start --repo my-project.fossil --serve-http :9000
$ edgesync notify init --project my-project    # enable messaging

Walkthrough: /docs/quickstart · Concepts: /docs/concepts · Architecture: /docs/architecture · Deployment: /docs/deployment · Notify: /docs/notify · Source: github.com/danmestas/EdgeSync.