A streaming radio web application that plays lossless audio (HLS FLAC) with real-time metadata display, album artwork, and song rating functionality.
- Lossless Audio Streaming: HLS FLAC audio playback with HLS.js
- Real-time Metadata: Track info updates every 2 seconds
- Album Artwork: Dynamic cover art display
- Song Rating System: Thumbs up/down with user fingerprinting
- Recently Played: Last 5 tracks with album art
- Responsive Design: Mobile-friendly interface
- Comprehensive Testing: 96 tests with 87% coverage
- Docker Support: Production and development containers
- Security Scanning: Built-in npm audit integration
# Clone the repository
git clone <repository-url>
cd radiocalico
# Start with Docker Compose
docker-compose up -d
# Access the application
open http://localhost:3000# Install dependencies
npm install
# Start PostgreSQL (if not running)
brew services start postgresql@16
# Start the server
npm start
# Access the application
open http://localhost:3000make dev # Start development environment
make dev-test # Run tests
make security # Run security audit
make up # Start production
make help # Show all commandsradiocalico/
├── server.js # Main Express server with PostgreSQL connection
├── package.json # Node.js dependencies and scripts
├── .env # Environment variables (database config)
├── .gitignore # Git ignore rules
└── README.md # This file
- Host: localhost
- Port: 5432
- Database: prototype_db
- User: admin
- Password: (none required for local development)
Access your database directly:
/opt/homebrew/opt/postgresql@16/bin/psql prototype_dbList databases:
/opt/homebrew/opt/postgresql@16/bin/psql -lStop PostgreSQL service:
brew services stop postgresql@16Restart PostgreSQL service:
brew services restart postgresql@16npm start- Start the servernpm run dev- Start in development mode
Returns welcome message and status
{
"message": "Welcome to your prototype API",
"status": "running",
"database": "connected"
}Health check with database connection test
{
"status": "healthy",
"database": "connected",
"timestamp": "2025-11-27T14:15:30.749Z"
}Tests database query functionality
{
"message": "Database query successful",
"version": "PostgreSQL 16.11 (Homebrew)..."
}Edit .env file to modify configuration:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=prototype_db
DB_USER=admin
DB_PASSWORD=
PORT=3000
NODE_ENV=development
- DOCKER.md - Comprehensive Docker deployment guide
- TESTING.md - Testing framework and coverage
- SECURITY.md - Security policies and scanning procedures
- CLAUDE.md - Development guidelines and architecture
- tests/README.md - Detailed testing documentation
Backend:
- Node.js with Express.js
- PostgreSQL 16 with connection pooling
- Environment-based configuration
Frontend:
- Vanilla JavaScript (modular architecture)
- HLS.js for audio streaming
- Canvas/WebGL fingerprinting
- Responsive CSS
Testing:
- Jest test runner
- Supertest for API testing
- Testing Library for DOM testing
- jsdom for browser simulation
- 96 tests, 87% coverage
DevOps:
- Docker multi-stage builds
- Docker Compose for orchestration
- Health checks and monitoring
- Makefile for convenience commands
PostgreSQL not connecting:
- Check if PostgreSQL is running:
brew services list - Restart PostgreSQL:
brew services restart postgresql@16
Port 3000 already in use:
- Change PORT in
.envfile - Or kill the process using port 3000:
lsof -ti:3000 | xargs kill
Database not found:
- Recreate database:
/opt/homebrew/opt/postgresql@16/bin/createdb prototype_db