Commit Graph

31 Commits

Author SHA1 Message Date
Brian Fertig e32bb119bb Add wandering space alien cameo to the background scene
- Introduce a green wireframe alien with red eyes that spawns off-screen, waddles among the palms, waves at the camera, and strolls away on a randomized schedule
- Bump PWA cache version (bri-tunes-v10) so installed clients pick up the new bg-grid.js
- Serve /sw.js with Cache-Control: no-cache so browsers revalidate and notice the service worker update promptly
2026-10-26 19:48:22 -06:00
Brian Fertig 46d30a767f Add parallax starfield that drifts with the moon across the sky
- Stars now shift a fraction of the moon's horizontal travel each frame for a subtle depth effect
- Stars leaving one edge re-enter the opposite edge with re-rolled height, brightness, twinkle and sparkle so the field feels alive
- Guard against the edge-to-edge jump when the moon starts a new pass so the starfield never lurches to the other side
2026-10-26 19:36:38 -06:00
Brian Fertig a8396c4024 Add slow moon rise-and-set cycle to background grid
- Moon now drifts along a ~60s arch across the sky, rests ~10s below the horizon, then re-rises from the opposite edge
- Fades out near the horizon so it slips behind it rather than overlapping the line, and rotates once per pass
2026-10-26 19:26:49 -06:00
Brian Fertig 8d1dfb03d4 Add retro diner kiosk scenery with beat-reactive neon signage
- Build a wireframe diner kiosk (facade, serving hatch, rooftop star, pylon sign, gas pump, shrubs) via makeDinerKiosk()
- Place two mirrored kiosks on opposite lanes far apart so one appears only occasionally
- Reuse the existing palm-tree scroll/recycle pass by pushing kiosks into palmTrees with a longer recycleZ spacing
- Drive neonRed and warmGlow material opacity from beat energy so signage flickers brighter on the bass
2026-10-25 20:52:37 -06:00
Brian Fertig a0de5649ef Add sky, equalizer skyline, street lamps, and shooting stars to bg-grid
- Stars: 160 twinkling points with per-star phase/speed and occasional sharp glints
- Moon: wireframe disc with crater rings at a fixed position in the backdrop
- Equalizer skyline: 28 line-segment bars that shimmer idly and grow with bass energy
- Street lamps: poles, arms, light beams, and ground pools on both lanes, reused by the existing scroll/recycle pass so they track the grid
- Lamps' glow, beam, and pool opacity breathe with the beat
- Shooting star: occasional streak that spawns at random intervals, fades in/out over its lifetime
2026-10-25 20:35:15 -06:00
Brian Fertig fb1c951c41 Rework palm trees and flyby vehicles with detailed geometry and per-vehi
- Palm trees now use a curved segmented trunk with ring joints, an icosahedral crown knot, and eight pinnate fronds built from bezier midribs with tapered leaflets, replacing the old cone-based leaves
- Each vehicle (airplane, UFO, car, spaceship, helicopter, rocket) is rebuilt with richer line geometry: swept wings, spoked spinning wheels, rotor blades, engine nozzles, and a flickering exhaust plume
- Vehicles now own their spawn/update behavior so each flies with natural, level attitudes and type-specific motion (banking turns, hover bob, gliding drift, wheel/rotor spin) instead of a shared generic rotation
- Speeds are derived from per-vehicle base values scaled by distance for consistent perspective, and the motorcycle flyby is removed
2026-10-25 20:26:29 -06:00
Brian Fertig 6be01104cb Updated PWA player 2026-04-22 19:52:10 -06:00
Brian Fertig cb2ff2492f feat: add playlist top genres and similar playlists
- Add `top_genres` column to playlists table to store the top 3 genres
- Implement `computeTopGenres`, `updateTopGenres`, and `reindexAllGenres` in playlists service
- Add "Similar Playlists" section to public playlist view based on genre overlap
- Display genre tags on playlist details page
- Add admin panel route to re-index all playlist genres
- Update social tooltip positioning to use fixed positioning for better visibility
- Add CSS styles for genre tags and track numbers
- Increment service worker cache version
2026-04-19 12:10:39 -06:00
Brian Fertig fa98236d52 feat: add hover tooltips for likers/favoriters on social buttons
- Add CSS for social tooltip styling and positioning
- Implement JavaScript to fetch and display likers/favoriters on hover
- Add caching mechanism to reduce API calls
- Create new API endpoint `/api/likers/:type/:id` to fetch user display names
- Add database queries to retrieve likers and favoriters for songs and playlists
- Invalidate cache when social actions are performed
2026-04-18 18:40:17 -06:00
Brian Fertig 569c432fb5 feat: implement preloading of next track in queue
- Add a hidden `preloadAudio` element to buffer the next song in the queue
- Automatically preload the next track after the current one starts playing
- Update service worker cache version to v6 to ensure fresh assets are fetched
2026-04-18 16:08:54 -06:00
Brian Fertig a4954dfaa8 feat: add playlist cover generation and service worker updates
- Add database migration for `generated_playlist_covers` table to track playlist cover jobs
- Implement backend routes for generating, polling, and applying playlist cover art via ComfyUI
- Add `comfyui_node_image_seed` setting to allow configurable seeds for image generation
- Update UI to show "Generate Cover Art" link on playlist forms when image generation is enabled
- Add service worker update notification banner with refresh and dismiss options
- Enhance player with push notifications for now-playing updates
- Update service worker to handle notification clicks and improve caching strategy
2026-04-18 09:18:03 -06:00
Brian Fertig 8170cfb7a2 feat: add social features, user uploads, AI music generation, and PWA enhancements
- Add social features: like/favorite songs and playlists, notifications, and public profile pages
- Enable user music: logged-in users can upload songs and create playlists with visibility controls and NSFW flag
- Implement AI music generation via ComfyUI with per-user rate limiting, workflow configuration, and optional cover art generation
- Expand admin panel for user management and AI settings
- Enhance PWA support: lock-screen controls, background playback, and visualizer
- Add email verification via SMTP and avatar cropping
- Update package version to 1.0.0 and bump service worker cache
2026-04-17 20:12:34 -06:00
Brian Fertig df14aa8975 feat: integrate lightbox for media images and improve media session handling
- Add lightbox support to song/playlist cover images by adding lb-trigger class and data-lightbox attributes
- Prevent default click behavior in lightbox.js to avoid navigation when opening image modal
- Update player UI to conditionally enable/disable lightbox on album art based on cover presence
- Set navigator.mediaSession.playbackState proactively during audio reassignment to prevent OS throttling
- Wrap media session seek handlers in try-catch blocks for compatibility with mobile streaming sources
2026-04-15 21:24:54 -06:00
Brian Fertig 5eadf57068 feat: Add Media Session API support for browser media controls
- Implement `updateMediaSession()` to sync track metadata (title, artist, artwork) with browser's media session
- Update playback state (`playing`/`paused`) via `mediaSession.playbackState`
- Register action handlers for common media controls: play, pause, next/prev track, seek operations
- Integrate `updateMediaSession()` call into `playCurrent()` to show metadata when playback starts

