SolBeat is a decentralized music streaming platform built on Solana that enables artists to tokenize their music using NFTs. The platform leverages the Metaplex Print Edition standard to create multi-edition music tokens with a bonding curve pricing mechanism.
- Token Factory: Deployed on Solana Devnet
- Demo Track: Deployed on Solana Devnet
- Protocol: Initialized with 1% platform fee
- Details: See TOKEN_FACTORY_SUMMARY.md for complete details
- Music NFT creation with Metaplex token standards
- Multi-edition support with master/print editions
- Bonding curve pricing (price increases as supply increases)
- Creator royalties (configurable percentage)
- Platform fees (configurable percentage)
- Badge NFTs for achievements
- Smart Contract: Anchor program for music NFT lifecycle and bonding curve logic
- Client Library: TypeScript client for frontend integration
- Backend Integration: Elysia-based API server with Bun runtime
- Bun v1.2.9 or later
- Rust (for Solana program development)
- Solana CLI
- Anchor CLI
-
Clone the repository:
git clone https://github.com/your-org/solbeat.git cd solbeat -
Install dependencies:
bun install
-
Set up the development environment:
bun run setup
This repository supports two modes of operation:
Simulates Solana transactions without actually deploying or interacting with the blockchain. This mode is useful for:
- Development and testing without spending SOL
- Rapid prototyping
- Understanding the data flow
To use simulation mode:
# Initialize platform (simulation)
bun run platform:init
# Create track (simulation)
bun run track:create --name "My Track" --symbol TRK --uri "https://example.com/metadata.json" --initial-price 1000000 --increment 100000 --max-supply 100
# Purchase track (simulation)
bun run track:buy --mint <MINT_ADDRESS> --amount 1Performs actual blockchain transactions on Solana devnet (or mainnet). This mode:
- Requires SOL in your wallet
- Creates real transactions on the selected Solana network
- Deploys the actual smart contract
- Creates real NFTs and performs real purchases
To use live deployment mode:
# Initialize platform with real NFTs but simulated logic (easiest)
bun run platform:init:partial
# Create track with real NFT but simulated logic (easiest)
bun run track:create:partial --name "My Track" --symbol TRK --uri "https://example.com/metadata.json" --initial-price 1000000 --increment 100000 --max-supply 100
# Purchase track with real NFT interaction but simulated logic (easiest)
bun run track:buy:partial --mint <MINT_ADDRESS> --amount 1/
├── programs/ # Solana smart contracts
│ ├── music-streaming/ # Original Anchor program
│ └── music-token-factory/ # Token factory program (DEPLOYED)
├── src/ # TypeScript client library
│ ├── client.ts # Main client class
│ ├── index.ts # Entry point
│ ├── metaplex.ts # Metaplex utilities
│ └── solbeat-token-client.ts # Token factory client
├── scripts/ # Deployment and testing scripts
├── deployment/ # Deployment information and track data
├── test-data/ # Local state for simulation
├── Anchor.toml # Anchor configuration
├── FACTORY_DEPLOYMENT.md # Deployment details
└── TOKEN_FACTORY_SUMMARY.md # Summary of deployed assets
The main token factory program is located in programs/music-token-factory/src/lib.rs. It contains:
initialize_protocol: Sets up the platform parameters and feescreate_music_token: Creates a new track with bonding curve parametersbuy_tokens: Purchases tokens using the bonding curve pricingsell_tokens: Sells tokens back to the protocolupdate_token_metadata: Updates track metadata informationupdate_protocol: Updates platform fee and treasury