Commit Graph

4 Commits

Author SHA1 Message Date
Brian Fertig 428cfb1008 feat: add PWA support and refine creativity parameter handling
- Register service worker (`sw.js`) with cache-first static assets and network-first HTML pages
- Update `site.webmanifest` with app name, colors, icons at `/static/`, and standalone display mode
- Add `<meta name="theme-color">` in layout for browser UI theming
- Simplify creativity slider: change range from 0–10 to 3.0–7.0 (step 0.5), aligning frontend and backend logic
- Adjust `generate.js` route and `generation.js` service to accept direct temperature values (3.0–7.0) instead of scaled inputs
2026-04-13 19:42:30 -06:00
Brian Fertig 4602087400 feat: implement VIP access control and configurable generation cooldown
- Add `generation_cooldown_seconds` column to `site_settings` (default 180s)
- Add `is_vip` column to `users` table (default 0/false)
- Introduce new `requireVip` middleware for enforcing VIP-only routes
- Restrict song generation access to VIP users or admins
- Add admin UI endpoints to grant/remove VIP status per user
- Allow admins to configure generation cooldown period via admin panel
- Update generation service to use dynamic cooldown (replacing hardcoded 3 minutes)
- Enhance generate page UI with Re-Gen button, improved placeholder text, and rate-limit state updates
- Update header navigation to show "My Music" and "Generate" only for VIP/admin users
2026-04-12 19:26:31 -06:00
Brian Fertig 4046bc20e0 `feat: normalize cover image handling with centralized processing`
- Centralize cover image processing into a new `imageService.processCoverImage()` helper that resizes and crops images to 1000×1000 JPEG.
- Replace ad-hoc embedded-art handling in admin routes (`writeEmbeddedCover`) and publish route (`uploadCover`) with unified `saveCover` function supporting both uploaded files and embedded picture buffers.
- Ensure all cover uploads (songs, playlists, generated songs) go through the new async processing pipeline with proper temp-file cleanup and error handling.
- Update routes to use `async` handlers where cover processing is involved.
2026-04-12 18:06:35 -06:00
Brian Fertig 8b4a28e062 feat: add AI song generation via ComfyUI with rate limiting and admin configuration
- Add database schema for site_settings and generated_songs tables with migration 011_generation.sql
- Implement backend services for settings management and generation workflow (submit/poll ComfyUI)
- Create routes for admin panel (/admin) to configure generation parameters, upload workflow JSON, manage users
- Create generate routes (/generate) with rate limiting (3min cooldown, 10/hour limit), form submission, polling, streaming
- Add frontend UI: generate page with form and rate-limit panel, publish flow for completed generations
- Integrate generation link into header navigation for verified users when enabled
2026-04-12 17:45:12 -06:00