Skip to content

Repository files navigation

Relay Button

Local-first peer-to-peer apps you can keep, share, and use without depending on a permanent cloud backend.

A local-first peer-to-peer app still needs some infrastructure: devices behind firewalls need help finding each other, and shared data needs somewhere to stay available while everyone is offline. Relay Button is a button you put in your app that starts exactly that — an internet-reachable libp2p and OrbitDB relay on Aleph Cloud, paid from the user's own credits, and stopped again when the collaboration is over.

The relay helps peers connect and can pin shared data. It never becomes the owner of the app or its primary data.

Read the documentation → · Why this exists · Getting started

Quick start

Embedding the button takes one dependency and one component:

npm install @le-space/ui
<script>
  import SponsorRelayFab from '@le-space/ui/svelte'
</script>

<SponsorRelayFab manifestUrl="https://example.com/rootfs-manifest.json" />

React, props, theming, and driving the controller yourself are in Embed the Relay Button. Deploying from CI instead of a browser is in GitHub Action.

Pin a version. Releases are published under next and promoted to latest after consumer testing, so which tag is newer depends on where a release is in that cycle. npm view @le-space/ui dist-tags answers it for today.

Packages

All published under the @le-space/* scope.

Package What it owns Reference
shared-types Types and contracts shared across the workspace
core Deployment, runtime, CRN, guest and retention logic. Runs in Node and the browser Core
browser Browser-safe Aleph API, wallet transport, pricing, credits Browser
ui React and Svelte deployment UI UI
node Node entrypoints and GitHub Actions adapters Node CLI
rootfs RootFS planning, manifests, reference profile assets Rootfs contract
aleph-bootstrap Relay bootstrap registration and discovery Aleph bootstrap
playwright Reusable Playwright fixtures and relay lifecycle helpers Playwright testkit

How the layers are allowed to depend on each other, and what belongs in your app rather than here, is in Package Boundaries.

Working on this repo

pnpm install
pnpm test
Command Does
pnpm test Every package's test suite
pnpm --filter @le-space/core test One package
pnpm docs:dev Docs site with live reload
pnpm docs:build Docs build — fails on broken links
pnpm relay-button help The CLI wrapper around the Node runners
pnpm exec relay-button list-crns | jq Machine-readable output, no pnpm run banner

GitHub automation

The reusable workflow's inputs, outputs and artifact URLs are documented in Reusable workflow.

Notes

Support

If this repo helps your Aleph, libp2p, or deployment work, you can support it via GitHub Sponsors.

About

Aleph ReactJS/Svelte "Relay Button" Component and Github actions for RootFS creation, IPFS pinning and VM deployment

Topics

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages