Commit Graph

166 Commits

Author SHA1 Message Date
Brian O'Reilly a9de5f09f1 match dependencies to interface expectations. 2025-10-02 22:43:15 -04:00
Brian O'Reilly 882a99a22f Merge branch 'glen/feature/aac-streaming'
we lost the ops scripts along the way. restore them.
2025-10-02 11:49:21 -04:00
Glenn Thompson 83ce113473 feat: Restore Docker utility scripts per Fade's request
- Add docker/start.sh and docker/stop.sh back to repository
- Update .gitignore to allow these specific Docker utility scripts
- These scripts provide convenient Docker Compose management
- Maintains general *.sh exclusion while allowing essential Docker scripts
2025-10-02 18:32:56 +03:00
Brian O'Reilly 24a4689cca Merge branch 'glenneth1-feature/aac-streaming'
on the glideslope to actual sound!
2025-10-02 11:06:54 -04:00
Glenn Thompson 85bca1d4fa chore: Add shell script exclusion to gitignore
- Add *.sh rule to prevent shell scripts from being committed
- Remove previously tracked start.sh and stop.sh from docker directory
- Keep repository clean of local automation scripts
2025-10-02 17:48:57 +03:00
Glenn Thompson cc8600d2d8 feat: Update Docker configuration for improved streaming setup
- Updated docker-compose.yml with latest streaming configuration
- Ready for production deployment integration
2025-10-02 17:44:04 +03:00
Glenn Thompson e4df9aa9b3 Fix Docker Compose V2 compatibility in start/stop scripts
- Update docker-compose to docker compose in start.sh and stop.sh
- Resolves WSL2 compatibility issue with modern Docker installations
- Both scripts now work with Docker Compose V2 syntax
2025-10-02 16:51:59 +03:00
Glenn Thompson 41d0e3ffc2 docs: Convert AAC-STREAMING.md to org-mode format
- Replace AAC-STREAMING.md with AAC-STREAMING.org
- Use proper org-mode syntax with headers, code blocks, and emphasis
- Update status to 'COMPLETED - Production Ready'
- Maintain all technical content and documentation structure
- Follow org-mode conventions for better integration with Emacs workflow
2025-10-02 16:51:59 +03:00
Glenn Thompson 88762d3bfc fix: Restore live stream metadata display on web interface
- Fix Icecast API endpoint to use proper HTTP basic authentication
- Handle both string and byte responses from drakma:http-request
- Parse XML response to extract track title and listener count
- Return JSON in format expected by frontend JavaScript

Now Playing info now updates correctly on both front page and player page:
- Shows current track (e.g. 'Vector Lovers - Boulevard')
- Updates every 10 seconds automatically
- Displays real-time listener counts

AAC streaming feature is now complete with full live metadata integration.
2025-10-02 16:51:59 +03:00
Glenn Thompson 4c41777823 fix: Clean up main icecast.xml configuration for production use
- Add <changeowner> section to fix 'run as root' error
- Remove complex mount configurations, let Docker handle automatically
- Fix log directory path from /var/log/icecast2/ to /var/log/icecast/
- Update docker-compose.yml to use main icecast.xml instead of minimal version
- Remove temporary minimal-icecast.xml workaround file

All three streams now working with clean main configuration:
- asteroid.aac (96kbps AAC - recommended)
- asteroid.mp3 (128kbps MP3 - compatible)
- asteroid-low.mp3 (64kbps MP3 - low bandwidth)

AAC streaming feature is now production-ready with proper Docker integration.
2025-10-02 16:51:59 +03:00
Glenn Thompson c908d3eb4c fix: Add Icecast mount configurations for all streams
- Increase sources limit from 2 to 5 in icecast.xml
- Add explicit mount configurations for asteroid.aac and asteroid-low.mp3
- Configure proper stream metadata and settings for each mount point

This should resolve the 403 Forbidden errors for AAC and low quality streams.
2025-10-02 16:51:59 +03:00
Glenn Thompson 9ab4e6c383 fix: Revert unnecessary Docker image change
- Keep original savonet/liquidsoap:792d8bf (Liquidsoap 2.4.1+git)
- Original image already includes FDK-AAC encoder support
- No need to downgrade to v2.2.5
- Update documentation to reflect correct information

