Commit Graph

245 Commits

Author SHA1 Message Date
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
glenneth 5d31763e85 Add user registration and authentication UI improvements
- Add registration page with form validation
- Add login/register/logout navigation with conditional display
- Add auth-status API endpoint for session checking
- Add auth-ui.js for dynamic nav based on login state
- Update navigation across all pages (front, admin, profile, player)
- Style logout button with subtle red color
- Auto-login after successful registration
2025-10-07 18:39:49 -04:00
glenneth fa1de1c874 Update profile page to match site-wide layout and styling
- Remove narrow profile-container (600px) in favor of standard container (1200px)
- Replace profile-card divs with admin-section to match admin page styling
- Add consistent h1 header matching other pages
- Remove unused profile-container and profile-card CSS classes
- Keep profile-specific utility styles (profile-info, artist-stats, etc.)
2025-10-07 18:39:49 -04:00
glenneth f7bc30f18c Add user profile page with edit functionality 2025-10-07 18:39:49 -04:00
glenneth 1b1445e25f Add user profile page with clip template styling
- Created profile.chtml template with listening statistics, recent tracks, and top artists
- Added profile.js for dynamic data loading and user interactions
- Extended LASS styles for profile-specific elements (artist stats, track items, activity charts)
- Implemented /profile route with authentication and template rendering
- Added profile API endpoints for user data, stats, recent tracks, and top artists
- Added profile link to main navigation
- Includes placeholder functionality for future listening metrics implementation
2025-10-07 18:39:49 -04:00
Glenn Thompson b31800a7db Fix playlist schema mismatch - use track-ids field consistently
- Fixed field name mismatch: schema uses 'track-ids' not 'tracks'
- Handle Radiance DB storing text fields as lists
- Parse/format comma-separated track IDs properly
- Code is now correct but db:update still doesn't persist (i-lambdalite limitation)
- Requires PostgreSQL for full functionality
2025-10-07 18:39:49 -04:00
Glenn Thompson 8af85afe0e Fix playlist schema mismatch - use track-ids field consistently
- Fixed field name mismatch: schema uses 'track-ids' not 'tracks'
- Handle Radiance DB storing text fields as lists
- Parse/format comma-separated track IDs properly
- Code is now correct but db:update still doesn't persist (i-lambdalite limitation)
- Requires PostgreSQL for full functionality
2025-10-06 04:38:03 +03:00
Luis Pereira ba13777206 fix: use nav styles on front page 2025-10-05 20:48:58 -04:00
Luis Pereira d12fde7248 fix: some sizing of live player 2025-10-05 20:48:58 -04:00
Luis Pereira 82071bb18d fix: pseudo selectors on lass are now working 2025-10-05 20:48:58 -04:00
Luis Pereira d87c1be373 fix: lass rules moved up one level
Some rules were one level deeper and being created inside the btn rule
2025-10-05 20:48:58 -04:00
Luis Pereira d0649a611e fix: move font import to lass file 2025-10-05 20:48:58 -04:00
Luis Pereira 8589b774ed fix: add user management page 2025-10-04 16:10:50 -04:00
Luis Pereira c2e7cfe943 feat: move users javascript code to own file 2025-10-04 16:10:50 -04:00
Luis Pereira bd1b993a03 feat: move player javascript code to own file 2025-10-04 16:10:50 -04:00
Luis Pereira 6edbb5754b feat: move frontpage javascript code to own file 2025-10-04 16:10:50 -04:00
Luis Pereira 35f4c6516b feat: move admin javascript code to own file
Some html element ids and api routes are also fixed here.
2025-10-04 16:10:50 -04:00
Brian O'Reilly cd3c2347ec but, you know, include all the things done. 2025-10-04 14:14:15 -04:00
Brian O'Reilly 14b6904cf5 we provisioned b612.asteroid.radio, update the TODO.org file. 2025-10-04 14:11:44 -04:00
Brian O'Reilly 439da74bb3 remove duplicated code. 2025-10-04 10:31:46 -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 b39b54adcb feat: Add live Icecast/Liquidsoap status checks to admin dashboard
- Implement check-icecast-status() to query Icecast API
- Implement check-liquidsoap-status() to check Docker container status
- Update admin page to show real-time streaming infrastructure status
- Note: Auto-scan on startup deferred due to database timing issues
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
Brian O'Reilly ce39a0ca1a nullify this duplicate code prior to deletion. 2025-10-03 13:14:04 -04:00
Brian O'Reilly dee883e76e an incomplete todo list of things to fix for launch. 2025-10-03 13:13:37 -04:00
Brian O'Reilly 0fef44225f we get objects and not arrays, return them appropriately. 2025-10-03 10:19:19 -04:00
Brian O'Reilly 3393d2015f javascript _and_ html in one day? Fade's a real programmer now! 2025-10-03 09:54:51 -04:00
Glenn Thompson 62a1a94daa feat: Update color scheme from green to blue theme
- Change color palette: black→grey→green→red to black→bluegrey→cyan→blue
- Primary text: #00ff00 → #00ffff (green to cyan)
- Headers/accents: #ff6600 → #4488ff (orange to blue)
- Panels/borders: #1a1a1a/#333 → #1a2332/#2a3441 (grey to blue-grey)
- Buttons: #333/#555 → #2a3441/#3a4551 (grey to blue-grey)
- Maintains terminal/hacker aesthetic with cooler color palette
- Requested by Fade for improved visual appeal
2025-10-02 23:24:53 -04:00
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