A minimal music streaming client built with Next.js and the @wavlake/ecash SDK. Demonstrates ecash wallet integration, music browsing via the Wavlake catalog API, and audio playback.
- 🔑 Nostr Auth — Generate or import a Nostr keypair
- 💰 Ecash Wallet — Deposit credits via Lightning, view balance, manage Cashu proofs
- 🔍 Music Search — Browse Wavlake's catalog of tracks
- 🎵 Audio Playback — Stream tracks directly in the browser
- 🎨 Dark UI — Clean, minimal dark-themed interface
- Next.js 16 (App Router)
- @wavlake/ecash — Cashu ecash wallet SDK
- Tailwind CSS v4
- Wavlake Catalog API — Music content
- Node.js 18+
- npm
git clone https://github.com/wavlake/music-client-example.git
cd music-client-example
npm install --legacy-peer-depsNote:
--legacy-peer-depsis needed because the ecash SDK currently requires React 18, but Next.js 16 ships React 19.
npm run dev -- --webpackNote: The
--webpackflag is needed because the ecash SDK ships raw TypeScript files that require webpack'sextensionAliasconfig. Turbopack (Next.js 16 default) doesn't support this yet.
Open http://localhost:3000.
npx next build --webpack- Auth: Generate a Nostr keypair (stored in localStorage)
- Wallet: The app wraps everything in
<EcashProvider>from the ecash SDK, configured with a Cashu mint URL - Deposit: Use
useMint()to create a Lightning invoice, pay it, and mint ecash proofs - Browse: Search Wavlake's catalog API for tracks
- Play: Click a track to stream it via the
liveUrlfrom the API
The ecash SDK provides:
EcashProvider— React context with mint URL and storage configuseWallet()— Balance, proofs, add/remove/swap proofsuseMint()— NUT-04 deposit flow (create quote → pay invoice → mint proofs)createLocalStorageAdapter()— Browser storage for proof persistence
See DX-FRICTION-LOG.md for a detailed developer experience report.
- Payment for streams is not yet implemented (the SDK focuses on wallet operations, not content payments)
- The Wavlake catalog API is undocumented — endpoints were discovered by experimentation
- The ecash SDK ships raw TypeScript and requires special bundler configuration
MIT
