Find a file
Glenn Thompson fbc6c6b002 Add GeoIP listener stats with Fluxion component
- GeoIP lookup module (ip-api.com with cache)
- Session lifecycle: create, touch, close with geo enrichment
- Dev mode (FLUXEROID_DEV_GEO) for localhost testing
- Admin stats page as Fluxion component with SSE push
- Geographic distribution and top listeners leaderboard
- Seed/clear test data via defaction (live update, no reload)
- Privacy-safe IP hashing with SHA256
2026-05-08 16:55:17 +01:00
docker Auth-aware nav, favicon, SPA navigation fixes, schedule manager 2026-05-08 12:20:17 +01:00
music Fix Docker ports and music path for local dev 2026-05-07 13:23:33 +01:00
playlists Fix compilation: config section syntax, paren balancing, pg package name 2026-05-07 15:11:19 +01:00
src Add GeoIP listener stats with Fluxion component 2026-05-08 16:55:17 +01:00
static Fix scan-library route, track display, and paren balancing 2026-05-08 16:00:02 +01:00
fluxeroid.asd Add GeoIP listener stats with Fluxion component 2026-05-08 16:55:17 +01:00
justfile Add stream info panel, request system, paginated library browser 2026-05-08 14:25:31 +01:00
README.org Fix Docker ports and music path for local dev 2026-05-07 13:23:33 +01:00

Fluxeroid Radio

Overview

Fluxeroid is a rewrite of Asteroid Radio using the Fluxion web framework. It provides internet radio streaming with live reactive UI, Icecast/Liquidsoap integration, and PostgreSQL persistence.

Architecture

  • Framework: Fluxion (HTML-over-the-wire, SSE, Lattice reactivity)
  • Database: PostgreSQL (via fluxion/db-pg)
  • Streaming: Icecast2 + Liquidsoap (Docker-managed)
  • UI: Server-rendered CLOS components with SSE push updates
  • Styling: LASS (dark theme, Asteroid colour scheme)

Features

  • Live stream player with now-playing display (SSE-reactive)
  • Music library scanning and metadata extraction
  • Stream queue management with M3U playlist generation
  • Automatic playlist scheduling (time-based rotation)
  • User accounts with roles (listener, dj, admin)
  • User favorites and listening history
  • Track request system
  • Listener statistics with GDPR-safe IP hashing
  • Geographic listener distribution
  • Admin dashboard with service status
  • REST API for all operations

Quick Start

;; Start Docker infrastructure
;; $ cd docker && docker compose up -d

;; Load and start
(ql:quickload :fluxeroid)
(fluxeroid:start :port 8080)

;; Stop
(fluxeroid:stop)

Project Structure

src/
  package.lisp          - Package definitions
  config.lisp           - Configuration (env vars + fluxion/config)
  migrations.lisp       - Database schema migrations
  models.lisp           - Data access layer
  library.lisp          - Music library scanning
  stream.lisp           - Queue management, M3U generation
  liquidsoap.lisp       - Liquidsoap telnet control
  icecast.lisp          - Icecast status polling
  scheduler.lisp        - cl-cron playlist rotation
  stats.lisp            - Listener statistics
  playlists.lisp        - Playlist file management
  requests.lisp         - Track request system
  components/
    layout.lisp         - Page shell, nav, footer
    player.lisp         - Stream player (SSE-reactive)
    now-playing.lisp    - Live now-playing display
    library-browser.lisp- Track listing
    admin/
      dashboard.lisp    - System status overview
      queue.lisp        - Stream queue management
      users.lisp        - User management
      stats.lisp        - Listener analytics
  pages.lisp            - Route definitions
  api.lisp              - REST API endpoints
  app.lisp              - Application entry point
static/
  styles.lass           - LASS stylesheet (Asteroid colour scheme)
docker/
  docker-compose.yml    - PostgreSQL + Icecast + Liquidsoap

Docker Services

Service Port Purpose
PostgreSQL 5433 Database (host-mapped)
Icecast 8001 Stream distribution
Liquidsoap 1234 Stream source/telnet
Fluxeroid 8080 Web application

Environment Variables

Variable Default Description
FLUXEROID_DB_NAME fluxeroid PostgreSQL database
FLUXEROID_DB_USER fluxeroid Database user
FLUXEROID_DB_PASSWORD fluxeroid_dev Database password
FLUXEROID_DB_HOST localhost Database host
FLUXEROID_DB_PORT 5433 Database port
FLUXEROID_MUSIC_PATH app/music Music library path
FLUXEROID_STREAM_URL http://localhost:8001 Icecast base URL
FLUXEROID_PORT 8080 Web server port
FLUXEROID_ICECAST_PASS fluxeroid_admin Icecast admin pass

Migration from Asteroid

Asteroid (Radiance) Fluxeroid (Fluxion)
CLIP templates Spinneret CLOS components
Parenscript JS per page Fluxion client runtime
JS polling now-playing SSE push via Lattice cells
Radiance DB abstraction fluxion/db-pg direct
define-page defroute + components
define-api (Radiance) fluxion/api define-api
Session via Radiance fluxion/session-db
format t debugging fluxion/log structured
defparameter config fluxion/config persistent