Commit Graph

144 Commits

Author SHA1 Message Date
Glenn Thompson f1eb43b325 docs: Comprehensive documentation update for October 2025
- Created PROJECT-HISTORY.org with complete development timeline
- Updated all documentation dates to 2025-10-26
- Added current features: multiple player modes, stream queue control, dynamic URLs
- Updated repository URLs from placeholders to actual GitHub links
- Refreshed feature lists across all docs to reflect current state
- Added PostgreSQL status (configured, ready for migration)
- Updated root README.org with comprehensive current information
- Improved quick start guides and access points
- Enhanced API documentation with complete endpoint list
- Updated all streaming documentation for Docker setup
- Standardized author attribution across all docs
- Incremented docs version to 3.0

All documentation now accurately reflects the current state of the project
with 205+ commits, 3 core contributors, and 2.5 months of active development.
2025-11-01 11:48:27 -04:00
Luis Pereira a458a85823 feat: added documentation on build and deploy docker based asteroid 2025-10-30 19:08:46 -04:00
Luis Pereira ab3acf1279 feat: add docker setup for asteroid app 2025-10-30 19:08:46 -04:00
Luis Pereira c4fd96289b feat: add custom env volume path for stream containers 2025-10-30 19:08:46 -04:00
Luis Pereira 0930fc2c1c fix: retry user initialization 2025-10-30 19:08:46 -04:00
Brian O'Reilly a2ae329d54 Merge branch 'glenneth1-fix/persistent-player-font'
conflict resolution
2025-10-25 12:36:30 -04:00
Glenn Thompson 66e97aaf37 fix: Replace Courier New with VT323 in persistent audio player frame
- Changed font-family from 'Courier New' to 'VT323' in body style
- Updated quality selector dropdown font to VT323
- Updated disable button inline style to use VT323
- Ensures consistent typography across the entire site
- Popout player already inherits VT323 from main stylesheet
2025-10-25 18:32:46 +03:00
glenneth a795680e99 feat: Add hybrid player with frameset and pop-out options
- Add frameset mode with persistent audio player in bottom frame
- Add localStorage preference system for user choice
- Update all page navigation to work in both regular and frameset modes
- Add enable/disable buttons for frameset mode
- Fix redirect loops and template parameter issues
2025-10-22 18:01:48 -04:00
glenneth d8abd9661d feat: Add pop-out player and queue management improvements
- Add pop-out player window (400x300px) with auto-reconnect on stream errors
- Add queue reordering with up/down buttons in admin panel
- Add 'Load Queue from M3U' functionality
- Remove Play/Stream buttons from track management
- Fix Liquidsoap audio quality issues:
  - Remove ReplayGain and compression to prevent pulsing
  - Change reload_mode to 'seconds' to prevent playlist exhaustion
  - Reduce crossfade to 3 seconds
  - Add audio buffering settings for stability
- Add auto-reconnect logic for both front page and pop-out players
2025-10-22 18:01:48 -04:00
glenneth 01f5806959 feat: Add hybrid player with frameset and pop-out options
- Add frameset mode with persistent audio player in bottom frame
- Add localStorage preference system for user choice
- Update all page navigation to work in both regular and frameset modes
- Add enable/disable buttons for frameset mode
- Fix redirect loops and template parameter issues
2025-10-21 21:50:39 +03:00
glenneth 74cd3625f3 feat: Add pop-out player and queue management improvements
- Add pop-out player window (400x300px) with auto-reconnect on stream errors
- Add queue reordering with up/down buttons in admin panel
- Add 'Load Queue from M3U' functionality
- Remove Play/Stream buttons from track management
- Fix Liquidsoap audio quality issues:
  - Remove ReplayGain and compression to prevent pulsing
  - Change reload_mode to 'seconds' to prevent playlist exhaustion
  - Reduce crossfade to 3 seconds
  - Add audio buffering settings for stability
