Published npm package nostr-social-graph and its demo on https://search.iris.to

It builds a social graph from Nostr follow events. You can query followed users, followers and follow distances. You can change the graph root user, efficiently calculating new follow distances.

It maps public keys to integers as internal representation, consuming less memory and storage when serialized. My graph of 23 000 users and 120 000 follow relationships is 2.2 MB on disk.

The package also includes pre-crawled datasets of follows and profiles that you can optionally use. They're used on https://beta.iris.to and https://search.iris.to for hydrating the search index and profile cache.

https://beta.iris.to uses the social graph for filtering of replies and notification, so you don't need to see that reply guy again (unless he's followed by people you follow — need to add "muted by followed users" support).

https://www.npmjs.com/package/nostr-social-graph

https://github.com/mmalmi/nostr-social-graph

Reply to this note

Please Login to reply.

Discussion

👀

nostr:note1s02rgy0ldu2p09dnffcr66zd8lqf7tuetajktw3gxtj8u67kvkns60emsq

Looks great! What are the levels of trust? I see grey, purple and orange checkmarks for profiles. Is that based on the amount of mutual followers?

Just made it fetch missing follow lists from your follows when you change current user

identi fi

How about something like this to find people in your WoT you don’t already follow? It should help new users find people to follow.

https://nostrcheck.me/media/8c430bdaadc1a202e4dd11c86c82546bb108d755e374b7918181f533b94e312e/4f10b8ad65cacd49fd347c248f0286be2addcbfb7c155cfc10c59eb731bb031a.webp

For Nostr to grow we need more things like this and we need apps to use them so users don't need to discover on their own these third party services.

nostr:note1s02rgy0ldu2p09dnffcr66zd8lqf7tuetajktw3gxtj8u67kvkns60emsq

Amazing work, Martti! 🔥🔥🔥

I've built something similar in python using networkx.

Still to shitty to release

This looks really useful