SONIC is a decentralized audio tokenization platform that empowers creators to securely store, tokenize, and monetize their audio assets on the blockchain. Built on Flow blockchain with IPFS storage via Lighthouse SDK, SONIC enables creators to mint NFTs from their audio content while maintaining privacy and ownership rights.
- π Secure Audio Storage: Client-side encryption with decentralized IPFS storage
- π¨ NFT Minting: Tokenize audio assets as NFTs on Flow blockchain
- π€ Identity Verification: Human identity verification for authentic creators
- π Rich Metadata: Store demographic and audio attributes
- π Dual Interface: Separate portals for creators and consumers
- π° Monetization: License and sell audio assets with smart contracts
graph TB
A[Frontend Interface] --> B[Express API Server]
B --> C[Flow Blockchain]
B --> D[Lighthouse IPFS]
B --> E[Verification Service]
C --> F[AudioNFT Smart Contract]
D --> G[Encrypted Audio Storage]
SONIC/
βββ π backend/ # Backend services and smart contracts
β βββ π src/ # Source code
β β βββ π controllers/ # API route handlers
β β β βββ π audioController.js # Audio upload & NFT minting
β β β βββ π nftController.js # NFT management
β β β βββ π verificationController.js # Identity verification
β β βββ π services/ # Business logic layer
β β β βββ π flow-service.js # Flow blockchain integration
β β β βββ π lighthouse-service.js # IPFS storage service
β β β βββ π VerificationServices.js # Identity verification logic
β β βββ π models/ # Data models
β β β βββ π User.js # User data model
β β β βββ π DocumentProcessor.js # Document processing
β β βββ π middleware/ # Express middleware
β β β βββ π errorHandler.js # Global error handling
β β β βββ π validation.js # Request validation
β β βββ π utils/ # Helper functions
β β β βββ π constants.js # Application constants
β β β βββ π helpers.js # Utility functions
β β β βββ π logger.js # Logging utility
β β βββ π config/ # Configuration files
β β β βββ π database.js # Database configuration
β β β βββ π flow.json # Flow blockchain config
β β β βββ π multer.js # File upload config
β β βββ π server.js # Main server entry point
β βββ π contracts/ # Cadence smart contracts
β β βββ π AudioNFT.cdc # Audio NFT smart contract
β βββ π scripts/ # Deployment & utility scripts
β β βββ π deploy.js # Contract deployment
β β βββ π testMint.js # Testing script
β βββ π tests/ # Test files (to be added)
β βββ π docs/ # Backend documentation
β β βββ π API.md # API documentation
β βββ π package.json # Backend dependencies
β βββ π .env.example # Environment variables template
β
βββ π frontend/ # Frontend application (React/Next.js)
β βββ π src/ # Source code
β βββ π package.json # Frontend dependencies
β βββ π .env.example # Frontend environment template
β
βββ π docs/ # Project documentation
β βββ π API-Spec.md # API specifications
β
βββ π README.md # This file
βββ π LICENSE # MIT License
βββ π .gitignore # Git ignore rules
- Runtime: Node.js with Express.js
- Blockchain: Flow blockchain with Cadence smart contracts
- Storage: IPFS via Lighthouse SDK
- File Upload: Multer for handling audio files
- Authentication: Custom verification service
- Framework: React/Next.js (planned)
- Wallet Integration: Flow wallet connectivity
- UI/UX: Modern responsive design
- Language: Cadence (Flow blockchain)
- Standard: NonFungibleToken interface
- Features: Audio NFT minting with metadata
- Node.js (v16 or higher)
- npm or yarn
- Flow CLI (for smart contract deployment)
- Lighthouse API key
-
Clone the repository
git clone https://github.com/your-username/SONIC.git cd SONIC -
Backend Setup
cd backend npm install # Copy and configure environment variables cp .env.example .env # Edit .env with your configuration
-
Frontend Setup
cd ../frontend npm install # Copy and configure environment variables cp .env.example .env # Edit .env with your configuration
# Flow Configuration
FLOW_NETWORK=testnet
FLOW_RPC_URL=https://access-testnet.onflow.org
FLOW_PRIVATE_KEY=your_flow_private_key_here
FLOW_CONTRACT_ADDRESS=your_contract_address_here
# Lighthouse Configuration
LIGHTHOUSE_API_KEY=your_lighthouse_api_key_here
# API Configuration
PORT=3001-
Start the Backend Server
cd backend npm run devThe API server will start on
http://localhost:3001Available endpoints:
- Health check:
GET /health - Audio upload:
POST /api/audio/upload - NFT minting:
POST /api/audio/mint - User verification:
POST /api/verification/initiate
- Health check:
-
Deploy Smart Contracts (First time only)
cd backend npm run deploy -
Test the API (Optional)
cd backend npm test
-
Start the Frontend (When available)
cd frontend npm run dev
GET /healthReturns the status of all services.
POST /upload-and-mint
Content-Type: multipart/form-data
Parameters:
- audio: Audio file (up to 50MB)
- metadata: JSON string with audio metadataPOST /verify-identity
Content-Type: multipart/form-data
Parameters:
- documents: Identity verification documents
- userData: User information JSON- Work primarily in the
/backenddirectory - Develop and test Cadence smart contracts
- Implement API endpoints for frontend consumption
- Handle IPFS storage and encryption
- Manage identity verification workflows
- Work primarily in the
/frontenddirectory - Implement user interfaces for creators and consumers
- Integrate with backend APIs
- Handle wallet connections and transactions
- Create responsive and intuitive UX
- Use feature branches for development
- Create pull requests for code review
- Update API documentation in
/docs/API-Spec.md - Follow conventional commit messages
- Test thoroughly before merging
# Backend tests
cd backend
npm test
# Smart contract tests
flow testThe AudioNFT.cdc contract implements:
- NFT Standard: Follows Flow's NonFungibleToken interface
- Metadata Storage: Rich metadata including IPFS CID and audio attributes
- Minting: Controlled minting with verification
- Events: Comprehensive event logging for transparency
mintNFT(): Mint new audio NFT with metadataborrowAudioNFT(): Borrow reference to audio NFTgetMetadata(): Retrieve NFT metadata
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Use ESLint for JavaScript code formatting
- Follow Cadence best practices for smart contracts
- Write clear, descriptive commit messages
- Add tests for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- π§ Email: support@sonic-platform.com
- π¬ Discord: Join our community
- π Documentation: Full docs
- π Issues: GitHub Issues
- Complete frontend implementation
- Advanced audio analytics
- Multi-chain support
- Mobile application
- Marketplace features
- Creator royalty system
Built with β€οΈ by the SONIC Team
Empowering creators through decentralized audio tokenization