Inspiration

Imagine running a busy stall in a bustling market in Dakar. You are trying to sell goods to a crowd of people, and several transactions are happening at once. In Senegal and throughout West Africa, mobile payments are growing fast. However, for a busy merchant, verify these payments is a major headache.

A customer buys a bag of rice or some clothing, is supposed to make a payment, and shows you a screen. "Look, it's paid!" they say, flashing a screenshot or a confirmation page. You look, it seems okay, and you let them leave with your goods. But too often, you’ve been tricked by fake screenshots, altered confirmations, or a P2P notification that’s actually stuck on 'pending' or never meant to arrive.

Many small merchants can't afford to get rent physical, cellular payment boxes, which often come with high monthly fees. Instead, they’re forced to rely on visual proof, meaning they are constantly exposed to fraud. We knew there had to be a better way to check these incoming transactions, specifically built for our local workflows. That was the spark for Sovereign Soundbox: transform any cheap, everyday smartphone into an audio-confirmed payment terminal that refuses to play a confirmation sound unless there is hard, cryptographic verification of the transaction. No guess work, no relying on visual screens, and no monthly hardware fees.

What it does

Sovereign Soundbox is a voice-confirmed Point-of-Sale app designed for informal African retail merchants. At its heart, it has a simple but strict rule: Don't trust the screenshot. Trust the settlement.

When a buyer wants to pay, the merchant types in the amount in CFA Francs (XOF) on a simple digital keypad. The app immediately converts it to Bitcoin Satoshis based on the live exchange rate and fetches a real, unique BOLT11 Lightning invoice from the backend. A large, high-contrast QR code appears on-screen, and a countdown timer starts ticking.

The customer scans the QR and pays using their favorite Lightning wallet. This is where Sovereign Soundbox does things differently. It doesn’t just assume the transaction went through based on a timing window or a basic scan event. Instead, the backend uses a restricted, receive-only Nostr Wallet Connect (NWC) connection to directly inspect the merchant's wallet.

The software polls the invoice status, verifying that the exact requested amount has arrived and checking the cryptographic preimage on the blockchain. Once—and only once—the payment is proven as settled, the phone’s speaker calls out: "Paiement reçu : 5 000 francs CFA!" or "Jot naa 5 000 francs CFA!" in Wolof. If a payment is pending, fails, or expires, the system remains completely silent. It also has a built-in "Red-Team Security" simulator so the shop owner can test and see exactly how it blocks fake screenshots, unverified hold tricks, and duplicate replay attempts.

How we built it

We wanted a lightweight, bulletproof stack that doesn't need Docker or any bloated runtimes to load on an ordinary, budget smartphone over low-bandwidth mobile data.

  • Frontend: Built with React, TypeScript, and Vite, keeping things highly responsive. We styled the interface using Tailwind with a warm, Sahel-inspired color palette and included an interactive 3D virtual hardware preview (using three.js / React Three Fiber) that lets merchants and judges interact with the physical "device" interface.
  • Micro-Interactions & Animation: Smooth UI state transitions and tactile haptic button feedback are powered by Framer Motion, while the Web Audio API analyzes real-time audio frequencies during playback to animate a live acoustic waveform.
  • Localization: Hand-crafted translations across French, Wolof, and English, paired with custom speech synthesis and sequenced local audio files to ensure fast, reliable local language delivery.
  • Backend: A lightweight Node.js and Express server with a local SQLite database (via better-sqlite3) to handle user configs, secure encryption, and transaction logs without overhead.
  • Bitcoin & Lightning: Integrated via @getalby/sdk to handle NIP-47 Nostr Wallet Connect (NWC). The backend generates BOLT11 invoices via the wallet's make_invoice and polls state changes via lookup_invoice.
  • Security & Privacy: Enforced "Least-Privilege" access by blocking NWC permissions for sending or paying, leaving only invoice creation and status inspection enabled. We also used native AES-256-GCM to securely encrypt the NWC connection string on the server, ensuring secrets never leak to the client or console logs. All customer transactions are processed with Zero-PII, stripping phone numbers and IPs.

Challenges we ran into

Working on the Bitcoin Lightning Network in a live, real-time context is always tricky, especially when you can't guarantee a user’s internet won’t drop. Dealing with NWC (Nostr Wallet Connect) was particularly challenging because different wallet providers return slightly different payloads—some might not provide the exact transaction preimage or may normalize invoice states in slightly different ways. To solve this, we had to write a strict, custom data normalizer on our backend to test, parse, and enforce standard verification logic no matter which NWC-compliant provider the merchant connects.

Another major headache was handling audio autoplay on mobile devices. Browsers aggressively block audio that isn't directly triggered by a user tap, meaning background checks would fail to announce settlements. We solved this by unlocking the Web Audio API's AudioContext early—the exact moment the merchant taps "Generate Payment QR"—so the device is ready to play the sound automatically when the verified NWC settlement event finally lands, without browser blocks.

Finally, doing authentic, natural Wolof number and phrase synthesis was difficult without heavy runtime models. We had to write a custom natural linguistic engine that breaks down large cardinal numbers into their proper Wolof grammar equivalents, stitching phonetic audio fragments together locally for seamless, lag-free playback.

Accomplishments that we're proud of

First and foremost, we got a real, non-custodial Lightning verification system working and integrated correctly with Nostr Wallet Connect. Watching a live invoice scan trigger a localized audio response instantly when the sats hit the wallet—with no fake events, timing delays, or guesswork—feels incredibly satisfying.

We also managed to build a deep, production-ready interactive 3D digital-twin soundbox. It’s not just for looks; it responds in real-time to active payment states, pulsing amber on pending hold checks and flashing crimson on simulated fraud attempts. Getting the entire setup—complete with fully localized French, Wolof, and English translate triggers—running smoothly on standard, budget-focused mobile views is a huge milestone for our team.

What we learned

This project pushed us to understand NWC (NIP-47) on a much deeper level. We learned that while standard APIs make things easy, building decentralised, client-to-wallet payment systems requires writing lots of robust fallback, timeout, and reconnect mechanisms. A slight delay in a Nostr relay can disrupt the merchant's workflow if your application isn't built to handle WebSocket reconnects and verify states asynchronously.

We also learned the absolute importance of UX/UI simplicity when building for informal markets. Jargon like payment_hash, BOLT11, and preimages means nothing to a busy vendor in a rush. We learned to push all the cryptographic proofs and security check logs down into a collapsed "Security Check" drawer, keeping the main interface focused strictly on a big keypad, a large QR, and loud, local audio.

What's next for Sovereign Soundbox

Our next major goal is to take Sovereign Soundbox offline. We want to implement an offline fallback using Cashu (NUT-18) proximity transactions, enabling merchants to accept digital tokens via Bluetooth (BLE) or animated QR codes when they lose cell service or cellular data entirely, syncing with the mint once they get a signal.

We also plan to design and open-source a 3D-printable tabletop merchant mount. This will allow merchants to slide their everyday smartphone into a durable, visible countertop stand shaped like a physical payment soundbox, creating an even more familiar, trusted payment spot in busy markets. Finally, we want to roll out an offline Wolof voice pack to ensure merchants get flawless, high-quality indigenous audio without needing any external data to process, bringing voice-verified digital sovereignty to every small vendor.

Built With

Share this project:

Updates

Submission history