Production-ready real-time music sync platform.
- Real-time Sync: Synced playback across multiple clients using Supabase Realtime.
- JioSaavn Integration: Search and stream high-quality audio.
- Queue Management: Shared queue controlled by Host.
- Dark Mode UI: Premium, matte black aesthetic.
-
Install Dependencies
npm install
-
Environment Variables Create
.env.local:NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_key
-
Database Schema (Supabase) Run this SQL in your Supabase SQL Editor:
create table rooms ( id text primary key, current_song jsonb, queue jsonb, is_playing boolean default false, started_at bigint, created_at timestamptz default now() ); -- Enable Realtime for 'rooms' table (Optional, we use Broadcast channels mostly but good for debug) alter publication supabase_realtime add table rooms;
-
Run Locally
npm run dev
- Host sets the
startedAttimestamp (server-side time approximation or host local time). - Listeners calculate
offset = (Date.now() - startedAt) / 1000. - If drift > 300ms, the client auto-seeks to the correct timestamp.
- Late joiners fetch the snapshot from the
roomstable to sync immediately.
- Next.js 15 (App Router)
- Tailwind CSS v4
- Supabase (Postgres + Realtime)