Greg Shuflin ee2a29c49f An episode can be downloaded and kept, and dropped again
The TODO's "no offline copy of an episode": playback streamed the
enclosure and nothing ever put the audio in the blob store, so an episode
could not be taken onto a plane.

`podcast::save_episode_audio` downloads the enclosure to a staging file
and seals from there. Two new `BlobStore` methods make that possible
without holding the episode in memory — `store_file` seals from a path
and `load_to_file` decrypts to one, both a 64 KiB chunk at a time. A
200 MB episode was 200 MB resident through `store`'s `&[u8]`, and the
phone is the node most likely to be asked to hold one. `store_file` reads
twice, because convergent encryption derives the content key from
`BLAKE3(plaintext)` of the whole blob — that price is paid in disk reads
rather than in memory, and a test pins the two paths to the same address.

Downloading gives the episode a document, whether or not anyone has
started listening: saving a back catalogue for a flight is something the
user has said about those episodes.

`release_episode_audio` drops the local copy, deliberately not through
`eviction`. That machinery exists to stop a user deleting the ensemble's
last copy and pays live presence queries for it; a podcast enclosure has a
copy the ensemble never controlled, at the URL on the document itself.
The two records eviction *would* have written are still written, through
its `record_local_release` — extracted here, because owing peers a
release log is not eviction's alone.

The episode document survives, and must: `Provenance::Syndicated` is
never tombstoned, since a deterministic id that has been tombstoned can
never be used again.

`saved_locally` joins the two batched projections both frontends already
read, so a list gets the mark without a query per row.
2026-09-07 00:42:38 -07:00
2025-08-23 01:40:44 -07:00
2026-05-21 02:38:11 -07:00

Synchronicity

Synchronicity GUI screenshot Synchronicity Android screenshot
Synchronicity TUI screenshot

Overview

Synchronicity is a decentralized personal server implemented as an overlay operating system.

What does this mean in practice? A personal server is a computer owned and controlled by a single person that performs computational tasks on a network on their behalf, where a computational task is concretely something like storing and displaying PDF documents, recording text notes, playing music files, downloading and storing files from the internet, making and recording posts on social media networks, and in general anything that a person might want to do using modern networked computer or smartphone.

decentralized means that there is not a single instantiation of Synchronicity on any particular hardware device; but rather any person's computer is comprised of an ensemble of individual nodes which communicate and synchronize data with each other over the network. Concretely, a node might be an Android smartphone, a desktop or laptop computer, or a Linux VPS in the cloud.

A node runs Synchronicity via one of several modalities — the specific program a human uses to interact with it, such as the Android app, the desktop GUI, or a CLI tool talking to a background daemon. Modalities are just different doors into the same distributed personal computer: whether you're clicking around the GUI or typing commands at the CLI, you're operating the same node underneath.

An overlay operating system is a self-contained computing environment designed to be run as a program on an existing computer operating system, instead of directly controlling the hardware itself. A web browser with its Javascript engine capable of executing sophisticated webapps is probably the most widespread example of an overlay OS today.

What can someone do with Synchronicity? Some examples:

  • Listen to a podcast streaming from your phone to your car stereo while driving. When you get to your destination and get out of the car, you can pick up where you left off from your Synchronicity instance on your laptop.
  • Start reading a PDF on your desktop computer, then head out to get on public transit, and pick up where you left off on your phone.
  • Keep a music library on an always-on cloud server, and stream arbitrary songs to the music player built into your Synchronicity instance.
  • Host a code version control system forge like Forgejo or Github.
  • Proxy requests to a commercial AI service like Anthropic's Claude or OpenAI's ChatGPT; or run a local Large Language Model and manage chat conversations with it from any device.

Installation and Usage

Note: Synchronicity is actively in development and is an early-stage project. The bulk of its ambitions are yet-unrealized.

A synchronicity node currently ships in three modalities: an Android app, a desktop GUI program (only tested on Linux thus far), and a CLI tool that talks to a background daemon. A fourth modality, a terminal UI (TUI), exists as an early stub in rust/tui-app but isn't functional yet.

