Commit Graph

17 Commits

Author SHA1 Message Date
Glenn Thompson 63c32c25f3 Add listener statistics feature design document 2025-12-10 11:11:32 -05:00
Glenn Thompson b6be0ebab1 feat: Convert JavaScript to Parenscript with stream fixes and UX improvements
Major Changes:
- Convert all JavaScript files to Parenscript for better maintainability
- Move spectrum-analyzer to parenscript/ directory structure
- Add parenscript-utils.lisp for shared utilities
- Convert admin.js, player.js, front-page.js, auth-ui.js to Parenscript
- Convert profile.js, users.js, recently-played.js to Parenscript

Stream Reconnect Fixes (from merged PR):
- Add reset-spectrum-analyzer function to properly clean up Web Audio API
- Implement reconnect logic for pauses longer than 10 seconds
- Detect stale audio in 'playing' event and force stream reconnection
- Prevent 'Now Playing' updates while stream is paused
- Reduce reconnect delay to 200ms for faster response
- Add proper spectrum analyzer reset/reinit during reconnection

UX Improvements:
- Change live indicator from blink to smooth pulse (2s ease-in-out)
- Pulse animation like old PowerBook/MacBook sleep indicator
- Add MUTED indicator to spectrum analyzer when audio is muted
- Spectrum continues to flow even when muted (data still streaming)
- Red 'MUTED' text displayed in top-right corner of canvas

Technical Details:
- Parenscript files generate JavaScript via API endpoints
- All player modes updated: main player, front page, popout, frame player
- Improved audio context handling to only create once per element
- Added comprehensive error handling and logging
- Updated asteroid.asd to include parenscript module structure

Documentation:
- Updated all documentation dates to 2025-12-06
- Added PARENSCRIPT-EXPERIMENT.org documenting the conversion
- Updated PROJECT-HISTORY.org with Phase 9 (Visual Audio Features)
- Added comprehensive project statistics (408 commits, 9,300 LOC)

This conversion improves code maintainability by using Lisp throughout
the stack and makes it easier to share code between frontend and backend.
2025-12-06 11:55:24 -05:00
Glenn Thompson 7c7b2c921e fix: Prevent stale audio playback after long pause and reorganize spectrum analyzer
- Detect pauses longer than 10 seconds across all player modes
- Intercept 'playing' event to stop stale buffered audio
- Force stream reconnect to get live audio after long pause
- Reset and reinitialize spectrum analyzer during reconnect
- Prevent 'Now Playing' updates while stream is paused
- Move spectrum-analyzer.lisp to parenscript/ directory
- Update all documentation dates to 2025-12-06
- Add comprehensive project statistics (408 commits, 9,300 LOC)
- Add Phase 9 (Visual Audio Features) to project history

Fixes issue where resuming playback after a long pause would play
old buffered audio instead of the current live stream. The fix uses
the 'playing' event to detect when stale audio starts and immediately
stops it, then reconnects to get fresh stream data.

All player modes updated: main player, front page, popout, and frame player.
2025-12-06 08:36:30 -05:00
Glenn Thompson 637650a5ef docs: Update PROJECT-HISTORY.org with Phase 8 and recent developments
Added Phase 8: Docker Deployment & Documentation (Oct 26 - Nov 1, 2025)
- easilok's Docker containerization work (user init, env vars, Dockerfile)
- Complete Docker deployment documentation
- Documentation updates and refinements
- Cross-distribution package manager support

Updated statistics:
- 213+ total commits (was 205+)
- 2.75 months active development (was 2.5)
- Luis Pereira (easilok) now at 23+ commits

Updated current state to November 2025:
- Complete Docker deployment for streams and application
- Comprehensive documentation overhaul
- Recent achievements section added
- Future work includes live chat and song requests per design.org

