A modern, real-time streaming overlay and admin dashboard for IRL streams. Built with Next.js 16, featuring live GPS tracking, dynamic minimap, weather integration, Belabox bitrate monitoring with OBS Auto-Scene Switching, StreamElements/Twitch sub & donation goals, heart rate monitoring, distance/calorie tracking, social loops, and Vercel resource optimization.
- Belabox Integration: Real-time stream bitrate (kbps) and RTT latency monitoring directly on your overlay.
- OBS Auto-Scene Switcher: Automatically switches your OBS scene to an
Offlinescene when bitrate drops or stream cuts, and back to yourLivescene when the connection recovers. - Low Bitrate Alerts: On-screen alerts with customizable thresholds, positions, scales, fonts, and alert sounds.
- Resource Optimized: Direct browser CORS fetch + edge proxy caching to ensure near-zero serverless CPU usage on Vercel.
- Real-Time GPS: RTIRL integration with smooth location tracking.
- Dynamic Minimap: Auto-shows when moving (>5 km/h) and hides when stationary. Features day/night MapLibre WebGL map themes (CartoDB tiles).
- Location Modes: 6 precision modes (Neighbourhood, City, State, Country, Custom, Hidden) with intelligent fallback and duplicate name detection.
- At-Sea Mode: Automatic ocean and sea detection with regional flags for cruise/nautical streaming.
- Sub Goals: Combined or separate Total & Daily subscriber goal trackers with Twitch & StreamElements integration.
- Donation / Tip Goals: Real-time tip progress bars (Total & Daily) with customizable goals and automatic daily reset handling.
- Custom Styling: Neon, Retro, Cyberpunk, Impact, and Minimalist typography and themes for all goal bars.
- Distance Tracker: Tracks progress in miles, kilometers, or meters via GPS movement or destination coordinates.
- Calorie Tracker: Customizable daily calorie burn goal widget.
- Heart Rate Monitor: Pulsoid integration with smooth animated heart rate transitions.
- Altitude & Speed: Elevation (m/ft) and speed (km/h / mph) with auto-display when moving or at notable elevations.
- Social Media Rotator: Loop animated widget for Kick, Twitch, YouTube, X, Instagram, and TikTok with configurable timing.
- To-Do List Widget: Interactive task tracker with progress counters and custom positioning.
- URL & Web Embeds: Embed custom websites, HTML widgets, or images into your overlay.
- Global Theme & Font Engine: Select from Neon, Cyberpunk, Retro, Impact, or Bold themes across all widgets.
# Clone repository
git clone https://github.com/AlphaKing112/Overlay3.0.git
cd Overlay3.0
# Install dependencies
npm installCreate .env.local in the project root:
# ==========================================
# REQUIRED - GPS & LOCATION & WEATHER
# ==========================================
NEXT_PUBLIC_RTIRL_PULL_KEY=your_rtirl_pull_key
NEXT_PUBLIC_LOCATIONIQ_KEY=your_locationiq_key
NEXT_PUBLIC_OPENWEATHERMAP_KEY=your_openweathermap_key
# ==========================================
# OPTIONAL - FITNESS & INTEGRATIONS
# ==========================================
NEXT_PUBLIC_PULSOID_TOKEN=your_pulsoid_token
# Twitch API (Sub & Goal Sync)
TWITCH_CLIENT_ID=your_twitch_client_id
TWITCH_CLIENT_SECRET=your_twitch_client_secret
# StreamElements Sync
STREAMELEMENTS_JWT=your_streamelements_jwt_token
# ==========================================
# ADMIN PANEL & SETTINGS PERSISTENCE
# ==========================================
ADMIN_PASSWORD=your_secure_admin_password
# Vercel KV (Redis) for Real-Time Sync & SSE Stream
KV_REST_API_URL=your_vercel_kv_rest_url
KV_REST_API_TOKEN=your_vercel_kv_rest_token
KV_REST_API_READ_ONLY_TOKEN=your_vercel_kv_readonly_tokennpm run dev- Admin Dashboard:
http://localhost:3000(Login withADMIN_PASSWORD) - OBS Browser Overlay:
http://localhost:3000/overlay
- Add a Browser Source in OBS Studio.
- URL:
https://your-domain.vercel.app/overlay(orhttp://localhost:3000/overlayfor local testing). - Width:
1920, Height:1080. - ✅ Check "Shutdown source when not visible".
- ✅ Check "Refresh browser when scene becomes active".
💡 Note: Cache-busting (
?v=<timestamp>) is automatically attached server-side via Next.js middleware to guarantee OBS always loads the latest code without manual cache clearing.
Overlay 3.0 can control OBS Studio directly to automatically switch scenes when your stream connection drops or recovers.
- Enable OBS WebSocket in OBS Studio:
- Go to Tools → WebSocket Server Settings.
- Check Enable WebSocket Server.
- Note the Server Port (default
4455) and set a Server Password.
- Configure in Admin Panel (
http://localhost:3000):- Enter your OBS WebSocket URL (e.g.
ws://127.0.0.1:4455). - Enter your OBS WebSocket Password.
- Set Live Scene Name (e.g.,
IRL Stream). - Set Offline Scene Name (e.g.,
BRB / Signal Lost). - Enable OBS Auto-Switch Scene Toggle.
- Enter your OBS WebSocket URL (e.g.
- Belabox Setup:
- Enter your Belabox Publisher Key or Belabox Stats URL (
https://stats.srt.belabox.net/your_publisher_key). - When bitrate drops to 0 kbps, OBS switches to
BRB / Signal Lost. When bitrate restores, OBS switches back toIRL Stream.
- Enter your Belabox Publisher Key or Belabox Stats URL (
Overlay 3.0 features a built-in Vercel Resource Optimization Engine to stay well within Vercel Free Hobby Tier limits (1M invocations / 4h CPU):
| Setting Key | Default | Description |
|---|---|---|
enableResourceOptimization |
true |
Enables direct browser CORS fetches & 5s edge caching. |
bitratePollIntervalLive |
3000 ms |
Bitrate checking frequency when stream is LIVE. |
bitratePollIntervalOffline |
20000 ms |
Bitrate checking frequency when stream is OFFLINE (70% request reduction). |
bitrateCacheTtlMs |
5000 ms |
Server & CDN edge cache duration for /api/bitrate responses. |
- Direct Browser CORS Fetch: Requests to
https://stats.srt.belabox.net/...bypass Vercel serverless proxy completely when browser CORS is supported. - Server Cache: Duplicate requests from multiple open tabs or OBS sources share 1 cached response per 5-second window.
Choose between 6 geographic precision levels in the Admin Panel:
- Neighbourhood: Most detailed (e.g., "SoHo", "Shinjuku", "Downtown").
- City: Municipality level (e.g., "Austin", "Tokyo", "Paris").
- State: Region/prefecture level (e.g., "California", "Ontario").
- Country: Shows country name with flag emoji.
- Custom: Manual custom text (e.g., "Vegas Strip Walking Stream").
- Hidden: Hides location display section completely.
Hierarchical Fallback: Neighbourhood → City → State → Country. If a specific neighbourhood is missing from LocationIQ, the overlay automatically falls back to the city without breaking the layout. Duplicate name detection automatically prevents redundant displays like "Tokyo, Tokyo".
All APIs are strictly rate-limited client-side to prevent quota exhaustion:
- LocationIQ: 1 call/sec max with 18-second minimum time gate (enforces <4,500 calls/day safety limit).
- OpenWeatherMap: Weather updates every 5 minutes (time-based).
- CartoDB Map Tiles: Free WebGL map tiles (CartoDB Voyager for day, Dark Matter for night) with zero API keys required.
- Pulsoid: Real-time heart rate WebSocket feed.
- StreamElements: Tips and donation goal synchronization.
- Framework: Next.js 16 (App Router, Turbopack)
- Language: TypeScript
- Styling: Vanilla CSS Modules with dark mode glassmorphism
- Map Engine: MapLibre GL WebGL
- Real-Time Sync: Server-Sent Events (SSE) + Vercel KV (Redis)
- OBS Control:
obs-websocket-jsv5
npm run dev # Start development server
npm run build # Build optimized production bundle
npm run start # Start production server
npm run lint # Run ESLint validationMIT License — Feel free to customize and use for your stream! 🚀