The original 792d8bf commit corresponds to Liquidsoap 2.4.1+git which
already has liquidsoap.build_config.optionals.fdkaac available.
2025-10-02 16:51:59 +03:00
Glenn Thompson aad7f49d0c feat: Add AAC streaming support with quality selector
- Add AAC 96kbps stream via %fdkaac encoder in Liquidsoap
- Update Docker image to savonet/liquidsoap:v2.2.5 for AAC support
- Add stream quality selector to front page and player page
- Enable real-time switching between AAC/MP3 formats
- Set AAC as recommended default for better quality/bandwidth ratio
- Add comprehensive documentation in AAC-STREAMING.md

Stream URLs:
- http://localhost:8000/asteroid.aac (96kbps AAC - recommended)
- http://localhost:8000/asteroid.mp3 (128kbps MP3 - compatible)
- http://localhost:8000/asteroid-low.mp3 (64kbps MP3 - low bandwidth)

Benefits:
- 25% bandwidth reduction vs equivalent MP3 quality
- Better audio quality at same bitrate
- Modern streaming standard used by major platforms
2025-10-02 16:51:59 +03:00
Glenn Thompson d8306f0585 feat: Complete Docker streaming integration with web interface
- Add live stream integration to both front page and player page
- Add /api/icecast-status endpoint to fetch real-time stream data
- Add drakma dependency for HTTP requests to Icecast
- Fix JavaScript errors on player page with proper error handling
- Add auto-updating 'Now Playing' info every 10 seconds
- Update .gitignore to preserve docker/music/ directory structure
- Add .gitkeep to maintain docker/music/ folder in repository
- Improve user experience with separate public/registered user flows

Integration now complete:
- Front page: Public live stream access
- Player page: Live stream + playlist management for registered users
- Real-time metadata from Icecast JSON API
- Graceful error handling for missing stream backend
2025-10-02 16:51:03 +03:00
Glenn Thompson e61a5a51df Complete Docker streaming infrastructure and user management fixes
## Docker Infrastructure Improvements
- **Liquidsoap Upgrade**: Updated to latest savonet/liquidsoap:792d8bf tag
- **Port Configuration**: Resolved port conflicts, standardized on port 8000 for streaming
- **Service Integration**: Docker Icecast (8000) + Asteroid web app (8080) architecture
- **Script Updates**: Fixed docker-compose commands for legacy compatibility
- **Documentation**: Comprehensive updates to setup-complete.org with correct URLs

## User Management System Fixes
- **Database Field Handling**: Fixed list vs string format inconsistencies in RADIANCE i-lambdalite
- **Authentication Flow**: Resolved "string designator" errors in user initialization
- **Admin Creation**: Fixed default admin user detection and creation logic
- **Session Management**: Proper handling of user ID storage and retrieval

## Web Interface Improvements
- **Navigation Routes**: Fixed /player/ → /player route mismatch
- **Link Consistency**: All navigation links now match defined routes
- **Template Integration**: Proper CLIP template processing with corrected data types

## Configuration Management
- **RADIANCE Config**: Fixed r-simple-wsessions typo in startup modules
- **Domain Setup**: Added "asteroid" domain to RADIANCE configuration
- **Service Dependencies**: Proper module loading order and error handling

## System Integration
- **Dual-Port Architecture**: Streaming (8000) + Web Interface (8080) separation
- **Service Status**: Integration points for Docker service monitoring
- **Audio Pipeline**: Liquidsoap → Icecast → Web Player workflow established

## Testing & Validation
- **Stream Verification**: Confirmed http://localhost:8000/asteroid.mp3 streaming
- **Web Access**: Validated http://localhost:8080/asteroid/ interface
- **User Authentication**: Tested login/logout and admin panel access
- **Database Operations**: Verified track metadata and user management

This commit establishes a fully functional internet radio streaming platform
with containerized audio services and integrated web management interface.
2025-10-02 16:50:06 +03:00
Glenn Thompson 2689ae690f feat: Add Docker streaming infrastructure for Liquidsoap and Icecast2
- Add complete Docker Compose setup with official Liquidsoap image (savonet/liquidsoap:v2.2.5)
- Add Icecast2 streaming server configuration
- Create dual quality streams (128kbps and 64kbps MP3)
- Add comprehensive documentation in Org format
- Add simple start/stop scripts for easy management
- Update .gitignore to exclude music files and Docker artifacts
- Remove old shell scripts (moved to ~/asteroid-scripts/)
- System-agnostic solution works on any Docker-capable system

