On this page
Developer guide
Part II — Developer's Guide¶
Understand the architecture, write code following project conventions, and contribute to Baander.
Architecture¶
| Page |
Description |
| Architecture Overview |
DDD bounded contexts, four-layer structure, and shared kernel |
| Shared Kernel |
UUID v7, cursor pagination, search, Swoole async, caching, WebSocket |
| Real-Time Patterns |
WebSocket connection registry, message protocol, party sync |
| Live Updates |
Committed change capture, shared query refresh, ownership, and recovery |
| API Reference |
OpenAPI spec, REST patterns, and authentication flows |
Development¶
| Page |
Description |
| Development Environment |
Docker setup, Makefile commands, IDE config, and Xdebug |
| PHP Dependencies |
Runtime selections, Composer updates, patch reviews and maintenance checks |
| Coding Conventions |
Domain models, value objects, repositories, CQRS, ports, and anti-corruption |
| CQRS and Messaging |
Commands, handlers, domain events, and async processing |
| Search |
PGroonga full-text search, making a context searchable |
| Database Naming |
Index, unique-constraint and foreign-key names in migrations and mappings |
| Testing |
Disposable PHPUnit runners, browser qualification, live-update capacity and evidence boundaries |
| Frontend Development |
React + TypeScript + Vite + styled-components |
Bounded Contexts¶
| Page |
Description |
| Activity |
Listen history and favorites tracking |
| Auth |
OAuth 2.0 server, passkeys, TOTP, and DPoP |
| Catalog |
Artists, albums, songs, movies, videos, and genres |
| Command |
CLI utilities (OpenAPI export) |
| Discovery |
LAN server discovery and device pairing |
| Favorites |
User favorites (songs, artists, albums) |
| Filesystem |
MIME detection and inotify file watching |
| Library |
Media library management and file scanning |
| Lyrics |
Lyrics storage and retrieval |
| Media |
Image storage, streaming, and BlurHash |
| Metadata |
External API enrichment (Discogs, Last.fm, Spotify, MusicBrainz) |
| Notification |
Push, email, webhook, and in-app notifications |
| Party |
Synchronized watch-party playback |
| Playlist |
Manual and smart playlist management |
| QoL |
Stream governance and quality-of-life allocation |
| Radio |
Internet radio, country subscriptions, and station starring |
| Recommendation |
Music recommendation algorithms |
| Scheduler |
Cron-like scheduled job execution |
| Session |
Listening sessions and registered devices |
| Transcode |
CMAF video transcoding via FFmpeg and Swoole |
| User Preference |
Accent color, sidebar, audio/layout/player preferences, EQ profiles, theme mood, and user settings |
| Shared |
Cross-cutting kernel: UUID, Swoole, caching, WebSocket, and settings |
Contributing¶
| Page |
Description |
| Adding a New Feature |
Step-by-step walkthrough for adding an API endpoint |
| Contributing |
Branch naming, commit style, PR process, and documentation maintenance |
| Glossary |
DDD, infrastructure, and data type terminology |
See Also¶
- Part I — Operator's Guide — Prerequisite reading for developers (you need to run the app before you can develop on it).
- AGENTS.md — Agent instructions and pointers to canonical rules and repository skills.