Music streaming platform where songs are tradeable tokens on Flow blockchain. Uses bonding curves for price discovery - similar to pump.fun but for music.
Artists upload songs that become fungible tokens. Fans buy/sell these tokens on a bonding curve. Token holders can stream the full song, non-holders get 30-second previews.
- Frontend: Next.js 15.3 with React 19
- Blockchain: Flow (testnet:
0x8b62f2389c34a040) - Storage:
- Storacha (web3.storage) for IPFS metadata and cover art
- AWS S3 + CloudFront for audio files (current)
- FilCDN for decentralized audio (experimental)
- Package Manager: Bun
flowaido/
├── packages/
│ └── flowaido-nxt/ # Next.js frontend + everything
│ ├── src/
│ │ ├── app/ # Next.js app router pages
│ │ ├── components/ # React components
│ │ ├── services/ # Business logic
│ │ │ ├── flow.ts # Flow blockchain interactions
│ │ │ ├── audio.ts # Audio streaming
│ │ │ ├── storacha.ts # IPFS via Storacha
│ │ │ └── filcdn.ts # FilCDN integration
│ │ └── config/
│ │ └── flow.ts # FCL configuration
│ └── contracts/ # Flow smart contracts (moved here for hackathon)
│ └── flowaido/
│ └── cadence/
│ ├── contracts/
│ │ └── SongTokenFactory.cdc
│ └── transactions/
└── packages/back/ # AWS Lambda backend (legacy)
Located in packages/flowaido-nxt/contracts/flowaido/cadence/:
SongTokenFactory.cdc- Main contract that creates song tokens with bonding curves- Each song gets 1 billion tokens (800M on curve, 200M reserved)
- 0.05 FLOW to deploy a song
- Graduates to DEX at 1725 FLOW market cap
- Upload: Artist uploads song via
/createor/uploadpage - Storage:
- Audio goes to AWS S3 (CloudFront CDN) or FilCDN
- Metadata and cover art go to IPFS via Storacha
- Deploy: Creates token on Flow blockchain with bonding curve
- Trade: Users buy/sell tokens, price follows curve
- Stream: Token holders stream full song, others get preview
# Install dependencies
bun install
# Run frontend
cd packages/flowaido-nxt
bun run dev
# Deploy contracts (need Flow CLI)
cd contracts/flowaido
flow deploy --network=testnetCreate .env.local:
# Flow
NEXT_PUBLIC_FLOW_NETWORK=testnet
NEXT_PUBLIC_SIGNER_URL=https://etfr2ptpuwrm7zsznt2oxl7c640gldoc.lambda-url.us-east-1.on.aws/
NEXT_PUBLIC_AUDIO_CDN_URL=https://d2yhbp3tmn83h0.cloudfront.net
# Storacha (IPFS)
NEXT_PUBLIC_STORACHA_EMAIL=your-email@example.com
# WalletConnect
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=719d0ccc89683c6417332eec3961fc8d
# FilCDN (optional)
PRIVATE_KEY=your-ethereum-private-key
RPC_URL=https://rpc.ankr.com/filecoin_testnet/your-keysrc/services/flow.ts- All blockchain interactionssrc/services/storacha.ts- IPFS uploads via Storachasrc/services/audio.ts- Audio streaming logicsrc/app/trending/page.tsx- Main marketplacesrc/components/TokenGatedAudioPlayer.tsx- Audio player with token checks
POST /api/audio/stream- Get signed URL for audio streaming (checks token balance)GET /api/placeholder/:size- Generate placeholder images
- ✅ Deployed on Flow testnet
- ✅ Songs can be created and traded
- ✅ Token-gated streaming works
- ✅ Storacha integration for IPFS
- 🚧 FilCDN integration (experimental)
- 🚧 Wallet connection issues being debugged
- Contracts moved to this repo to make it a monorepo for hackathon submission
- Using Storacha (evolution of web3.storage) for IPFS - handles metadata and cover art
- Audio files currently on AWS, FilCDN integration in progress
- Flow uses Cadence 1.0 (upgraded Sept 2024)