Stream Platform Lite is a platform that allows any streamer to easily create their own live streaming platform, making their content and revenue not entirely dependent on major streaming platforms.
Clean and intuitive homepage with multi-language support
- Simple Navigation - Easy access to live streams and authentication options
- Discord OAuth Integration - Quick login with Discord account
- Language Selection - Switch between English, Japanese, and Traditional Chinese
Real-time live streaming with chat and viewer count
- RTMP Push Streaming - Stream directly from OBS or any RTMP-compatible software
- Live Recording - Optional recording functionality to save streams as MP4 files
- Visibility Control - Set streams as Public or Member Only
- Real-time Viewer Count - Accurate viewer statistics with anonymous user tracking
Interactive chat with role-based permissions and moderation tools
- Live Chat - WebSocket-powered real-time messaging
- Message Filtering - Toggle between viewing all messages or admin-only
- User Avatars - Display user identities with Discord avatars
- Moderation Tools - Delete messages and mute users based on role permissions
- Chat History - Redis-cached message history with pagination
- Anonymous Chat Viewing - Allow guests to view chat without logging in
Comprehensive user management with role-based access control
Authentication Methods:
- Discord OAuth 2.0 - Seamless login with Discord account
- Native Accounts - Username/password authentication for system administrators
Discord Guild Role → Platform Role Mapping
Platform roles are assigned automatically at login based on the user's roles in your Discord server. No manual role assignment needed.
| Discord Side | Platform Role | How It's Configured |
|---|---|---|
| Specific Discord User ID | Admin | DISCORD_ADMIN_ID env var |
| Discord Role ID | Editor | System Settings → Editor Role |
| Discord Role ID(s) | User | System Settings → Stream Access Roles (multiple allowed) |
| In guild but no matching role | Guest | — (fallback) |
| Not in guild | Login denied | Discord API returns non-200; login fails |
The OAuth flow requests guilds.members.read scope to read the user's server roles on every login, so role changes in Discord take effect on next login automatically.
Multi-platform membership sync via Discord Discord supports native integrations with Twitch, YouTube, and other streaming platforms that automatically grant server roles to subscribers/members. By mapping those roles to platform roles here, StreamPlatformLite indirectly inherits membership state from multiple platforms — e.g. Twitch subscribers or YouTube channel members automatically gain User access without any additional integration work.
Role-Based Access Control:
| Feature | Admin | Editor | User | Guest | Anonymous |
|---|---|---|---|---|---|
| Manage users and accounts | ✓ | ✗ | ✗ | ✗ | ✗ |
| Manage livestreams | ✓ | ✗ | ✗ | ✗ | ✗ |
| Delete chat messages | ✓ | ✓* | ✓** | ✗ | ✗ |
| Mute users | ✓ | ✓* | ✗ | ✗ | ✗ |
| Watch member-only streams | ✓ | ✓ | ✓ | ✗ | ✗ |
| Send chat messages | ✓ | ✓ | ✓ | ✓ | ✗ |
| Watch public streams | ✓ | ✓ | ✓ | ✓ | ✓ |
| View chat messages | ✓ | ✓ | ✓ | ✓ | ✓ |
*Editor can only moderate User/Guest messages, not Admin/Editor messages
**Users can delete their own messages only
Powerful admin interface for platform management
Livestream Management:
- Create new livestreams with unique RTMP endpoints
- Edit stream titles, descriptions, and visibility settings
- Manage ban/mute lists for chat moderation
- Delete or archive past streams
Account Management:
- Create and delete native user accounts
- Assign user roles and permissions
- View all registered users and their details
System Settings:
- Map Discord Role IDs to platform roles (Editor, User/Stream Access)
- Admin is designated by Discord User ID via environment variable
- Changes apply on the user's next Discord login — no manual sync needed
Fully responsive design with multi-language support
- Multi-language Support - English, Japanese, Traditional Chinese with easy language switching
- Mobile-Optimized - Complete mobile experience with touch-friendly controls
- Adaptive Layouts - Optimized viewing on desktop and mobile devices
Security Features:
- Double-submit CSRF protection (HMAC token via
X-XSRF-TOKENheader) - HttpOnly cookies for JWT and anonymous viewer tokens
- Bcrypt password encryption (10 rounds)
- JWT-based authentication with role verification
- CORS configuration for secure cross-origin requests
- Security headers on all responses: CSP,
X-Frame-Options,X-Content-Type-Options, HSTS,Referrer-Policy,Permissions-Policy - Redis-based rate limiting on all sensitive endpoints (IP and user-based)
- Path traversal prevention on HLS file access
- Non-root containers with minimal Linux capabilities (
cap_drop: ALL)
Performance Optimizations:
- Redis caching for chat messages and viewer counts
- File caching for accelerated HLS playback
- Concurrent lock mechanisms for video transcoding
- Automatic cleanup of expired cache entries
Frontend Stack:
- Nuxt 4 + Vue 3 (Composition API)
- TypeScript for type safety
- Plyr + HLS.js for professional video playback
- SweetAlert2 for beautiful notifications
Backend Stack:
- Go 1.26+ with Gin framework
- PostgreSQL (split per service:
go_servicefor streams,auth_dbfor accounts/auth) - Redis for high-speed caching and rate limiting
- FFmpeg for video transcoding
- JWT for secure authentication
Services:
go-service— livestream management, chat, HLS deliverycore-service— authentication, account management, Discord OAuth
Infrastructure:
- Docker + Docker Compose for easy deployment
- Caddy for automatic HTTPS (Let's Encrypt)
- RTMP server for stream ingestion
- HLS for adaptive streaming delivery
StreamPlatformLite supports two deployment methods. Caddy is recommended for its simplicity and automatic HTTPS.
Advantages:
- Automatic SSL certificate from Let's Encrypt
- Auto-renewal (no manual maintenance)
- Simpler configuration
- Better security (backend not directly exposed)
- HTTP/2 and HTTP/3 support out of the box
Prerequisites:
- Docker & Docker Compose
- Domain name with DNS A record pointing to your server
- Ports 80, 443, and 1935 open in firewall
Setup:
-
Clone the repositories (all four must be siblings in the same parent directory):
git clone https://github.com/cool9850311/StreamPlatformLite.git git clone https://github.com/cool9850311/StreamPlatformLite-Frontend.git git clone https://github.com/cool9850311/StreamPlatformLite-Backend.git git clone https://github.com/cool9850311/StreamPlatformLite-Core.git
-
Navigate to the project directory:
cd StreamPlatformLite -
Copy the Caddy configuration files:
cp docker-compose-caddy.yml docker-compose.yml cp Caddyfile.example Caddyfile
-
Edit
Caddyfileand replaceexample.comwith your actual domain name. -
Update the environment variables in
docker-compose.yml:- Replace
example.com/api(go-serviceDOMAIN) andexample.com(other fields) with your domain - Replace
example.com/auth(core-serviceDOMAIN) withyourdomain.com/auth - Fill in Discord credentials (
DISCORD_CLIENT_ID,DISCORD_CLIENT_SECRET,DISCORD_ADMIN_ID,DISCORD_GUILD_ID) - (See Configuration - docker-compose)
- Replace
-
Start the services:
docker-compose up -d --build
-
Wait 1-2 minutes for Caddy to obtain SSL certificates automatically.
Notes:
- Certificates are stored in Docker volumes and renewed automatically
- No manual certificate management needed
- Access your site at
https://yourdomain.com
Use this if:
- You prefer manual certificate management
- You already have SSL certificates
- You need specific Nginx features
Setup:
-
Clone the repositories (all four must be siblings in the same parent directory):
git clone https://github.com/cool9850311/StreamPlatformLite.git git clone https://github.com/cool9850311/StreamPlatformLite-Frontend.git git clone https://github.com/cool9850311/StreamPlatformLite-Backend.git git clone https://github.com/cool9850311/StreamPlatformLite-Core.git
-
Navigate to the project directory:
cd StreamPlatformLite -
Copy the example configuration files:
cp docker-compose-example.yml docker-compose.yml cp nginx.conf.example nginx.conf
-
Update the environment variables in
docker-compose.ymlandnginx.confas needed. (See Configuration - docker-compose) -
Replace cert & key files in
certsfolder with your own SSL certificates. -
Start the services using Docker Compose:
docker-compose up -d --build
Test the full production stack (with HTTPS, strict CSP, security headers) on your local machine using mkcert and the localtest.me domain (automatically resolves to 127.0.0.1 via public DNS — no /etc/hosts needed).
Prerequisites:
- Docker & Docker Compose
- mkcert:
brew install mkcert
Setup:
-
Generate a locally-trusted certificate:
mkdir -p local/certs mkcert -cert-file local/certs/cert.pem -key-file local/certs/key.pem localtest.me localhost 127.0.0.1
-
Copy the example config files:
# Choose Caddy (recommended) or Nginx cp local/docker-compose.caddy.example.yml local/docker-compose.caddy.yml cp local/Caddyfile.example local/Caddyfile # Or for Nginx: cp local/docker-compose.nginx.example.yml local/docker-compose.nginx.yml cp local/nginx.example.conf local/nginx.conf
-
Fill in your credentials in
local/docker-compose.caddy.yml(orlocal/docker-compose.nginx.yml):APP_SECRET_KEYDISCORD_CLIENT_ID/DISCORD_CLIENT_SECRET/DISCORD_ADMIN_ID/DISCORD_GUILD_ID
-
In the Discord Developer Portal, add
https://localtest.me/auth/oauth/discordas a redirect URL. -
Start the stack:
# Caddy docker compose -f local/docker-compose.caddy.yml up --build -d # Or Nginx docker compose -f local/docker-compose.nginx.yml up --build -d
-
Access at https://localtest.me
Notes:
- RTMP push URL is shown in the admin dashboard after creating a stream
- Files inside
local/that contain credentials (docker-compose.caddy.yml,docker-compose.nginx.yml,Caddyfile,nginx.conf) are gitignored
To stop the services (works for both Caddy and Nginx):
docker-compose downFor more detailed information, refer to the individual repository links provided below.