How tk2f/kasaneru works
1. What this repo is
Kasaneru is a static OBS overlay toolkit: a folder of HTML/CSS/JS assets that OBS loads through Browser Source and Custom Browser Dock. There is no build pipeline or server runtime in the repo; the architecture is file-based and runs inside the browser engine embedded in OBS.
2. Two primary runtime surfaces
The system is split into two cooperating entry points:
- dock.html: the control surface shown in an OBS dock.
- overlay.html: the rendering surface shown in the OBS scene as a Browser Source.
These two pages must point at the same extracted folder so they can share state.
3. Control plane vs display plane
The dock is where the user edits state, chooses apps, configures chapters/title cards/images, and toggles live/offline state. The overlay is where those selections are rendered to the stream. This separation is the core architectural boundary: user interaction lives in the dock; visual output lives in the overlay.
4. In-browser synchronization
The README explicitly requires Browser Source to be configured as a non-local file because dock and overlay communicate through browser-side messaging, specifically BroadcastChannel. That means state changes are propagated directly between the two pages without a backend service or websocket server in this repo.
5. Main feature subsystems exposed by the dock
The dock appears to orchestrate several content types:
- Chapters: navigation cards for session sections.
- Title cards / telops: lower-third style text overlays.
- Images: layered visuals loaded from images/.
- Apps: mini tools loaded from apps/*.html.
These are separate content domains but share the same presentation pipeline into the overlay.
6. Built-in app subsystem
apps/ contains standalone mini-apps, each as its own HTML entry point:
- timer.html
- clock.html
- music-player.html
- roulette.html
- draw.html
- banner/banner.html
- dice/dice.html
Each app is effectively a self-contained module that can be added from the dock by URL. The app boundary is important: apps can have their own UI and state, but they still live inside the same static package and integrate with the shared OBS overlay model.
7. Shared asset registries
The repo includes manifest files that act as registries for dynamic content:
- images/manifest.json and images/manifest.js
- apps/manifest.json
These indicate that the system does not hardcode all assets in the main pages; instead it uses manifests to discover available images and apps. That makes the architecture more data-driven and easier to extend without changing the core shell.
8. Image and overlay content pipeline
images/ is a first-class asset boundary. Users drop images there, then register or select them through the dock. The overlay consumes these image references and renders them with positioning/layering rules. This is a clear file-system-to-UI pipeline: filesystem asset → manifest/selection → dock state → overlay rendering.
9. CSV import/export as a configuration boundary
templates/csv/ contains templates for apps, chapters, images, title cards, and UI settings. The docs state that chapters, telops, images, and settings can be managed through CSV import/export, including spreadsheet workflows. Architecturally, CSV is a bulk configuration interface layered on top of the same runtime state used by the dock and overlay.
10. Customization and extension points
The repo intentionally exposes customization through:
- Custom CSS (CUSTOM-CSS-GUIDE.md)
- App template (templates/app/hello-world.html)
- Remote integration templates (templates/remote/)
This shows a deliberate boundary between the core package and user customization: the core is meant to stay static, while appearance and new mini-apps are extended by adding more files.
11. Remote and automation hooks
templates/remote/ includes samples for companion actions and websocket client quickstart material, suggesting optional integration with external control surfaces. This is not the core runtime, but it is a defined extension boundary for automation and remote control.
12. Special case: Draw app and OBS integration
The Draw app stands out because it mentions OBS WebSocket support for seeing the preview while drawing. That makes it the only built-in app with a stronger integration dependency on OBS beyond the Browser Source itself. In an architecture diagram, it should be shown as an app that can optionally talk to OBS through the websocket plugin/interface.
13. Operational tooling, not runtime
The tools/ scripts are for repository hygiene and packaging support: image manifest generation, pre-commit setup, safety checks, and security scanning. They support the project but are not part of the end-user runtime graph.
14. Overall architecture summary
The project is best drawn as a static OBS add-on package with:
- OBS as the host runtime,
- dock.html as the interactive control plane,
- overlay.html as the stream-facing render plane,
- apps/ and images/ as modular content sources,
- CSV/manifest files as data/config boundaries,
- browser messaging as the synchronization mechanism between dock and overlay.
Main entry points: manifest.json App registry · dock.html Dock · overlay.html Overlay · README.md CSV templates
Components 21
Runtime shell
OBS-hosted pages and in-browser sync
Content registries
Data-driven asset discovery and shared state sources
- Chapters · Session section cards managed from the dock and rendered in the overlay.
- Title cards · Lower-third style text overlays and telop state.
- Images · Layered visual assets loaded from the filesystem and selected in the dock.
images/manifest.json - Image manifest · Manifest helper for discovering available images.
images/manifest.js - App registry · Manifest of bundled mini-app entry points.
apps/manifest.json - Apps · Dock-side app selection and launch surface.
Built-in apps
Standalone mini-app entry points bundled in the package
- Timer · Standalone timer entry point.
apps/timer.html - Clock · Standalone clock entry point.
apps/clock.html - Music player · Standalone music playback tool.
apps/music-player.html - Roulette · Standalone randomizer entry point.
apps/roulette.html - Draw · Drawing tool with optional OBS WebSocket preview integration.
apps/draw.html - Banner · Banner entry point nested under apps/banner.
apps/banner/banner.html - Dice · Dice entry point nested under apps/dice.
apps/dice/dice.html
Extension points
User customization and external integration templates
- CSV templates · Spreadsheet-oriented import/export templates for core content and settings.
templates/csv/README.md - Custom CSS · Guidance for overriding appearance without changing the core package.
CUSTOM-CSS-GUIDE.md - App template · Hello-world HTML template for creating new bundled apps.
templates/app/hello-world.html - Remote hooks · Samples for companion actions and websocket client automation.
templates/remote/README.md
Connections 28
- OBS → Dock: hosts · OBS opens the dock surface in its browser UI.
- OBS → Overlay: hosts · OBS loads the overlay as a Browser Source.
- Dock → BroadcastChannel: publishes · Dock state changes are propagated through browser-side messaging.
- Overlay → BroadcastChannel: subscribes · Overlay receives updates from the same browser messaging channel.
- Dock → Chapters: edits · Users manage chapter cards from the dock.
- Dock → Title cards: edits · Users configure title cards and telops from the dock.
- Dock → Images: selects · Dock chooses image assets from the shared image registry.
- Dock → Apps: launches · Dock exposes and launches bundled mini apps.
- Images → Image manifest: indexed by · Image assets are discovered through manifest helpers.
- Apps → App registry: reads · The dock uses the app manifest to discover available apps.
- App registry → Timer: includes · Manifest entry point for the timer app.
- App registry → Clock: includes · Manifest entry point for the clock app.
- App registry → Music player: includes · Manifest entry point for the music player app.
- App registry → Roulette: includes · Manifest entry point for the roulette app.
- App registry → Draw: includes · Manifest entry point for the draw app.
- App registry → Banner: includes · Manifest entry point for the banner app.
- App registry → Dice: includes · Manifest entry point for the dice app.
- Overlay → Images: renders · Overlay consumes selected image assets for display.
- Overlay → Chapters: renders · Overlay shows the current chapter state.
- Overlay → Title cards: renders · Overlay shows title card state.
- Draw → OBS: optionally integrates · Draw can use OBS WebSocket to sync preview and drawing behavior.
- CSV templates → Chapters: imports/exports · CSV templates cover chapter workflows.
- CSV templates → Title cards: imports/exports · CSV templates cover title card workflows.
- CSV templates → Images: imports/exports · CSV templates cover image configuration workflows.
- CSV templates → Apps: imports/exports · CSV templates cover app configuration workflows.
- Custom CSS → Dock: customizes · Custom CSS alters the package styling surface.
- App template → App registry: extends · The app template is used to create new bundled app entry points.
- Remote hooks → Dock: integrates with · Remote templates show companion and websocket control integrations.