postiz-app icon indicating copy to clipboard operation
postiz-app copied to clipboard

New Provider: nostr Support

Open patrickulrich opened this issue 11 months ago • 3 comments

🔖 Feature description

This feature request proposes adding support for Nostr to Postiz, enabling users to schedule and publish content directly to their Nostr profiles.

🎤 Why is this feature needed ?

Nostr is an open platform used by users across the world. I don't want to miss out on reaching them.

✌️ How do you aim to achieve this?

Nostr Authentication: Allow users to connect their Nostr private keys to Postiz securely.

Content Publishing: Enable scheduling and publishing of text notes, images, and other supported Nostr/blossum content types.

Relay Selection: Provide options for users to select their preferred Nostr relays and blossum servers or use a default set.

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

  • [X] I checked and didn't find similar issue

Are you willing to submit PR?

None

patrickulrich avatar Jan 02 '25 06:01 patrickulrich

I tried to implement it, but it looks very complicated, can you simplify the steps for us?

nevo-david avatar Jan 02 '25 12:01 nevo-david

Nostr accounts are simply public/private keypairs. Signatures, public keys, and encodings use the Schnorr signature standard on the curve secp256k1. With a private key, users can sign different event types and publish them to relays via WebSockets. Other users then download these events using Nostr clients that follow the same standard. You can learn more about the protocol at https://nostr.com/protocol.

For implementation, I recommend starting with the basic event type (NIP-01) for short-form content. Over time, you could expand to additional event types like long-form posts (NIP-23) or picture feeds (NIP-68).

To make signing events easier, you can use tools like:

For user signing, I suggest implementing NIP-46. This enables users to securely sign messages without exposing their private keys to Postiz. While this adds some complexity, it will appeal to users managing sensitive services (e.g., financial or health records) with their nostr keys. For a simpler initial implementation, you could allow users to provide their private key in a config file, though this approach may not suit all users.

patrickulrich avatar Jan 02 '25 15:01 patrickulrich

It's pretty complicated, are you open to make a pull request @saulteafarmer

nevo-david avatar Jan 06 '25 14:01 nevo-david