Skip to content

Stream music and support artists directly with pay-per-stream on Web3.

Notifications You must be signed in to change notification settings

0xvikram/WalTune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 WalTune

Decentralized Music Streaming Platform

A revolutionary music streaming platform that empowers artists through direct micropayments, decentralized storage, and blockchain-powered transparency.

Sui Network Walrus Storage Next.js TypeScript


🎯 Problem Statement

Current music streaming platforms exploit creators:

  • Artists earn less than β‚Ή0.10 per stream
  • Payments delayed by 30-90 days
  • Platforms take 30-45% revenue cuts
  • No transparency or ownership for artists
  • Music stored on centralized servers with no proof of authenticity

πŸ’‘ Solution

WalTune revolutionizes music streaming with:

  • Walrus β†’ Decentralized audio storage with content addressing
  • Sui Blockchain β†’ Smart contracts for artist identity, song registry, and payments
  • Direct Micropayments β†’ Pay-per-play model with instant artist earnings
  • No Middlemen β†’ Artists keep their earnings, listeners pay fair prices

The Model

Listener loads wallet β†’ Plays song β†’ Instant micropayment β†’ Artist receives funds

No subscriptions. No intermediaries. Just fair, transparent creator monetization.


✨ Features

🎀 For Artists

  • On-chain Identity: Register as an artist with immutable blockchain records
  • Upload Songs: Store audio files on Walrus (decentralized, permanent storage)
  • Set Your Price: Define per-play cost (e.g., β‚Ή0.05 per stream)
  • Real-time Earnings: Receive instant micropayments for every play
  • Full Transparency: Track all plays and earnings on-chain

🎧 For Listeners

  • Simple Wallet Loading: Preload balance for seamless streaming
  • Pay Per Play: Only pay for what you listen to
  • Support Artists Directly: 100% of streaming fees go to creators
  • Transparent History: View all your plays and payments

πŸ—οΈ Platform Features

  • Fully decentralized audio storage
  • Smart contract-based payment routing
  • Trustless micropayments
  • Modern, intuitive music player UI
  • Mobile-responsive design

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      FRONTEND           β”‚
β”‚   Next.js + Sui SDK     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚
            β”‚ API Calls
            β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚       BACKEND           β”‚
β”‚  Node.js + TypeScript   β”‚
β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
      β”‚            β”‚
      β”‚            β”‚
β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  WALRUS    β”‚  β”‚ SUI NETWORK β”‚
β”‚  Storage   β”‚  β”‚  Contracts  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   β”‚                   β”‚
   β”‚   Audio Files     β”‚  Metadata
   β”‚   (Decentralized) β”‚  Payments
   β”‚                   β”‚  Identity

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Sui Wallet
  • Walrus testnet access

Installation

  1. Clone the repository

    git clone https://github.com/Vikram-Singh0/WalTune.git
    cd WalTune
  2. Setup Backend

    cd backend
    npm install
    cp .env.example .env
    # Configure your environment variables
    npm run dev
  3. Setup Frontend

    cd frontend
    npm install
    cp .env.example .env.local
    # Configure your environment variables
    npm run dev
  4. Deploy Contracts (Optional)

    cd contracts
    sui move build
    sui client publish --gas-budget 100000000

Environment Variables

Backend (backend/.env):

PORT=3001
WALRUS_PUBLISHER_URL=https://publisher.walrus-testnet.walrus.space
WALRUS_AGGREGATOR_URL=https://aggregator.walrus-testnet.walrus.space
WALRUS_EPOCHS=5
SUI_NETWORK=testnet

Frontend (frontend/.env.local):

NEXT_PUBLIC_SUI_NETWORK=testnet
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_SUI_RPC_URL=https://fullnode.testnet.sui.io:443

πŸ“ Project Structure

WalTune/
β”œβ”€β”€ frontend/              # Next.js frontend application
β”‚   β”œβ”€β”€ app/              # App router pages
β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”œβ”€β”€ lib/             # Utilities and configurations
β”‚   └── types/           # TypeScript type definitions
β”‚
β”œβ”€β”€ backend/              # Node.js backend service
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/ # API controllers
β”‚   β”‚   β”œβ”€β”€ routes/      # Express routes
β”‚   β”‚   β”œβ”€β”€ services/    # Business logic
β”‚   β”‚   β”œβ”€β”€ sui/         # Sui blockchain integration
β”‚   β”‚   └── walrus/      # Walrus storage integration
β”‚   └── package.json
β”‚
└── contracts/            # Sui Move smart contracts
    β”œβ”€β”€ artist.move      # Artist registration & identity
    β”œβ”€β”€ song_registry.move # Song metadata & tracking
    └── payment.move     # Micropayment logic

πŸ”§ Tech Stack

Blockchain & Storage

  • Sui - High-performance blockchain
  • Move - Smart contract language
  • Walrus - Decentralized storage network

Frontend

Backend

  • Node.js - Runtime environment
  • Express - Web framework
  • TypeScript - Type safety
  • Walrus SDK - Storage operations
  • Sui SDK - Blockchain interactions

🎬 How It Works

1. Artist Registration

sequenceDiagram
    Artist->>Frontend: Connect Wallet
    Frontend->>Smart Contract: Register Artist
    Smart Contract->>Blockchain: Create Artist Record
    Blockchain-->>Artist: Artist ID Created
Loading

2. Song Upload

sequenceDiagram
    Artist->>Frontend: Upload Audio File
    Frontend->>Backend: Send File
    Backend->>Walrus: Store Audio
    Walrus-->>Backend: Blob ID
    Backend->>Smart Contract: Register Song
    Smart Contract-->>Artist: Song Published
Loading

3. Song Play & Payment

sequenceDiagram
    Listener->>Frontend: Play Song
    Frontend->>Smart Contract: Process Payment
    Smart Contract->>Artist: Transfer Micropayment
    Frontend->>Walrus: Stream Audio
    Walrus-->>Listener: Audio Stream
Loading

πŸ› οΈ Development

Run Tests

# Backend tests
cd backend
npm test

# Contract tests
cd contracts
sui move test

Build for Production

# Frontend
cd frontend
npm run build

# Backend
cd backend
npm run build

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ by Vikram for creators and music lovers

Empowering artists through decentralization

Website β€’ Documentation β€’ Demo

About

Stream music and support artists directly with pay-per-stream on Web3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages