feat: add CoopCredits Solana media rewards ecosystem
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.
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
1. **Login** → User visits coop.hobokenchicken.com, authenticates with Plex
|
||||
2. **Wallet** → Auto-created Solana wallet or connect existing
|
||||
3. **Watch** → Viewing on Plex → Tautulli triggers → $COOP minted
|
||||
4. **Earn** → Real-time balance updates on dashboard
|
||||
5. **Spend** → Request content on Overseer → $COOP deducted
|
||||
6. **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.
|
||||
|
||||
Reference in New Issue
Block a user