A web interface for the beets music library manager, built with Backbone.js, Marionette, jQuery, and Bootstrap.
- Search and browse your beets music library
- Playback queue with 5-item limit
- Real-time player controls
- Lyrics display
- Local files support
- Responsive Bootstrap 5 interface
- Node.js 20.x or later
- A running beets server (default:
http://127.0.0.1:8337)
# Clone the repository
git clone https://github.com/matlads/beets-web-ui.git
cd beets-web-ui
# Install dependencies
npm install
# Configure environment
cp .env.example .env.local
# Edit .env.local with your beets server URL# Start development server
npm run dev
# Open http://localhost:5173 in your browser# Build for production
npm run build
# The built files will be in the `dist/` directorynpm run dev- Start Vite development servernpm run build- Build for productionnpm run preview- Preview production build locallynpm test- Run Vitest testsnpm run test:coverage- Run tests with coverage reportnpm run lint- Run ESLint lintingnpm run format:check- Check Prettier formattingnpm run format- Format code with Prettier
The project includes comprehensive tests using Vitest with jsdom environment:
# Run all tests
npm test
# Run tests with coverage report
npm run test:coverage
# Watch mode
npm run test:watch- ESLint: Configured with recommended rules and Prettier integration
- Prettier: Code formatting with consistent style
- Type Checking: No TypeScript - plain JavaScript with ES6 modules
Built with classic MVC architecture using:
- Backbone.js - Models, Collections, Router
- Marionette - Views and application structure
- Backbone.Radio - Event-driven communication between components
- jQuery - DOM manipulation
- Bootstrap 5 - UI components and styling
- Vite - Build tool and development server
- Event-Driven Communication: Components communicate via Backbone.Radio channels
- Template-Driven Views: Underscore templates with inline SVG icons
- MVC with Marionette: Application → Regions → Views → Models
- Collection Management: Custom collection methods for API interaction
Automated testing via GitHub Actions:
- Runs on every push to
mainand pull requests - Includes linting, formatting checks, and test coverage
- Coverage reports uploaded as artifacts
- Production build verification
The built dist/ directory contains static files that can be deployed to any web server:
- GitHub Pages
- Netlify
- Vercel
- Traditional web server (Apache, nginx)
This repository includes a GitHub Actions workflow for automatic deployment to GitHub Pages:
-
Enable GitHub Pages in repository settings:
- Go to Settings → Pages
- Select "GitHub Actions" as the source
- The workflow will deploy to
https://matlads.github.io/beets-web-ui/
-
Configure environment variables (optional):
- Set repository secrets for production configuration:
VITE_API_URL: URL of your beets server (e.g.,https://your-beets-server.example.com)VITE_USER_NAME: Default user display name
- Set repository secrets for production configuration:
-
Manual deployment:
# Build with production settings VITE_BASE_PATH=/beets-web-ui/ npm run build # Deploy the `dist/` directory to your web server
The deployment workflow (deploy.yml) runs on pushes to main branch and includes:
- Automated testing before deployment
- Production build with configurable base path
- Secure deployment using GitHub Pages action
To use a custom domain with GitHub Pages:
- Set
VITE_BASE_PATH: /in the deployment workflow - Configure your custom domain in repository Settings → Pages
- Update DNS records to point to GitHub Pages
See AGENTS.md for detailed development guidelines and code style.
MIT © Martin Atukunda