The best way to run the CLI or GUI is to clone this Git repository and build from source, which requires the Rust toolchain. Install the rustup tool according to the Rust official docs, then run rustup toolchain install stable to install the latest stable version of the Rust build tool cargo.

The specific build commands are encoded in the project's justfile.

To compile and run the CLI, run:

$ just cli -s <store-path>

To compile and run the GUI, run:

$ just gui -s <store-path>

<store-path> should be a path to a non-existent directory somewhere convenient on your file system, that will serve as the node store on a PC system. Synchronicity will create the node store directory and populate it with necessary files on first launch.

The node store contains all the data that defines a Synchronicity instance. Only one instance of synchronicity should run using the same node store at the same time. Running two or more instances of synchronicity on the same physical machine with different node stores, looks identical to running those same nodes on different hardware.

The Android build can be compiled with an appropriate Android toolchain and loaded onto a real Android device or emulator; but the easiest way to install it is to use one of the debug build APK packages that are built by CI. You can directly sideload this APK onto an Android phone; or you can use an alternative app store such as Obtanium to install and update APKs directly from the release URL. With Obtanium specifically, use https://code.everydayimshuflin.com/greg/synchronicity as the source URL, and make sure to set the Override source to "Forgejo (Codeberg)", and set the "Include preleases" option.

Initializing an ensemble

Once you have one or more instances of synchronicity running, you will need to set an ensemble key. Your ensemble key is a private key, represented as a sequence of randomly-generated English words, that defines the ensemble of nodes controlled by a single human user. An example ensemble key is silk-impotent radiation-frustrate parkway-entrap imitate-icy (do not use this public example key yourself). It is analogous to the BIP39 keyphrase of a Bitcoin wallet, although using a different format. Keep it secure and secret, and consider storing it in a password manager or other secure secret storage method.

Upon starting up a new GUI or Android node, the welcome screen will invite you to either generate a new ensemble key or to initialize a node with an existing ensemble key. The first time you run a Synchronicity node, generate an ensemble key and then immediately use it to initialize a node. For any additional nodes you initialize, input that same ensemble key directly. The only time you will need to have access to the ensemble key is when you initialize a new node, or (rarely) perform global node-related management like marking a specific node you don't have access to as compromised.

Once you've initialized a node, the node will generate a node-specific public-private keypair that never leaves the node hardware; this key encrypts and decrypts traffic to/from all other nodes in the ensemble. You can look at the "Ensemble" screen to see information about all nodes that your node can reach (note that this functionality is not currently well-tested; there are likely node reachability bugs).

Usage

A lot of functionality is not implemented yet, but there's a few things working that you can play around with. Try navigating to the Documents screen and importing files from your local machine into Synchronicity - static images, PDFs, and music or audio files are good things to try importing and then viewing. Or try using the Podcast screen to search for and listen to a podcast.

Project Structure

Here's a brief overview of the project files in this repo:

  • android/ - the Android modality, mostly in Kotlin
  • rust/ - A Rust-language workspace containing several Rust crates:
    • rust/cli-app - the CLI modality
    • rust/gui-app - the desktop GUI modality. Currently written using the gpui GUI library
    • rust/syn-daemon - common code for the daemon component of the CLI and GUI modalities
    • rust/tui-app - the TUI modality; not much has been implemented here yet
    • rust/lib - Common code imported by every modality (CLI, GUI, TUI, and Android). The bulk of Synchronicity's functionality lives here
    • uniffi-bindgen - auto-generated Kotlin/Rust binding code, via uniffi-rs
    • rust/Cargo.toml - the workspace Cargo.toml file for the entire project. Contains the bulk of the common dependencies.
  • docs/ - Design documents, some of which are out-of-date
  • scripts - a few basic build and CI scripts
  • assets - the program icon, and other assorted program assets

Inspirations and Prior Art

S
Description
Personal data store project
Readme
664 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 78.6%
Kotlin 14.5%
Slint 3.6%
Python 1%
HTML 0.8%
Other 1.4%