- Add auto-reconnect logic for both front page and pop-out players
2025-10-19 13:52:59 +03:00
glenneth 9721fbbc8a fix: track search missing query variable
- Add missing query variable in filterTracks() function
- Reads value from track-search input field
- Bug was pre-existing, not introduced by refactoring
2025-10-17 21:38:18 -04:00
glenneth b3fd00cb4d refactor: improve code consistency and maintainability
- Add /api/asteroid/partial/now-playing-inline endpoint for inline text
- Refactor admin.js to use server-side partial (removes 23 lines of JSON/XML parsing)
- Fix hardcoded path in convert-to-docker-path to use *music-library-path* variable
- Consistent with front-page and player refactoring from upstream
- Improves portability and reduces client-side JavaScript complexity
2025-10-17 21:38:18 -04:00
Luis Pereira 4d0b54f7d6 feat: move player to use now-playing partial 2025-10-16 19:02:00 -04:00
Luis Pereira f3d012cbc6 feat: move front-page to use now-playing partial 2025-10-16 19:02:00 -04:00
Luis Pereira d0efc89e33 feat: add HTML partial hidration for now-playing 2025-10-16 19:02:00 -04:00
Luis Pereira 136fa2fa74 fix: avoid icecast xml to be shown on frontend when there is no artist 2025-10-15 06:41:07 -04:00
Luis Pereira 6506f7d153 fix: playlist create button wrap on small screens 2025-10-15 06:40:20 -04:00
Luis Pereira a7fe6a73c7 fix: srollbars only visible when required on chrome browsers 2025-10-15 06:40:20 -04:00
glenneth fd7707eb74 Improve player UI and reduce buffering
- Remove aggressive stream reconnect
- Reduce live stream buffering delay
- Clean up debug logging
- Fix playlist loading errors
2025-10-15 06:38:53 -04:00
glenneth 5f78213d92 Improve audio quality and streaming performance
- Add 5-second crossfades between tracks
- Use ReplayGain for consistent volume (removed normalize())
- Add audio compression to prevent clipping
- Liquidsoap watches playlist file and reloads every 5 seconds
- Fallback to random playback when queue is empty
- Fix playlist to play all tracks in order
2025-10-15 06:38:53 -04:00
glenneth d4edb8bfec Add admin UI for stream queue management
- Queue management section with add/remove/clear controls
- Add to Queue button on each track in library browser
- Search tracks and add to queue
- Add 10 random tracks button
- Live stream monitor with Now Playing display
- Toast notifications for user feedback
- Real-time queue updates
2025-10-15 06:38:53 -04:00
glenneth b64d101f8a Add stream queue control system
- New stream-control.lisp for queue management backend
- M3U playlist generation with Docker path mapping
- API endpoints for add/remove/clear/reorder queue
- Fix library scan deduplication
- Add stream control documentation
2025-10-15 06:38:53 -04:00
Luis Pereira 70263fbfbc feat: stream base url as variable on templates 2025-10-12 09:56:08 -04:00
glenneth 91c77206d1 docs: Add session notes for page flow feature implementation
Comprehensive documentation of:
- Session objectives and accomplishments
- All files modified with detailed changes
- Technical implementation details
- Testing results
- Integration notes for team members
2025-10-12 09:47:38 -04:00
glenneth 8f1ce3f149 docs: Mark Page Flow feature as complete in TODO
Feature fully implemented and tested:
- Admin login redirects to /asteroid/admin
- Regular user login redirects to /asteroid/profile
- Front page nav links conditional on auth status and role
- Session persistence working across navigation
- User management fully functional
- Profile page API endpoints implemented
2025-10-12 09:47:38 -04:00
glenneth 5362c86f9f fix: Complete UI fixes for page flow feature
- Fix api-output wrapper handling in all JavaScript files
- Add profile page API endpoints (profile, listening-stats, recent-tracks, top-artists)
- Fix session persistence - auth-ui.js now correctly detects login status
- Fix user stats display - now shows correct counts (3 users, 1 admin)
- Fix View All Users table - properly displays all users
- Handle empty arrays gracefully in profile.js (no errors for missing data)

All UI issues resolved:
✓ User management page fully functional
✓ Session persists across navigation
✓ Profile page loads without errors
✓ Correct nav links shown based on role
✓ Admin sees Admin link, regular users don't
2025-10-12 09:47:38 -04:00
glenneth 4b8a3a064c feat: Implement role-based page flow and user management APIs
Core Features:
- Login redirects based on user role (admin -> /admin, users -> /profile)
- User registration redirects to /profile page
- Convert user management APIs to use define-api (Radiance standard)
- Add user statistics API endpoint
- Add create user API endpoint
- Add list users API endpoint

