Ruulul / hyper-nostr

33 stars 9 forks source link

improve readme #2

Open melvincarvalho opened 1 year ago

melvincarvalho commented 1 year ago

just leaving this boilerplate here, not sure how accurate it is:

Hyper-Nostr Relay

Hyper-Nostr Relay is a WebSocket-based relay server for creating and managing distributed swarms using the Hyper SDK. It allows you to send and receive events in a decentralized manner with ease.

Features

Getting Started

To get started, you can run the Hyper-Nostr Relay server with the desired port and an optional list of starting topics:

$ hyper-nostr [port] [startingTopics...]

For example:

$ hyper-nostr 3000 topic1 topic2

WebSocket API

Clients can connect to the Hyper-Nostr Relay server using WebSockets and send messages with the following structure:

Upon receiving messages from clients, the server will respond with appropriate messages:

License

?

Ruulul commented 1 year ago

I see you specified the API, but it is mostly what NIP-01 already specifies (with the exception of the OK message and COUNT message, that is another NIP), do you think I should include on this readme anyway?

melvincarvalho commented 1 year ago

Completely up to you. It was mostly auto generated code to try and understand the steps to take, because that was unclear. I dont know how much of that readme makes sense, or even is useful ... hopefully some!

Ruulul commented 1 year ago

What do you think about this new beginning?

Hyper-Nostr Relay

Usage

The goal of this tool is to behave as a public relay; think of the chosen topic as a public relay, where you can send and receive notes from your peers!

  1. Install: npm -g hyper-nostr
  2. Run: hyper-nostr [port [...starting topics]] (default 3000)
  3. Add your relay as ws://localhost:[port]/[topic] in your Nostr client (I am using nostr as a topic to make some kind of generic swarm)
  4. Setup done!

    How it works

    Hyper-Nostr is a distributed nostr relay that syncs your relay storage and real time events through the Hyperswarm, linearizes the databases with Autobase, and uses a Hyperbeedee database (loosely based on MongoDB).

The hyperswarm and cores management was highly abstracted thanks to Hyper SDK.

benzmuircroft commented 8 months ago

@melvincarvalho @Ruulul see the other issues related to this titled Cook Book. This needs a nice big shiny readme 🤩 so many people start to use this!