mirror of
https://github.com/nostrlabs-io/notepush.git
synced 2025-06-15 19:38:24 +00:00
zap_stream_modifications
Notepush
A high performance Nostr relay for sending out push notifications using the Apple Push Notification Service (APNS).
⚠️🔥WIP! Experimental!⚠️🔥
Installation
- Get a build or build it yourself using
cargo build --release
- On the working directory from which you start this relay, create the
config.yaml
file with the following contents:
# (Optional)
# APNs config to send notifications
apns:
# The path to the Apple private key .p8 file
key_path: my_key.p8
key_id: 1234567
team_id: 1248163264
environment: development
topic: com.your_org.your_app
# (Optional)
# FCM config to send notifications
fcm:
google_services_file_path: "./google-services.json"
vaapi_key: my_vaapi_pubkey
# (Optional)
# Public URL of this service
api_base_url: http://localhost:8000
# (Optional)
# Relay to pull profile data from (Mute lists)
relay_url: wss://relay.damus.io
# (Optional)
# The max age of the Nostr event cache, in seconds
nostr_event_cache_max_age: 600
# (Optional)
# Relays to pull events from
pull_relays:
- "wss://relay.damus.io"
- "wss://relay.primal.net"
- "wss://nos.lol"
- "wss://relay.snort.social"
- Run this relay using the built binary or the
cargo run
command. If you want to change the log level, you can set theRUST_LOG
environment variable toDEBUG
orINFO
before running the relay.
Example:
$ RUST_LOG=DEBUG cargo run
Contributions
For contribution guidelines, please check this document.
Development setup
- Install the Rust toolchain
- Clone this repository
- Run
cargo build
to build the project - Run
cargo test
to run the tests - Run
cargo run
to run the project
Testing utilities
You can use test/test-inputs
with a websockets test tool such as websocat
to play around with the relay. If you have Nix installed, you can run:
$ nix-shell
[nix-shell] $ websocat ws://localhost:8000
<ENTER_FULL_JSON_PAYLOAD_HERE_AND_PRESS_ENTER>
Description
Languages
Rust
99.8%
Nix
0.2%