A WebRTC-based screen sharing application that uses Supabase for signaling between casters and presenters.
- Bun installed on your system
-
Install dependencies:
bun install
-
Set up Supabase:
- Create a new Supabase project at https://supabase.com
- Get your project URL and anon key from the project settings
-
Configure environment variables: Create a
.env.localfile (or.env) in the root directory:BUN_PUBLIC_SUPABASE_URL=your_supabase_project_url BUN_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyBun automatically loads
.env.local/.envand exposes variables prefixed withBUN_PUBLIC_*to the client..env.localis typically gitignored, which makes it a safe place for local credentials. -
Set up database tables:
- Run
bun setup-supabase.ts— the helper script checks tables and prints the SQL you need - Copy the SQL (also found in
supabase-schema.sql) into the Supabase SQL editor and click Run - The script will verify your connection and guide you through the setup
- Run
-
Run the development server:
bun run dev
-
Open the app: The server will display the URL when it starts (typically
http://localhost:3000). Open that URL in your browser.
- Capture a real screen share or fall back to a dummy video stream for testing
- Publish a Supabase offer with metadata (name + room code)
- Share a one-click invite link (
?role=presenter&room=XXXXXX) - Auto-subscribes to answers via Supabase Realtime and finalizes the WebRTC connection when the presenter accepts
- Live feed of pending offers, filterable by room code
- Accept/deny buttons write directly to Supabase and create the WebRTC answer
- Active feeds render inline players with fullscreen controls
- Connection health tracked via RTCPeerConnection state
The application uses two tables:
offers: WebRTC offer SDP + metadata (caster_name,room_code,status)answers: WebRTC answer SDP linked to an offer
See supabase-schema.sql for the complete schema definition.
The app automatically deploys to GitHub Pages on push to main. Configure these secrets in Settings → Secrets and variables → Actions:
BUN_PUBLIC_SUPABASE_URL- Your Supabase project URL (from Settings → API)BUN_PUBLIC_SUPABASE_ANON_KEY- Your Supabase anon key (from Settings → API)
Enable GitHub Pages in repository settings and select "GitHub Actions" as the source.