I have a specific requirement for zap.store that no relay provides out of the box, custom indexing multiple fields for NIP-50 full-text search (and rejecting certain event kinds).

I thought of customizing the fiatjaf golang relay framework but didn't want to learn new tooling just for this.

nostr:npub1gzuushllat7pet0ccv9yuhygvc8ldeyhrgxuwg744dn5khnpk3gs3ea5ds pointed me at Bun.sh which is a powerful JS toolkit with built-in websockets and sqlite, and I basically got a relay implemented in under a day... very cool.

This will eventually index all software releases on zap.store, and I'm thinking of making this same server implement nostr:npub1ye5ptcxfyyxl5vjvdjar2ua3f0hynkjzpx552mu5snj3qmx5pzjscpknpr-Blossom, keeping copies of all the indexed artifacts.

#zapstore

Reply to this note

Please Login to reply.

Discussion

That's neat sir! 👀👀👀

O fuk you did it! Amazing 🔥🔥🔥 are you gonna open source the relay code?

Yes for sure! It's quite custom and suboptimal code at the moment but good as reference

Amazing! definitely I will collaborate on the project 👌

I use it as a nodejs replacement but hadn't seen the web server framework stuff, nice!

Search is a big topic, we need to become much better with search. Especially profiles, content and custom fields.

You could also store the app releases on a blossom media server and just publish the sha256 hash.

Signed metadata is the most important thing but I also want to host files

Oh yes, bun.sh! It crossed by multiple times now and I've wrote down a todo to research this tool further.. Thx for the reminder, because https://bun.sh/docs/api/websockets#connect-to-a-websocket-server is really looking interesting to build a proof-of-concept Nostr client with it. My choice would be to include it in a Vue project as I'm familar with that framework.

And yes as you're saying, basicly you can also build a relay implementation with it...how cool!

https://bun.sh/docs/api/websockets#start-a-websocket-server

not sure it's meant to be used in the browser but for servers it's damn good!

For sure it's also meant for clients! 😉

Look at this list: #e97600aab8d8d5c3d290f881b39f7366631d159c0cdf20eb07cf2e154a25570c which could find at the bottom of https://bun.sh

Blossom + a configurable relay would be perfect for a self-hosted relay

🏴‍☠️