Skip to content

Add persistent music player, music upload/delete, and book delete#23

Open
Domirando wants to merge 2 commits into
masterfrom
feature/music-player-and-delete
Open

Add persistent music player, music upload/delete, and book delete#23
Domirando wants to merge 2 commits into
masterfrom
feature/music-player-and-delete

Conversation

@Domirando

Copy link
Copy Markdown
Owner

What's changed

  • Persistent music player — a fixed bottom bar that stays visible across all pages. Audio keeps playing when navigating away from the Music page.
  • Music page rebuilt — replaced Spotify integration with two tabs:
    • My Tracks — lists uploaded tracks with play and delete buttons
    • Upload — upload audio files (MP3, WAV, etc.) to Supabase storage
  • Delete music — removes the track from Supabase storage and the database
  • Delete books — added a delete button to each book in the My Library tab; removes the file from storage and the database row

Supabase setup required

Run this SQL in the Supabase SQL Editor to create the music table and bucket:

CREATE TABLE IF NOT EXISTS public.music (
    id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
    user_id UUID REFERENCES auth.users(id) NOT NULL,
    title TEXT NOT NULL,
    artist TEXT DEFAULT '',
    file_url TEXT NOT NULL,
    file_path TEXT NOT NULL,
    created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL
);

ALTER TABLE public.music ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Allow public read" ON public.music FOR SELECT USING (true);
CREATE POLICY "Allow individual insert" ON public.music FOR INSERT WITH CHECK (auth.uid() = user_id);
CREATE POLICY "Allow individual delete" ON public.music FOR DELETE USING (auth.uid() = user_id);

Also create a music storage bucket in Supabase → Storage → New Bucket (set to public).

- Add MusicPlayerContext to manage global audio playback state across page navigation
- Add persistent bottom-bar MusicPlayer component that stays visible on all pages
- Rebuild Music page with My Tracks and Upload tabs; remove Spotify integration
- Add delete functionality for uploaded music tracks (removes from storage + DB)
- Add delete functionality for uploaded books (removes from storage + DB)
- Add trash icon button to each book in My Library tab
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flower Error Error Jun 12, 2026 5:14am
flower-backend Ready Ready Preview, Comment Jun 12, 2026 5:14am

… delete

- Take origin/master's full implementation (Rust backend, R2 storage, JWT auth, Spotify SDK)
- Integrate MusicPlayerContext for persistent bottom-bar audio player across page navigation
- Own songs now feed into global player context — audio keeps playing when navigating away
- Add delete button to each song in the Your Music section
- Add MusicPlayerProvider wrap in App.jsx alongside JWT-based auth
- Books delete already present in origin/master via api.deleteBook, add delete_btn style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant