Inspiration
We love the philosophy of Nostr as a decentralised social media protocol. However, we saw some difficulties that Nostr users can run into when using centralised Nostr clients and relay servers. We came up with some interesting ideas how we could leverage Internet Computer Protocol (ICP) to remove these risks or difficulties.
What it does
Nostric is a brand new Nostr client running on the Internet Computer. We have covered this basic functionality that most of the other Nostr clients have:
- Generate PK & SK
- Create & Update profile
- Publish posts
- Follow people
- See the feed
As this is a Hackathon submission, we wanted to dig deeper into what is technically possible and push limits forward. So we implemented some interesting features:
vetKeys integration – we use them to store encrypted private keys securely in the backend of the app – great for security and user experience as well.
Nostric Pro
- Each Nostric Pro user gets it's own canister ("server instance") and then each post of the user gets stored in the smart contract and can be stored there forever (if user covers the costs).
- Payment is done through ckBTC ("wrapped" Bitcoin on the ICP very fast and cost efficient).
- Canister also becomes personal relay server – only the owner can publish posts through this canister and followers can be 100 % sure they will always get the content of this user (no spam, no censorship).
Disclaimer Many of the features we implemented are still in beta and can become unavailable or change in upcoming days. We recommend to use our app only with testing data.
How we built it
Firstly we did a research of the technology available in the ICP stack, then we created a design on a paper that described what features our project should have. Then we build a PoC application.
We used Svelte as a frontend framework and backend is written in combination of Motoko and Rust.
Challenges we ran into
We had many challenges that came to our way. To mention a few, it was not easy to understand how traditional Nostr relays and clients work as it is still not documented very well. Then we started experimenting with web sockets in the ICP and realised it only works in rust so we had to learn rust and implement the multi-canister infrastructure in it. Then, we have to rewrite nostr-tools library to be able to support version of ICP web sockets. We also struggled a lot with web sockets gateway that is still in beta.
Accomplishments that we're proud of
With features that we implemented users can become owners and get a control over their data as standard Nostr relay servers can become unreliable. We are also proud in general what we were able to do during 1 month while all of us have another full-time job.
What we learned
We learned a lot about Nostr protocol in general. Also we learned how to build multi-canister architecture and spawn canisters dynamically for each Pro user after the payment was verified in the ledger canister. We also learned a lot about web sockets.
What's next for Nostric
There is a lot to cover:
- Serving media fiels (we actually wanted to do it as another Nostric pro feature but didn't have time for it)
- Polish and properly test current features...
- Improve UX
- Improve branding and design
- Add important features (like, comment, share other posts)
- Chat messagess
Built With
- icp
- internetcomputer
- motoko
- rust
- svelte
- typescript
- websockets

Log in or sign up for Devpost to join the conversation.