This provides a complete streaming solution that works consistently across
all platforms, including Arch Linux where Liquidsoap packages may not be available.
2025-10-02 16:50:06 +03:00
Brian O'Reilly eeeccc7df5 include an interface for authorization. 2025-10-01 12:16:17 -04:00
Brian O'Reilly 919e2f491b courier gives me a headache...
and this is kind of a throw-back 8bit computer style font. The colours
are still kind of aggressively unpleasant (to me), but I'm hesitant to
change due to fear of comitting visual violence to people with normal
colour vision. :)
2025-09-30 21:24:47 -04:00
Brian O'Reilly 969548f9e6 repair merge conflict chaff after the fact. 2025-09-30 20:41:25 -04:00
Brian O'Reilly 69bd4a841f Merge branch 'SystemConfiguration'
just squash the entire state of play into main for better coherence
and decreased confusion.
2025-09-30 15:47:06 -04:00
Glenn Thompson 6b1b330ed2 fix: Correct template paths and navigation links
- Fix CSS paths in admin.chtml, login.chtml, and player.chtml
  (change /static/ to /asteroid/static/)
- Fix navigation links to use correct /asteroid/ prefix
- Fix player link to include trailing slash (/asteroid/player/)
- Resolves 'layout fuckage' issues in SystemConfiguration branch

All templates now properly load CSS and navigation works correctly.
2025-09-30 15:30:02 -04:00
Glenn Thompson d6aee7ba01 Add bordeaux-threads dependency to asteroid.asd
- Required for threading functionality in the authentication system
2025-09-30 14:11:46 -04:00
Glenn Thompson b1a61fae00 Fix user management API authentication and data formatting
- Fixed find-user-by-id to handle BIT type database IDs
- Updated user-has-role-p to extract role from list format
- Enhanced API endpoint to return properly formatted JSON data
- Added comprehensive debugging for authentication flow
- Created login.chtml template with CLIP data binding
- Resolved 'Error loading users' issue in admin panel
2025-09-30 14:11:46 -04:00
Glenn Thompson 84d0bc4ce4 Fix Asteroid Radio authentication system
- Fix database query syntax for RADIANCE hash table returns
- Handle RADIANCE field storage format (lists instead of strings)
- Configure r-simple-sessions module for session management
- Update login page styling to match main site theme
- Implement working authentication with admin/asteroid123
- Add proper error handling and debug logging
- Ensure session persistence and redirects work correctly
2025-09-30 14:11:46 -04:00
Brian O'Reilly 16f3592e97 recursively scan the music directory to implicit depth 2
it is likely that the music library will contain directories of
albums, read the files inside those dirs.
2025-09-30 14:11:46 -04:00
Brian O'Reilly 71a55ee143 user profiles file. 2025-09-30 14:11:46 -04:00
Brian O'Reilly 7ce119cabd Some new dependencies
start up a slynk server in the binary entry point so we can attach Sly
to it and work live without pfaffing about in the threading library,
hiding radiance from Sly/Slynk running inside emacs.
2025-09-30 14:11:46 -04:00
Glenn Thompson d60b73c424 Add bordeaux-threads dependency to asteroid.asd
- Required for threading functionality in the authentication system
2025-09-30 13:20:58 -04:00
Glenn Thompson 00942b60bc Fix user management API authentication and data formatting
- Fixed find-user-by-id to handle BIT type database IDs
- Updated user-has-role-p to extract role from list format
- Enhanced API endpoint to return properly formatted JSON data
- Added comprehensive debugging for authentication flow
- Created login.chtml template with CLIP data binding
- Resolved 'Error loading users' issue in admin panel
2025-09-30 13:20:58 -04:00
Glenn Thompson 806031e57f Fix Asteroid Radio authentication system
- Fix database query syntax for RADIANCE hash table returns
- Handle RADIANCE field storage format (lists instead of strings)
- Configure r-simple-sessions module for session management
- Update login page styling to match main site theme
- Implement working authentication with admin/asteroid123
- Add proper error handling and debug logging
- Ensure session persistence and redirects work correctly
2025-09-30 13:20:58 -04:00
Brian O'Reilly 1778a269d8 recursively scan the music directory to implicit depth 2
it is likely that the music library will contain directories of
albums, read the files inside those dirs.
2025-09-30 13:20:58 -04:00
Brian O'Reilly c0bc316d64 user profiles file. 2025-09-30 13:20:58 -04:00
Brian O'Reilly c5c687ec03 Some new dependencies
start up a slynk server in the binary entry point so we can attach Sly
to it and work live without pfaffing about in the threading library,
hiding radiance from Sly/Slynk running inside emacs.
2025-09-30 13:20:58 -04:00
Brian O'Reilly cc94bcb383 Small moves. delete some binary data and add users.lisp 2025-09-30 12:50:45 -04:00
Glenneth f4a39875d2
Merge pull request #1 from fade/feature/database-implementation
Feature/database implementation
2025-09-11 18:21:33 +03:00
Brian O'Reilly 873b2903cc refactor glenn's database feature into discrete files. 2025-09-11 10:33:26 -04:00
Glenn Thompson cb1d6e5596 Implement complete internet radio streaming system
- Add live streaming with Icecast2 and Liquidsoap integration
- Fix track streaming endpoints with proper RADIANCE database queries
- Implement music library management with metadata extraction
- Add web player interface with HTML5 audio controls
- Fix admin panel functionality for file management
- Create playlist system for continuous radio broadcasting
- Add live stream URL to web interface
- Support MP3 streaming at 128kbps with proper audio processing
- Enable network access for internal radio broadcasting
- Add comprehensive README.org documentation
- Create start/stop scripts for service management
- Use secure random password for streaming authentication
2025-09-11 15:30:01 +03:00
Glenn Thompson 9f1524da02 Implement complete metadata extraction and database integration
- Add taglib dependency for ID3/audio metadata extraction
- Implement extract-metadata-with-taglib function with fallback to basic metadata
- Fix database field access using gethash for RADIANCE hash table records
- Add /admin/scan-library API endpoint for triggering music library scans
- Add /admin/tracks API endpoint for retrieving stored track metadata
- Support MP3, FLAC, OGG, and WAV audio formats
- Implement recursive directory scanning with cl-fad
- Add comprehensive error handling and progress reporting
- Create music directory structure (library/, incoming/, temp/)
- Test metadata extraction workflow with sample files

