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