tangle


git clone https://radroots.dev/git/tangle.git
Log | Files | Refs | README | LICENSE

README.md (2329B)


      1 # Tangle
      2 
      3 A Nostr relay for collaborative farming and local food communities.
      4 
      5 **What it does:** Tangle is a multi-tenant Nostr relay that routes requests to tenants by hostname. Each tenant has its own relay URL, Pocket store, resource and rate limits, and optional NIP-29 groups.
      6 
      7 **[Getting started](#getting-started)**
      8 | [Docs](https://radroots.dev/docs)
      9 | [Config](config/)
     10 | [Releases](https://radroots.dev/downloads/)
     11 | [License](#license)
     12 
     13 ## Getting started
     14 
     15 Install [Rust](https://rustup.rs/) and Git. The repository uses the toolchain pinned in [`rust-toolchain.toml`](rust-toolchain.toml).
     16 
     17 ```sh
     18 git clone https://radroots.dev/git/tangle.git && cd tangle
     19 
     20 cargo check --workspace --locked
     21 ```
     22 
     23 Copy the host and tenant config files:
     24 
     25 ```sh
     26 mkdir -p runtime/tenants
     27 
     28 cp config/tangle.host.example.json runtime/tangle.host.json
     29 cp config/tenants/farmers_market.example.json runtime/tenants/farmers-market.json
     30 ```
     31 
     32 Run the relay:
     33 
     34 ```sh
     35 cargo run -p tangle -- config validate --config "runtime/tangle.host.json"
     36 cargo run -p tangle -- tenant list --config "runtime/tangle.host.json"
     37 cargo run -p tangle -- run --config "runtime/tangle.host.json"
     38 ```
     39 
     40 Check readiness and the tenant's NIP-11 document:
     41 
     42 ```sh
     43 curl http://localhost:7070/.well-known/tangle/ready
     44 
     45 curl --header 'Accept: application/nostr+json' --header 'Host: relay.radroots.test' http://localhost:7000/
     46 ```
     47 
     48 ## Protocol support
     49 
     50 - **All tenants:** [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md), [NIP-11](https://github.com/nostr-protocol/nips/blob/master/11.md), [NIP-42](https://github.com/nostr-protocol/nips/blob/master/42.md), [NIP-45](https://github.com/nostr-protocol/nips/blob/master/45.md), and [NIP-70](https://github.com/nostr-protocol/nips/blob/master/70.md)
     51 - **Group-enabled tenants:** [NIP-29](https://github.com/nostr-protocol/nips/blob/master/29.md)
     52 
     53 ## Status
     54 
     55 Tangle is under active development. Interfaces and configuration may change.
     56 
     57 ## Acknowledgements 👋
     58 
     59 Tangle is a _mashup_ of:
     60 - `chorus` https://github.com/mikedilger/chorus
     61 - `zooid` https://gitea.coracle.social/coracle/zooid
     62 
     63 Thanks to [Mike](https://github.com/mikedilger) and [Jon](https://github.com/staab) for creating and open-sourcing these projects.
     64 
     65 ## License
     66 
     67 This repository is licensed under `AGPL-3.0-or-later`. See [LICENSE](LICENSE).