Authentication & Authorization:
- Update require-role to return proper JSON for API requests
- Fix password verification with debug logging
- Add reset-user-password function for admin use

API Endpoints (using define-api):
- /api/asteroid/users - Get all users (admin only)
- /api/asteroid/user-stats - Get user statistics (admin only)
- /api/asteroid/users/create - Create new user (admin only)

Bug Fixes:
- Fix JavaScript API path for user-stats endpoint
- Remove dependency on non-existent radiance:api-output
- Use api-output for proper JSON responses

Testing:
- Admin login redirects to /asteroid/admin ✓
- Regular user login redirects to /asteroid/profile ✓
- User creation working (testuser created successfully) ✓
- User statistics loading correctly ✓

Known Issues (non-blocking):
- User table display needs UI fixes
- Profile page needs additional API endpoints
- Session persistence on navigation needs investigation
2025-10-12 09:47:38 -04:00
Brian O'Reilly 26c516c25d this is kind of a dead patch. clean up working set. 2025-10-11 13:21:38 -04:00
Brian O'Reilly b61e9c891a dep to run music scan in parallel. 2025-10-11 13:20:42 -04:00
Brian O'Reilly a739edc16f update TODO with some UI items. 2025-10-11 13:20:14 -04:00
glenneth 6e82688959 Update documentation authors to Asteroid Radio Development Team 2025-10-10 16:13:29 +03:00
glenneth 925a624bda Documentation cleanup: remove outdated files, add API docs, update core documentation 2025-10-10 16:13:29 +03:00
glenneth da054c1ab9 Updated changes in api-refactoring 2025-10-10 07:27:07 -04:00
glenneth e126426acd Updated TESTING.org 2025-10-10 07:27:07 -04:00
Luis Pereira 549ba8b38f feat: improved navbar in all pages 2025-10-10 07:26:39 -04:00
Luis Pereira 2b6bad3348 feat: improved nav styling 2025-10-10 07:26:39 -04:00
Brian O'Reilly dff2f52f7b Merge branch 'glenneth1-api-refactoring-only' 2025-10-10 07:24:58 -04:00
Glenn Thompson 82785e1da1 Fix frontend JavaScript to work with define-api endpoints
- Update API paths from /asteroid/api/ to /api/asteroid/ in users.js and profile.js
- Add RADIANCE API wrapper handling for icecast-status responses
- Improve error handling in player.js loadTracks function
- All frontend code now properly handles define-api response format
2025-10-09 17:50:20 -04:00
Glenn Thompson 5bc6f27840 Fix frontend JavaScript to work with define-api endpoints
- Update API paths from /asteroid/api/ to /api/asteroid/ in users.js and profile.js
- Add RADIANCE API wrapper handling for icecast-status responses
- Improve error handling in player.js loadTracks function
- All frontend code now properly handles define-api response format
2025-10-08 22:56:54 -04:00
glenneth 5e33d2aafe Add comprehensive automated test suite
- Created test-server.sh with 25+ automated tests
- Tests all API endpoints, HTML pages, and static files
- Color-coded output with detailed pass/fail reporting
- Verbose mode for debugging
- Added TESTING.org documentation with usage guide
- CI/CD ready for integration into workflows

Test coverage:
- 15 API endpoints (all define-api conversions)
- 5 HTML pages (define-page)
- Static file serving
- JSON format validation
- Authentication and authorization

All tests passing except Icecast (expected - containers not running)
2025-10-08 22:56:54 -04:00
glenneth e0c1eac408 Refactor API endpoints to use Radiance's define-api macro
- Converted 15 API endpoints from define-page to define-api
- Added JSON API format configuration for proper JSON responses
- Updated all frontend JavaScript files to use new API URLs
- Maintained define-page for HTML pages and static file serving
- Added comprehensive documentation of changes

Benefits:
- Framework compliance with Radiance best practices
- Automatic routing at /api/asteroid/<name>
- Clean lambda-list parameter handling
- Built-in browser/API dual usage support
- Proper HTTP status codes for errors

