The next-generation video platform — live-first, VOD-native, creator-wealthy, AI-moderated, multi-platform by default.
See ARCHITECTURE.md for full decisions and rationale.
| Service | Port | Description | Dependencies |
|---|---|---|---|
| auth | 8081 | Users, JWT, OAuth (Google, Twitch), OTP verification | Postgres, Redis |
| video | 8082 | Upload, transcode (HLS/MP4), clip, thumbnail | Postgres, Redis, S3, Transcode API |
| chat | 8083 | WebSocket real-time chat, pub/sub, moderation | Postgres, Redis |
| payment | 8084 | Paddle, PayPal, USDC, subscriptions, ledger, payouts | Postgres, Redis |
| stream | 8085 | Stream CRUD, RTMP ingest, simulcast, analytics | Postgres, Redis, MediaMTX |
| content | 8086 | Categories, search, trending, recommendations, reports | Postgres, Redis |
| notification | 8087 | In-app + email notifications, preferences | Postgres, Redis |
- Language: Go 1.23
- HTTP Router: Chi
- Database: PostgreSQL 16 (pgx)
- Cache/Queue: Redis 7
- Task Queue: Asynq
- Video Pipeline: MediaMTX (RTMP) → Cloud/Gcore Transcode → S3 (R2)
- Streaming: HLS via MediaMTX, WebRTC for low-latency
- Payments: Paddle (subscriptions) + PayPal (tips+payouts) + USDC (micro-tips)
- OAuth: Goth (Google, Twitch, Discord, GitHub)
- Auth: JWT (access + refresh tokens), OTP-first verification
- AI: Local Whisper + LLM for moderation, pgvector for discovery
- CDN: Gcore (native) / Cloudflare (swappable)
- Deployment: Docker Compose, multi-stage scratch binaries (~8MB)
# Prerequisites: Docker, Go 1.23+
# 1. Start infrastructure
make db-up
# 2. Run a single service (auth example)
make dev-auth
# 3. Or run everything
make up# Start infrastructure services
make db-up
# Run a service in dev mode (hot reload)
make dev-auth
make dev-video
make dev-chat
# Run all tests
make test
# Format code
make fmt
# Lint
make vet# Build Docker images
make docker
# Start everything
make up
# View logs
make logs
# Stop everything
make downAll services expose GET /healthz health checks.
POST /register— Email/password registration, sends OTPPOST /login— Login with email + passwordPOST /verify— Verify email with OTP codeGET /{provider}/login— OAuth login (google, twitch, discord)POST /password/reset— Request password reset OTPPOST /password/reset/confirm— Reset password with OTPPOST /token/refresh— Refresh access tokenGET /me— Get current user profilePATCH /me— Update profile
POST /start— Start a new stream (returns RTMP URL + stream key)POST /{id}/end— End a streamGET /live— List all live streamsGET /categories— List categoriesPOST /simulcast— Configure simulcast targetsGET /ingest-servers— Get optimal ingest endpoints
POST /checkout— Create one-time checkoutPOST /subscription— Create subscriptionPOST /tip— Send a tip to a creatorPOST /webhook/paddle— Paddle webhook handlerGET /ledger/{creatorId}— Get creator balancePOST /ledger/payout— Request payout
GET /ws/{streamId}— WebSocket connection for real-time chatGET /messages/{streamId}— Chat historyPOST /timeout— Timeout user from chatPOST /ban— Ban user from chat
Each service reads from environment. See services/*/internal/config/config.go for all options.
Key shared variables:
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
— | PostgreSQL connection URL |
REDIS_URL |
redis://localhost:6379/0 |
Redis connection URL |
PORT |
8080 |
HTTP listen port |
ALLOWED_ORIGINS |
* |
CORS allowed origins |
- 90/10 revenue split (platform keeps 10%)
- Tipping from day one — no 10k sub gatekeeping
- Creator Pool — 5% of platform take distributed by watch time
- Paddle handles global tax compliance (VAT/GST)
- USDC on Solana enables profitable sub-$1 micro-tips
- Payout threshold: $50 minimum, monthly or on-demand
Built-in restream to YouTube, Twitch, Kick, and Rumble. Your platform is the source of truth; the simulcast push happens server-side. Creators keep their existing audience while building on your platform.
Built with 🐾 by bedrivetech/wiitoo