Enables native browser media notification and lock screen controls on supported platforms.
2026-04-14 22:42:37 -06:00
Brian Fertig 31edb59583 feat(admin): add bulk song selection with playlist assignment
- Introduces bulk checkboxes on the songs list page to select multiple songs
- Adds a toolbar with dropdown to add selected songs to existing playlists or create a new playlist
- Implements `/songs/bulk-add` POST endpoint for efficient batch addition of tracks to playlists
- Auto-upgrades playlist visibility when adding more-restrictive songs
- Supports preselecting songs via query parameter when creating a new playlist (`?songs=1,2,3`)
- Includes custom-styled checkboxes, toast notifications, and keyboard-friendly UI interactions
2026-04-12 14:08:42 -06:00
Brian Fertig 335e7d46f6 refactor: unify overlay styling with animated synthwave plasma backdrop
- Replace static gradient backdrops with spinning conic-gradient plasma on both lightbox and now-playing overlays
- Add smooth fade animations (`lb-fade-in-synthwave`/`lb-fade-out-synthwave`) using a dark neutral base
- Introduce `overlay-plasma-spin` animation for continuous rotation and scale pulsing
- Ensure proper z-index stacking and overflow handling for plasma layer (`::before`)
- Clean up single-mode toggle logic: clear stale content before switching modes, reset playlist state when queue changes from single to multi-track
2026-04-12 13:07:27 -06:00
Brian Fertig ce287886aa feat: add big-room single-song overlay with animated visualizer
- Introduce new `#np-bigroom-view` overlay for single-song playback with centered layout and animated circular spectrum visualizer (`#np-viz-big`)
- Refactor now-playing overlay to toggle between playlist mode and big-room mode based on `meta.singleMode`
- Add real-time canvas-based frequency visualization using analyser node, exposed globally as `window.briTunesAnalyser`
- Update song/playlist pages to support single-song playback via new `data-nowplaying-meta` attribute
- Add smart "Now Playing" reopen button that only appears when matching song/playlist is active, with per-song or per-playlist matching
2026-04-12 12:36:08 -06:00
Brian Fertig 20bd6422a6 refactor: rename admin routes and views to mymusic namespace
- Move /admin/* routes to /mymusic/* for clearer user-focused section naming
- Rename admin/ view templates to mymusic/ with updated paths and URLs
- Add cover art preview in song edit form with current cover thumbnail styling
- Update navigation active states to use new /mymusic* paths
- Change now-playing creator link from window.open() to direct navigation
2026-04-12 10:29:00 -06:00
Brian Fertig 561f41f0ce feat: add 3D canvas objects flanking lightbox/now-playing overlays and playlist highlighting
- Introduce dynamic 3D geometry objects (torusKnot, trefoil, hyperboloid, etc.) rendered with Three.js on both sides of the screen when lightbox or now-playing overlay is open; only active on viewports ≥1280px wide.
- Add CSS styling for `.oo-canvas` (z-index 3100) and `.card.playlist-active` to highlight the currently active playlist card with neon-cyan glow effects.
- Extend player.js to track `briTunesActivePlaylistId` and toggle `playlist-active` class on cards via data attributes.
- Add `data-playlist-id` attributes to playlist cards in home, playlists, profile views and play buttons in playlist view for highlighting support.
2026-04-11 15:17:51 -06:00
Brian Fertig cae84f6966 Now Playing Fix 2026-04-11 13:48:56 -06:00
Brian Fertig 25d68e1dcb feat: add user profiles with slugs and enhance now-playing UI
- Add database migration to create unique `slug` column for users table
- Implement profile routes (`/profiles`, `/profiles/:slug`) with views for:
  • listing verified user profiles with avatars, song/playlist counts
  • individual profile pages showing user's songs, playlists, liked items
- Add helper functions in `users.js`, `songs.js`, `playlists.js`, and `social.js`
  to support public visibility filtering and profile data enrichment
- Enhance now-playing overlay UI with:
  • vinyl sleeve animation (sleeve + record peeking behind cover)
  • clickable creator info to open profile page if slug exists
  • track row click to jump directly to a song in the queue
- Update CSS for profiles grid, detail creator links, and overlay styling
- Add "Profiles" link to header navigation

This enables a full user profile system with vanity URLs and improves the
music player experience with visual polish and direct navigation.
2026-04-11 13:46:12 -06:00
Brian Fertig a4c1595eaa feat: add "Now Playing" overlay modal for playlist playback with persistent reopen button
- Introduce a full-screen "Now Playing" overlay modal with left (cover/creator) and right (track list/controls) panels
- Add CSS styles for animated cyan-themed overlay, track list, progress bar, and equalizer visualizer
- Integrate new `now-playing.js` module and update layout to include it
- Refactor playlist action buttons to include a "Now Playing" reopen button that appears when playback starts
- Dispatch `briTunes:queue` event on queue initialization for external UI synchronization
2026-04-11 11:33:35 -06:00
Brian Fertig be5857fe3b feat: add user avatars with cropping and image lightbox
- Add `avatar_path` column to users table via migration 008
- Integrate `cropperjs` and `sharp` for avatar upload, cropping (600×600), and PNG conversion
- Serve avatars at `/media/avatars` with static caching; expose `/static/vendor/cropperjs`
- Add avatar management UI in account settings with modal cropping workflow
- Display creator avatars on song/playlist detail pages (fallback to initial)
- Implement generic image lightbox (`lightbox.js`) for cover art with zoom animations and keyboard support
- Refactor song/playlist detail views to use responsive layout and lightbox-enabled covers
2026-04-11 10:08:05 -06:00
Brian Fertig f044d98afc feat: implement social actions (like/favorite) for songs and playlists
- Add database tables for song/playlist likes and favorites
- Create `social` service with toggle functions and enrichment helpers
- Implement `/api/:type/:id/(like|favorite)` routes with CSRF protection
- Add like/favorite buttons to player, song lists, playlists, and cards
- Support guest → login redirect via `data-require-login`
- Inject CSRF token into layout for JS API requests
2026-04-11 09:12:21 -06:00
Brian Fertig a24f2fe75d feat: add configurable site name via SITE_NAME env var
- Introduce `SITE_NAME` environment variable with fallback to 'Bri-Tunes'
- Propagate `siteName` to templates via `res.locals`
- Replace hardcoded 'Bri-Tunes' references in layout, header, home title, and boot sequence
- Update `.env.example` with new variable
2026-04-11 08:34:11 -06:00
Brian Fertig 08cc6b2b03 feat: add repeat functionality to player UI and enhance song metadata display
- Introduce repeat button with active state styling and toggle logic in player.js
- Update background grid animation to use faster, distance-scaled flyby passes for more dynamic visuals
- Extend song view model (`songs.js`) to include uploader's display name
- Improve user verification flow (`users.js`) to ensure fresh state after async password check
- Add uploader info line in public song page view
2026-04-10 22:01:40 -06:00
Brian Fertig 9438330f22 feat: add playlist creation credit display, shuffle playback, drag-and-drop reordering, and email verification flow improvements
- Display playlist creator name on public and admin playlist views
- Add shuffle playback button for playlists in player UI
- Implement drag-and-drop reordering for playlist tracks with visual feedback
- Improve email verification UX: redirect pending users to verify page with resend option
- Simplify admin routes by removing redundant role checks (user-based filtering already handled)
- Adjust featured playlist count and add "show all" links on home page
2026-04-10 20:14:54 -06:00
Brian Fertig b4af77066a feat: implement three-tier visibility system for songs and playlists
- Add public/logged_in/private visibility levels to songs and playlists via database migration (002_visibility.sql)
- Replace old `is_public` boolean with new `visibility` enum in admin forms, API schemas, and services
- Implement access control logic:
  - Guests see only public items that don't contain restricted tracks
  - Logged-in users see public + logged_in items (excluding private ones)
  - Admins see all; regular users manage their own content
- Auto-upgrade playlist visibility when adding more restrictive songs
- Add UI badges for visibility levels and update admin views to reflect new hierarchy

PWA enhancements:
- Update web manifest with proper name, colors, and icon paths
- Add service worker (sw.js) with cache-first for static assets and network-first for HTML
- Register SW at root (/sw.js) with Service-Worker-Allowed header for full origin scope
- Add theme-color meta tag and navigate.js for client-side routing

Other:
- Update admin nav label from "Admin" to "My Music" to reflect role-based access
2026-04-09 22:40:18 -06:00
Brian Fertig be25e35230 Grid Updates 2026-04-09 21:23:31 -06:00
Brian Fertig f34ff9b8fb UI Update 2026-04-09 20:23:54 -06:00
Brian Fertig a515df90de first commit 2026-04-09 18:41:01 -06:00