Inspiration
We love freedom tech and hate that being smart in quiz apps only makes them money. QuizNutz runs on Nostr and Cashu so your genius actually fills your wallet, not just some VC's yacht fund. Nostr is THE open protocol of communication: it fosters a Bitcoin circular economy and is a driver for p2p electronic cash on Lightning and Cashu rails, while at the same time liberating human interaction from the walled gardens of centralized platforms.
What it does
As a quizmaster you can create a quiz and fund it with some cashu as a prize. Then you send the invite link to your friends or let them scan the QR code. They can easily join your quiz, either using their nostr for login or by creating a temporary account. Once you start the quiz, the timer starts for the first question and everyone has their chance to answer. Once the last question is answered, you see the score board and can claim your cashu prize.
How we built it
- Backend: Elixir (based on some previous work for a podcast site with nostr sign in and cashu tips)
- Frontend: HTML, CSS, server-side rendering in Elixir + some JS for Nostr integration.
- Implemented the Quiz logic
- Added Cashu token claim functionality
- Vibe coded an Outrun inspired UI theme
Challenges we ran into
Identifying users: Nostr is the obvious choice and we had the ability to build on some existing Elixir code that works with browser extensions like alby and nos2x-fox on desktop. However, having an frictionless onboarding for mobile users was a bit more challenging. Amber is a nostr key management and signing app for Android, but not on Google play. On iOS we tried nsec.app, but the flow on how to connect with our web app wasn't clear and for the sake of time didn't investigate further. Therefore we chose also to enable temporary user IDs for users that cannot easily login using a signing app. These temporary users can provide an npub to fetch their user name. We think that the UX flow for a beginner, that is not already familiar with these signing apps, is not straight forward.
Payment integration: Having native lightning integration would be nice, but setting up a proper lightning node or a BTCPay Server would be out of scope for a quick hackathon. Therefore we decided to go with Cashu as an alternative, as it abstracts away the lightning complexity (we can use existing mints) and provides an easy workflow for the quizmaster to fund the game by sending ecash to server and for participants to claim their funds, by copy/pasting the token to their own wallet. The Elixir cashu implementation that we used was a bit outdated though and didn't use the latest Cashu v4 token spec, so we had to upgrade it to work with the new CBOR encoding.
Accomplishments that we're proud of
In a short time frame we were able to build a fun little quiz engine, that might come in handy for anyone who wants to organize a trivia at a meetup, conference or wants to play remotely with friends and family around the world. With Nostr and Cashu we built it on the accessible and frictionless freedom tech we already love.
What we learned
Coffee and commitment are the high-energy fuel for a hacking sprint.
What's next for QuizNutz
Going viral!
Built With
- cashu
- claude
- css
- elixir
- html
- javascript
- nostr
- phoenixliveview
Log in or sign up for Devpost to join the conversation.