Commit Graph

8 Commits

Author SHA1 Message Date
Brian Fertig 021d0694df feat: implement user notifications system
- Add UI components for notification navigation (btn + badge) and notification list with unread indicators
- Introduce notifications service with CRUD methods for managing user notifications
- Trigger notifications when users like/favorite songs or playlists via social actions
- Add /account/notifications route to view and mark all notifications as read
- Display unread count in header and account page navigation
2026-04-12 11:43:24 -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 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 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 041f0f2ea1 ```
feat(users): implement user disabling functionality with admin controls

- Add `disabled` column to users table via migration
- Update login flow to reject disabled accounts with 403 error
- Introduce new `/admin/users` route for admin-only user management (disable/enable, verify email, delete with content)
- Extend users service to support listing all users, toggling disabled status, admin verification, and cascading deletion of user's songs/playlists
- Add admin UI for managing users with visual indication of disabled accounts (opacity reduction)
- Update navigation to include "Users" link for admins
```
2026-04-10 20:32:57 -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 ed13c2821c feat(admin): support auto-populating song metadata from embedded audio tags on upload
- Introduce `songUploadSchema` for flexible uploads where title/artist are optional
- Add `extractAudioMetadata()` to parse ID3/Vorbis tags and embedded cover art from uploaded files
- Merge form values with extracted metadata, falling back to filename-derived title if needed
- Automatically write embedded cover art to `media/covers/` when no manual cover is uploaded
- Update song form UI to indicate optional fields and tag-based fallback behavior
- Switch JSON rendering in partials from `<%-` (unescaped) to `<%=`, improving safety
2026-04-09 19:30:31 -06:00
Brian Fertig a515df90de first commit 2026-04-09 18:41:01 -06:00