Your relay is awesome, its landing page should be too.
A nostr.watch R&D project made possible by OpenSats
![Screen Shot 2024-04-10 at 5 26 19 AM](https://private-user-images.githubusercontent.com/299465/321087798-338cd5d3-21a5-492a-8e2d-ac1d128acfa2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwMzM1MDUsIm5iZiI6MTcyNjAzMzIwNSwicGF0aCI6Ii8yOTk0NjUvMzIxMDg3Nzk4LTMzOGNkNWQzLTIxYTUtNDkyYS04ZTJkLWFjMWQxMjhhY2ZhMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkxMVQwNTQwMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04NzllYjRkZDZkODk4YTIzMzM5NGU0MDZiYzNkOTY1YTBhZDM5NjliMGU0MDZhYTYyNDY4MWQ4NGFhNzc5ZGE5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.0CPnk2IteZHmhpcnD7g9AMyEx9qza0ytLhrLaRLw7Zw)
That websocket URI representing your relay is floating all over the internet now. Its canonical https
shouldn't be a 500
, a blank page or some random page. + I both need to do this to eat my own dog food and it's something I've wanted to do since early 2023.
SvelteKit CSR site with SSR disabled that implements ndk
, nostr-zap
and @nostrwatch/nocap
. Utilizes NIP-65
, NIP-66
, NIP-78
and NIP-32
.
Why SvelteKit if no SSR?: No justification other than habit. Convert it in a PR and I won't complain.
You can preview your relay on myrelay.page and even edit it without building or deploying it through the netlify build (which is always latest). Important: Works for wss
relays only! Also see requirements for editing
https://relaypage.netlify.app/?url=$YOUR_RELAY_URL
for example
- general
-
tailwind
-
shadcn-svelete
UI components - progressive load w/skeletons
- NIP-07 support
- NIP-46 support
- mobile compat
- options generic
- manually set URL via
.env
for build-time URL setting for explicit control and unhandled edge-cases
-
- unique blocks
- nip-11
- operator profile/feed
- map
- relay feed
- speed test (need to patch @nostrwatch/nocap)
- repeatable blocks
- html
- image
- md
- feed
- stateful meta-data
- nip-11
- operator profile
- operator notes
- notes from relay
- long-form content feed
- NIP-19 encoded nevent jumps
- relay Geodata
- NIP-66 Monitor Data
- seen by monitors
- round-trip time of monitors
- map reactiveness
- ssl
- uptime
- parsing
- notes: images
- notes: videos
- notes: spotify
- notes: tidal
- notes: NIP-19 encoded
nostr:
links
- authed User Interactivity
- login
- add relay to relay list [
10002
] - zap relay operator
- follow relay operator
- "People you follow who are here"
- "Notes you have here"
- no-build customization via NIP-78
- general
-
theme import - show/hide blocks
- order blocks
- per block customization
- hide login
- disable join
-
- theming
- default runtime themes
- theme selection
- theme customization
- runtime-imported CSR blocks (svelte)
- http/https
- custom block imports
- custom block options
- git
- custom block imports
- custom block options
- blossom
- custom block imports
- custom block options
- http/https
- internationalization (i18n)
- i18n mapped language
- NIP-78 overrides
- general
early alpha, things will change, history will be full of haphazard commit messages, force pushes to reset history eminent ... but have at it.
pnpm install
pnpm build
Artifacts will end up in the build
directory. You just neeed to serve them.
docker build .
Image is not available on a registry yet
- To use the editor, you need to login with the pubkey listed in your NIP-11. The pubkey must be hex in alignment with NIP-11, not your NIP-19 encoded npub
myrelay.page
is self-configuring, you don't need to set a URL. In the event it is not working more than likely, it's one of the following causes:
- If you run a
wss
relay, you must serve myrelay.page fromhttps
, - if you run a
ws
(unsecured) relay, for instance from onion or a local relay, you must serve myrelay.page fromhttp
- You are not serving myrelay.page from the
https
url equivalent of your relay, see below if testing locally.
pnpm dev
You can show a myrelay.page for any relay from localhost
by appending ?url=wss://relay.snort.social
for instance.
Depending on your relay software, you'll need to do some proxying to direct websocket, NIP-11 and/or NIP-05 traffic to your relay, and http(s)
traffic without application/nostr+json
to the myrelay.page static path or port.
- strfry: see
caddy/strfry/Caddyfile
- nostream: soon
- nostr-rs-relay: soon
soon
soon