All API endpoints tested and working correctly.
2025-10-08 22:56:54 -04:00
glenneth a77b7768c4 Add comprehensive automated test suite
- Created test-server.sh with 25+ automated tests
- Tests all API endpoints, HTML pages, and static files
- Color-coded output with detailed pass/fail reporting
- Verbose mode for debugging
- Added TESTING.org documentation with usage guide
- CI/CD ready for integration into workflows

Test coverage:
- 15 API endpoints (all define-api conversions)
- 5 HTML pages (define-page)
- Static file serving
- JSON format validation
- Authentication and authorization

All tests passing except Icecast (expected - containers not running)
2025-10-08 05:20:56 +03:00
glenneth 5fcb1a06d5 Refactor API endpoints to use Radiance's define-api macro
- Converted 15 API endpoints from define-page to define-api
- Added JSON API format configuration for proper JSON responses
- Updated all frontend JavaScript files to use new API URLs
- Maintained define-page for HTML pages and static file serving
- Added comprehensive documentation of changes

Benefits:
- Framework compliance with Radiance best practices
- Automatic routing at /api/asteroid/<name>
- Clean lambda-list parameter handling
- Built-in browser/API dual usage support
- Proper HTTP status codes for errors

All API endpoints tested and working correctly.
2025-10-08 05:09:50 +03:00
glenneth 19c984b238 Merge remote-tracking branch 'upstream/main' 2025-10-08 04:34:56 +03:00
glenneth dde8027b5c WORKING: API-aware authentication returns JSON for API routes
 Solution:
- require-authentication returns T on success, api-output value on failure
- Endpoints check result: if T, execute body; else return api-output value
- api-output sets response data which gets returned to client

 Results:
- API routes return JSON errors (not HTML redirects)
- Page routes still redirect to login
- Player page handles auth errors gracefully
- Shows 'Error loading tracks' instead of crashing

 Pattern:
  (let ((auth-result (require-authentication)))
    (if (eq auth-result t)
        ;; authenticated - execute endpoint
        ...
        ;; not authenticated - return api-output value
        auth-result))

Thanks to easilokx for the guidance on Radiance patterns!
2025-10-07 18:39:49 -04:00
glenneth dff299923e Fix api-output usage: pass structured data with :status and :message
- Remove handler-case that was catching api-output's condition
- Pass alist data structure instead of JSON string
- Use :status and :message keyword arguments as per Radiance docs
- Detection and formatting work correctly
- Issue: api-output doesn't stop execution from helper function
- Need Radiance-specific pattern (redirect works, api-output doesn't)
2025-10-07 18:39:49 -04:00
glenneth 9ec7848b47 Add API-aware authentication with auto-detection (needs execution flow fix)
 Working:
- Auto-detects API requests from /api/ in URI
- Optional :api keyword parameter for explicit control
- Returns JSON for API requests, redirects for pages
- Page redirects work perfectly (admin page redirects to login)
- API detection logs show correct behavior

 Issue:
- API endpoints still execute after require-authentication returns JSON
- radiance:api-output doesn't stop execution like redirect does
- Need proper Radiance mechanism to halt request processing

Question for easilokx:
What's the correct way to stop execution and return JSON from a helper
function like require-authentication? We tried api-output but execution
continues. How does redirect actually stop execution?
2025-10-07 18:39:49 -04:00
glenneth 707e7aba96 WIP: Add API-aware authentication (detection works, need to fix execution flow)
- Add api-auth-error condition for API authentication failures
- Update require-authentication and require-role to detect /api/ routes
- Add :api keyword parameter for explicit API/page mode
- Auto-detects API requests from URI path
- Returns JSON for API requests, redirects for page requests
- Issue: Execution continues after returning JSON, need Radiance-specific solution
2025-10-07 18:39:49 -04:00
glenneth efb96f950e Fix auth form styling: wider forms (600px) and hidden message boxes
- Increased auth-form max-width from 400px to 600px to match site styling
- Reduced form-group margin-bottom from 3rem to 1.5rem for better spacing
- Added display:none to error/success message boxes by default
- Message boxes now only show when server sets display-error/display-success
2025-10-07 18:39:49 -04:00