All core metadata extraction and database functionality now working.
2025-09-11 10:47:57 +03:00
Glenn Thompson 1076582fb4 Implement RADIANCE database integration
- Add database collections for tracks and playlists
- Configure proper RADIANCE field types (:text, :integer)
- Add r-data-model dependency for database backend
- Fix build-executable.lisp RADIANCE environment handling
- Update admin dashboard to show real database connection status
- Database now initializes successfully on server startup
2025-09-11 08:54:12 +03:00
Glenn Thompson 1994e3b515 Merge remote-tracking branch 'upstream/main' 2025-09-10 20:28:35 +03:00
Glenn Thompson 526ae010e9 Add build-sbcl.sh to .gitignore 2025-09-10 10:51:02 -04:00
Glenn Thompson f119390459 Fix API status endpoint and update navigation
- Change API endpoint from /api/status to /status to avoid RADIANCE API call interpretation
- Update navigation link in front-page.chtml to point to new /status endpoint
- API now returns proper JSON instead of 500 error
2025-09-10 10:51:02 -04:00
Glenn Thompson 1d6bb33894 Complete CLIP templating migration
- Remove all inline HTML from asteroid.lisp
- Add CLIP templates: front-page.chtml, admin.chtml, player.chtml
- Implement data-text attribute processor for dynamic content
- Fix LASS compilation to use read-from-string
- Update all route handlers to use clip:process-to-string
- Maintain original asteroid radio functionality and styling
2025-09-10 10:51:02 -04:00
Glenn Thompson 8c9ee3cf33 Merge remote-tracking branch 'upstream/main' 2025-09-10 08:10:35 +03:00
Brian O'Reilly b14a4d5680 tiny cleanup. 2025-09-08 11:07:02 -04:00
Brian O'Reilly 6532633fe9 clean out the Makefile a bit. 2025-09-04 11:58:41 -04:00
Glenn Thompson 50afd14557 Merge branch 'main' of https://github.com/fade/asteroid 2025-09-04 18:52:00 +03:00
Glenn Thompson fa154b2fa5 Remove shebang from build-executable.lisp for --load compatibility 2025-09-04 18:51:51 +03:00
Brian O'Reilly 839b58e730 no shebang shebang 2025-09-04 11:48:19 -04:00
Glenn Thompson 7f0453207a Resolve merge conflict in build-executable.lisp 2025-09-04 18:32:04 +03:00