// testing.
Back to Work Real-time System

VOID SOVEREIGN

2026 Ongoing product build Creator Tooling / Internal Product

A cinematic, real-time Twitch/OBS overlay runtime that converts live stream events into orchestrated visual and audio moments with operator controls and telemetry.

Project Context

VOID SOVEREIGN is an interactive stream-overlay platform designed to turn live events into a themed visual narrative. It combines real-time Twitch event ingestion, event-driven overlay rendering, dynamic audio responses, scene-aware OBS behavior, and operator-facing controls into a single modular runtime.

The Challenge

Livestream event data is noisy and bursty, while overlays must remain coherent, branded, and low-latency. The system also needs to handle multiple external integrations across Twitch, OBS, and TTS providers without breaking the live experience when one dependency fails.

The Solution

Built a modular web runtime with dedicated concerns for logic, alerts, visuals, networking, voice, and Twitch listeners. The system uses event queue orchestration, scene-aware behavior, resilient fallback paths for Twitch auth, TTS delivery, and OBS control methods, plus live telemetry for runtime visibility.

Results and Impact

5Event Channels
6Runtime Domains
3Fallback Paths
LiveTelemetry Sync

Feature Set

Real-time Twitch Event Ingestion

Consumes chat, follows, subs, raids, and cheers as live event sources.

Overlay Queue Orchestration

Transforms incoming events into ordered, themed visual responses instead of isolated alerts.

Dynamic Audio and TTS Responses

Supports browser audio and proxy-backed TTS with fallback provider handling.

Scene-aware OBS Behavior

Responds to streaming context including BRB, start, and end transitions.

Operator Dashboard Controls

Provides live controls so the streamer or operator can manage runtime behavior during broadcasts.

Telemetry and State Sync

Publishes runtime visibility and command-state synchronization for observability.

Project Gallery

What Made This Project Successful

The project successfully converts chaotic livestream signals into curated, branded moments. It pairs real-time event orchestration with resilient integrations, operator controls, and observability so the runtime stays usable under live streaming conditions.

Full System Details

View Full README Content
## Executive Summary
VOID SOVEREIGN is a real-time Twitch and OBS overlay system built to convert livestream events into a single, coherent visual and audio experience. Instead of running disconnected widgets for alerts, chat, atmosphere, and manual controls, the project centralizes event handling into one modular runtime and one operator dashboard.

The system was designed for two priorities that often conflict in livestream tooling: high-impact presentation and operational stability.

## Project Context
Most livestream overlay stacks evolve by layering independent tools over time. That approach often creates fragmented visuals, duplicated logic, and unpredictable behavior during event spikes. VOID SOVEREIGN was created to solve that by treating the stream like a runtime product rather than a set of separate widgets.

The goal was not only to make alerts look better, but to create a consistent event language where follows, subs, raids, cheers, chat activity, music changes, and operator actions all pass through one shared orchestration layer.

## Problem Statement
Before a unified runtime, common issues included:

- Inconsistent visual identity between event types.
- Overlapping alerts and audio during busy moments.
- Fragile integrations where one failure disrupted multiple stream functions.
- Manual operator overhead for scene transitions and reactive effects.
- Limited visibility into what command was sent, processed, and currently active.

The project set out to resolve these issues with deterministic event sequencing, modular subsystems, fallback paths for external integrations, and a live dashboard with telemetry feedback.

## Project Goals

1. Build a modular browser-based overlay runtime suitable for OBS Browser Source.
2. Normalize multiple live inputs into one event pipeline.
3. Maintain a strong, branded visual narrative across all interactions.
4. Keep stream-time behavior stable under noisy or bursty event traffic.
5. Provide practical operator controls without touching code mid-stream.
6. Add state visibility so command and runtime health are observable.

## What the System Does
VOID SOVEREIGN receives and processes three primary input categories:

1. Twitch events: chat messages, follows, subscriptions, raids, cheers, and command patterns.
2. Operator commands: scene changes, test triggers, positioning, balance/threat controls, and emergency actions.
3. Music context: currently playing Spotify track metadata used for style and messaging rules.

These inputs are transformed into structured event payloads and routed through queue-driven rendering and speech systems. The output is a synchronized overlay experience that includes visual transitions, text payloads, symbols/frames/logos, voice narration, and atmosphere shifts.

## User and Operator Experience
The on-stream audience experiences a reactive overlay that feels like one unified character/theme system. Alerts are serialized rather than stacked chaotically, and atmosphere changes persist over time through corruption and enlightenment state.

The operator experiences a dashboard-centered workflow with:

- Scene control shortcuts.
- Event simulation controls for testing.
- Spatial positioning tools for key widgets.
- Real-time volume and balance adjustment.
- Command response visibility and live telemetry readback.

## Technical Architecture
The implementation is split into focused modules to avoid monolithic coupling.

- Overlay runtime entry point: index.html
- Operator dashboard: controller.html
- Core styling and animation: style.css
- Runtime configuration: config.js
- State systems: js/logic.js
- Alert queue and rendering orchestration: js/alerts.js
- Voice and TTS fallback engine: js/voice.js
- Network polling, command processing, music polling: js/network.js
- Twitch ingestion and dedupe logic: js/twitch.js
- Scene and OBS behavior orchestration: js/script.js
- Visual effects engine: js/visuals.js
- Dice subsystem: js/dice.js
- Command write endpoint: update_sov.php
- Live telemetry write endpoint: update_live_stats.php
- Command state file: sovereign_state.json
- Live state file: live_stats.json

