Files
coop/README.md
T
hobokenchicken 67701d10ad chore: Remove SSL cert handling - use external reverse proxy
- Nginx now listens on HTTP only (port 80)
- Remove SSL cert volume mounts from docker-compose
- Remove SSL troubleshooting sections
- Update docs to indicate SSL handled by Caddy/reverse proxy
- Simplify nginx.conf to remove HTTPS server block
2026-04-15 14:25:35 -04:00

86 lines
4.1 KiB
Markdown

# 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
git clone <repository> coop-credits
cd coop-credits
npm install
# 2. Set up environment
cp .env.example .env
# Edit .env with your values (see docs/SETUP-INFRASTRUCTURE.md)
# 3. Create required directories
mkdir -p frontend/public
# 4. Start with Docker Compose
docker-compose up -d --build
# 6. Initialize database (first time only)
docker-compose exec backend npx prisma db push
# 7. Deploy Solana program (optional, for token features)
cd anchor-program
anchor deploy
```
## 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.