NeuralChain Inference is the first decentralized AI inference engine built on Solana. Pay with crypto tokens to run powerful AI models without intermediaries, censorship, or platform lock-in. ✨ Key Features
🤖 AI-Powered: Sentiment analysis using state-of-the-art transformer models ⚡ Lightning Fast: Solana blockchain enables sub-second confirmations 💰 Pay-Per-Use: Only pay for what you use - no subscriptions 🔒 Trustless: Smart contracts ensure fair pricing and execution 🌐 Open Source: Fully transparent and community-driven 🛡️ Decentralized: No single point of failure or control
🎯 Use Cases
📊 Traders: Analyze crypto Twitter sentiment for trading signals 🛍️ E-commerce: Process customer reviews at scale 📰 Media: Monitor brand sentiment in real-time 🎮 Gaming: Moderate user-generated content 💼 Business: Analyze customer feedback
┌─────────────┐ ┌──────────────┐ ┌─────────────┐ │ User │────────▶│ Frontend │────────▶│ Phantom │ │ Interface │ │ (React) │ │ Wallet │ └─────────────┘ └──────────────┘ └─────────────┘ │ │ ▼ ▼ ┌──────────────┐ ┌─────────────┐ │ FastAPI │────────▶│ Solana │ │ Backend │ │ Blockchain │ └──────────────┘ └─────────────┘ │ ▼ ┌──────────────┐ │ AI Model │ │ (Transformers)│ └──────────────┘
Quick Start Prerequisites
Python 3.9+ Node.js 16+ Solana CLI Phantom Wallet
Installation bash# Clone the repository git clone https://github.com/NeuralChain-Protocol/neuralchain-inference.git cd neuralchain-inference
pip install -r requirements.txt
cd frontend npm install cd ..
cp .env.example .env
cd api uvicorn main:app --reload
cd frontend
npm run dev
Quick Test
bash# Test the API
curl -X POST "http://localhost:8000/api/v1/analyze"
-H "Content-Type: application/json"
-d '{"text": "I love this product! Amazing quality!"}'
💻 Usage API Example pythonimport requests
response = requests.post( "https://api.neuralchain.tech/v1/analyze", json={"text": "This is amazing!"}, headers={"Authorization": "Bearer YOUR_API_KEY"} )
result = response.json() print(f"Sentiment: {result['sentiment']}") print(f"Confidence: {result['confidence']}") Smart Contract Integration javascriptimport { Connection, PublicKey } from '@solana/web3.js'; import { Program, AnchorProvider } from '@project-serum/anchor';
// Connect to Solana const connection = new Connection('https://api.devnet.solana.com');
// Call inference const tx = await program.methods .requestInference("Your text here") .accounts({ user: wallet.publicKey, // ... other accounts }) .rpc();
console.log("Transaction:", tx); Frontend Integration javascript// Connect wallet const connectWallet = async () => { if (window.solana) { await window.solana.connect(); return window.solana.publicKey; } };
// Analyze sentiment const analyzeSentiment = async (text) => { const response = await fetch('/api/analyze', { method: 'POST', body: JSON.stringify({ text }), headers: { 'Content-Type': 'application/json' } }); return await response.json(); };
📊 Pricing Model TypeCost per RequestResponse TimeSentiment Analysis0.001 SOL< 500msText Classification0.002 SOL< 800msNamed Entity Recognition0.003 SOL< 1s Prices subject to change based on network conditions
🗺️ Roadmap ✅ Phase 1: Foundation (Q4 2024)
Basic sentiment analysis model Solana smart contract API development Simple frontend
🔄 Phase 2: Enhancement (Q1 2025)
Multiple AI models support Staking mechanism Model marketplace Mobile app
🔮 Phase 3: Scaling (Q2 2025)
Custom model deployment DAO governance Cross-chain support Enterprise features
🌟 Phase 4: Expansion (Q3 2025)
Image recognition models Audio processing Video analysis Model training platform
🛠️ Tech Stack Blockchain
Solana: Primary blockchain for payments Anchor Framework: Smart contract development Web3.js: Blockchain interaction
AI/ML
Transformers: Pre-trained language models PyTorch: Deep learning framework ONNX Runtime: Optimized inference Hugging Face: Model hub
Backend
FastAPI: High-performance API framework Redis: Caching layer PostgreSQL: Data persistence Celery: Task queue
Frontend
Next.js: React framework TailwindCSS: Styling Phantom SDK: Wallet integration Chart.js: Data visualization
DevOps
Docker: Containerization GitHub Actions: CI/CD Vercel: Frontend hosting Railway: Backend hosting Prometheus: Monitoring
📈 Performance
⚡ Latency: < 500ms average response time 🚀 Throughput: 1000+ requests per second 💰 Cost: 70% cheaper than centralized alternatives 🔒 Uptime: 99.9% availability 🌍 Global: CDN-enabled edge inference
🤝 Contributing We love contributions! Here's how you can help:
🍴 Fork the repository 🔨 Create your feature branch (git checkout -b feature/AmazingFeature) ✅ Commit your changes (git commit -m 'Add some AmazingFeature') 📤 Push to the branch (git push origin feature/AmazingFeature) 🎉 Open a Pull Request
See CONTRIBUTING.md for detailed guidelines. Good First Issues Check out our good first issues to get started!
📚 Documentation
📖 Full Documentation 🏗️ Architecture Guide 🔌 API Reference 🚀 Deployment Guide 🧪 Testing Guide
🌟 Community Join our growing community:
💬 Discord - Chat with the team 🐦 Twitter - Latest updates 📺 YouTube - Tutorials 📝 Blog - Technical articles 📧 Newsletter - Weekly updates
🙏 Acknowledgments
Solana Foundation for blockchain infrastructure Hugging Face for AI models FastAPI for the amazing framework Our amazing contributors and community
📄 License This project is licensed under the MIT License - see the LICENSE file for details.
📞 Contact
Website: neuralchain.tech Email: hello@neuralchain.tech Twitter: @neuralchain Discord: Join our server