## Data and Command Flow
The system uses a lightweight command-state relay model.

1. Dashboard sends a command via update_sov.php.
2. Endpoint increments command_id and writes action/value payload to sovereign_state.json.
3. Overlay runtime polls command state and applies new commands only when command_id advances.
4. Overlay runtime publishes live telemetry snapshots to live_stats.json via update_live_stats.php.
5. Dashboard reads both files to show online status, latest command, runtime mode/threat, balance, and freshness.

This model keeps control behavior deterministic and auditable without adding transport complexity.

## Core Runtime Systems

### 1) Scene-Aware Behavior
Scene transitions are treated as state changes that can affect layout mode, BRB handling, and source visibility actions. The runtime supports multiple OBS interaction paths for compatibility:

- Modern OBS request/call interface.
- Legacy OBS browser API signatures.
- OBS WebSocket fallback when required.

This layered strategy reduces hard failures across different OBS environments.

### 2) Alert Queue Orchestration
A centralized queue serializes alert display and related effects. Each event payload can include text, style overrides, symbol/frame/logo references, optional speech text, and optional sound behavior.

This avoids event pileups and preserves narrative readability during high-traffic moments.

### 3) Voice and TTS Reliability
Speech output is queue-based and provider-aware. The engine attempts a preferred source first, then falls back to additional providers if playback fails, and includes timeout guards for hung audio scenarios.

This ensures speech features degrade gracefully rather than failing silently.

### 4) Atmosphere State Model
A single balance value in the range -100 to 100 controls corruption and enlightenment behavior.

- Negative balance drives corruption intensity.
- Positive balance drives enlightenment intensity.
- Threshold activation applies themed class changes only when state is meaningful.

This creates continuity between events so stream atmosphere feels persistent, not random.

### 5) Twitch Event Layer
The Twitch module handles event ingestion, command parsing, and duplicate suppression for noisy callbacks. It also includes follow backup polling behavior to improve reliability when direct follow event delivery is incomplete.

### 6) Dashboard and Telemetry Loop
The dashboard acts as both control surface and monitoring console. It sends commands, verifies command progression, and reads live runtime state to detect stale or offline conditions.

## Feature Inventory

- Scene-aware mode switching (starting, gameplay, BRB, ending).
- Serialized themed alert pipeline.
- Chat overlay and command-driven interactions.
- Corruption and enlightenment atmosphere mechanics.
- Threat-level visual escalation.
- Dice subsystem with preset and custom rolls.
- Music-aware event styling rules.
- Special-user profile responses.
- Panic/collapse command pathway.
- Widget positioning controls via normalized coordinates.
- OBS source visibility toggling with compatibility fallback.
- Live telemetry publication and dashboard consumption.

## Engineering Tradeoffs
The project intentionally uses polling and JSON relay files instead of full-time sockets as a stability-first and deployment-simple choice. This keeps the system easy to host and inspect, at the cost of some latency and less granular real-time transport behavior.

Modularity was favored over deep framework abstraction to keep iteration speed high in a live production context. Vanilla JavaScript modules and explicit file responsibilities made stream-time debugging straightforward.

## Reliability Strategy
Reliability is addressed through a layered approach:

- Queue serialization for visual/audio determinism.
- Duplicate suppression windows for event noise.
- Multi-provider TTS fallback chain.
- OBS API compatibility fallback paths.
- Error isolation so non-critical failures do not collapse the full runtime.
- Command-id gating to prevent stale command replay.

## Security and Operational Considerations
The architecture includes sensitive integrations and should be deployed with strict secret hygiene.

Recommended operational posture:

- Store tokens and secrets outside client-delivered assets.
- Restrict command endpoints to trusted contexts.
- Rotate credentials regularly.
- Treat logs and telemetry as potentially sensitive operational data.

## Development and Maintenance Model
The codebase is organized to support incremental extension:

- Add new event types by defining payload generation and queue mapping.
- Add new visual themes by extending class/state styling.
- Add integrations by introducing isolated ingestion modules that feed the same queue/state model.
- Tune behavior through central config constants rather than distributed literals.

## Outcome
VOID SOVEREIGN demonstrates that a custom livestream overlay can function as a resilient real-time application rather than a collection of decorative widgets. The project combines product thinking, systems design, and runtime reliability practices to support live broadcast conditions while maintaining a strong branded experience.

## Future Direction
Potential next steps include:

1. Replace polling command transport with authenticated WebSocket channels for lower latency.
2. Add dashboard authentication and action audit logging.
3. Extract a reusable event-rule configuration format for non-code customization.
4. Add post-stream replay and diagnostics tooling for performance analysis.
5. Package the runtime as a reusable multi-theme overlay framework.

## One-Paragraph Website Version
VOID SOVEREIGN is a modular real-time Twitch and OBS overlay runtime that transforms live events into synchronized cinematic visuals, themed alerts, voice responses, and state-driven atmosphere changes. It combines queue-based orchestration, fallback-safe integration patterns, scene-aware behavior, and an operator dashboard with live telemetry to deliver both dramatic on-stream presentation and stable stream-time operations.