cali-coding-starstream
Installation
SKILL.md
StarStream: Real-time Collaboration for StarHTML
StarStream provides a "convention over configuration" approach to real-time features in StarHTML. Follow these instructions to implement synchronized user experiences.
Core Integration Strategy
When tasked with adding real-time features, always follow this workflow:
- Identify Features: Determine if the app needs simple broadcasting, persistence (PocketBase), or conflict-free editing (Loro).
- Initialize Core: Add
StarStreamPlugin(app)to the main application file. - Enable Modules: Toggle
enable_presence,enable_typing,enable_cursor, orenable_historyas needed. - Register SSE: Ensure a
/streamroute exists to provide the EventSource connection. - Emit Events: Use
yield elements(...)in@sseroutes to auto-broadcast UI updates.
Basic Initialization
from starhtml import *
from starstream import StarStreamPlugin