e8d9b1fd42
Add complete token system with Plex/Tautulli/Overseer integration: - Anchor program for SPL token mint/burn/transfer - Express backend with OAuth, webhooks, Solana integration - Next.js frontend with dashboard, admin panel, wallet management - Docker deployment for 172.20.1.0/24 infrastructure - Production configs with SSL, Nginx, health monitoring Tautulli webhooks auto-mint on watch events. Overseer integration burns for content requests.
3.9 KiB
3.9 KiB
CoopCredits ($COOP) Media Rewards Ecosystem
A complete Solana-based rewards system integrated with Plex, Tautulli, and Overseer.
System Architecture
┌─────────────────────────────────────────────────────────────────────────────┐
│ coop.hobokenchicken.com │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌─────────────────┐ │
│ │ Next.js │ │ Express │ │ PostgreSQL │ │ Solana Devnet │ │
│ │ Frontend │◄─┤ API │◄─┤ Database │◄─┤ $COOP SPL │ │
│ │ │ │ │ │ │ │ Token │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ └─────────────────┘ │
│ ▲ ▲ │
│ │ │ │
│ Plex OAuth Tautulli Webhooks │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Plex Server │ │ Tautulli │ │ Overseer │ │
│ │ (Content) │ │ (Analytics) │ │ (Requests) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘
Quick Start
# 1. Clone and install dependencies
cd coop-credits
npm install
# 2. Set up environment
cp backend/.env.example backend/.env
# Edit backend/.env with your values
# 3. Start with Docker Compose
docker-compose up -d
# 4. Deploy Solana program
cd anchor-program
anchor deploy
# 5. Seed initial data
npm run db:seed
Project Structure
coop-credits/
├── anchor-program/ # Solana Anchor program for $COOP token
├── backend/ # Express API server
├── frontend/ # Next.js dashboard
├── shared/ # Shared types and utilities
├── docker/ # Docker configurations
├── deployment/ # Deployment scripts
└── docker-compose.yml # Full stack orchestration
User Flow
- Login → User visits coop.hobokenchicken.com, authenticates with Plex
- Wallet → Auto-created Solana wallet or connect existing
- Watch → Viewing on Plex → Tautulli triggers → $COOP minted
- Earn → Real-time balance updates on dashboard
- Spend → Request content on Overseer → $COOP deducted
- History → Full transaction history visible on dashboard
Admin Features
- System overview and analytics
- User management and balance adjustments
- Minting rate controls
- Spending controls and promotions
- Emergency pause and recovery
Environment Variables
See backend/.env.example and frontend/.env.local.example for full configuration.