Last updated: 2025-11-01
2025-11-01 11:48:27 -04:00
Glenn Thompson 1c85464a5f docs: Fix music directory location, remove Python examples, add package manager notes
- Updated DEVELOPMENT.org: music directory is now asteroid/music/ (not docker/music/)
- Clarified music/ can be a symlink to actual music collection
- Added multiple symlink options for music management
- Removed redundant Python integration examples from API-ENDPOINTS.org
- Removed duplicate Integration Examples section (curl already covered in Testing)
- Added package manager notes to INSTALLATION, DEVELOPMENT, DOCKER-STREAMING, and TESTING
- Notes clarify apt examples can be replaced with dnf, pacman, zypper, apk, etc.
- Maintains clean documentation without cluttering every command
2025-11-01 11:48:27 -04:00
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
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
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
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
Glenn Thompson 803555b8b1 Complete Templates section: CLIP refactoring, user management, pagination, playlists, UI fixes, PostgreSQL setup
 CLIP Template Refactoring:
- Centralized template rendering in template-utils.lisp
- Template caching for performance
- Eliminated code duplication

 User Management:
- Dedicated /admin/users page
- User creation, roles, activation
- Comprehensive API endpoints
- Full test suite

 Track Pagination:
- Admin dashboard: 10/20/50/100 per page
- Web player: 10/20/50 per page
- Smart navigation controls

⚠️ Playlist System (PARTIAL):
- Create empty playlists 
- View playlists 
- Save/load playlists  (database UPDATE fails)
- Audio playback fixed 
- Database limitations documented

 PostgreSQL Setup:
- Docker container configuration
- Complete database schema
- Persistent storage
- Radiance configuration
- Ready for Fade to integrate

 Streaming Infrastructure:
- All 3 streams working (MP3 128k, AAC 96k, MP3 64k)
- Fixed AAC stream (Docker caching issue)
- NAS music mount configured

 UI Fixes:
- Green live stream indicators
- Correct stream quality display
- Now Playing verified working
- Missing API endpoints added

📚 Documentation:
- 6 comprehensive org files
- Complete technical documentation
- Known issues documented

Note: Playlist editing requires PostgreSQL migration (Fade's task)
2025-10-04 09:54:04 -04:00
Glenn Thompson ab7a7c47b5 Complete CLIP template refactoring and all template features
 CLIP Template System:
- Created template-utils.lisp with centralized rendering
- Template caching for performance
- render-template-with-plist for consistent API
- Proper CLIP attribute processors (data-text)
- Documentation in docs/CLIP-REFACTORING.org

 Admin Dashboard Complete:
- System Status: All 4 indicators working (Server, DB, Liquidsoap, Icecast)
- Music Library: Scan, upload, duplicate detection working
- Track Management: Pagination (20/page, configurable 10/20/50/100)
- Player Control: HTML5 audio player with play/pause/stop
- User Management: Moved to separate /admin/users page

 User Management:
- New /admin/users route with dedicated page
- Inline user creation form
- User stats dashboard
- Role management (listener/DJ/admin)
- Activate/deactivate users
- API endpoint /api/users/create
- Tested with curl - all working

 Live Stream & Now Playing:
- Fixed: Green 🟢 LIVE STREAM indicator (was red)
- Fixed: Stream quality display matches selected stream (AAC/MP3)
- Now Playing updates every 10s from Icecast
- No HTML rendering bugs - working correctly

 Track Library:
- Fixed recursive directory scanning bug
- 64 tracks scanned and in database
- Pagination working perfectly

 Front Page & Web Player:
- Station Status shows correct stream quality
- Quality selector updates all displays
- Live stream indicators green
- Now Playing working on all pages

All Templates section items complete [4/4] 
2025-10-04 09:54:04 -04:00
Glenn Thompson 24feeddfa8 feat: Add auto-scan on startup and live Icecast/Liquidsoap status checks
- Auto-scan music library on startup to load existing tracks
- Add check-icecast-status() function to query Icecast API
- Add check-liquidsoap-status() function to check Docker container
- Update admin dashboard to show real-time streaming status
- Eliminates need to manually copy files from incoming on every restart
2025-10-04 09:54:04 -04:00