How zachorosz/byom works
byom is a proof-of-concept music-library manager. A user adds a filesystem location and starts a scan; the scanner walks and synchronizes it into SQLite, then signals a background parse pipeline that extracts audio tags and images and imports browsable albums, tracks, and artists. The UI exposes library browsing, album versions, location management, and scan status/history through RPC, with image blobs served separately. The README documents the scan/parse stages; wiring details for unsampled RPC, importer, and storage implementations are represented only where the tree and sampled entry points support them.
Main entry points: scanner.go Scan coordinator · pipeline.go Parse pipeline · client.ts RPC client · sqlite.go SQLite stores
Components 22
Web interface
- App shell
ui/src/App.tsx - Library pages
ui/src/routes/albums/index.tsx - Album details
ui/src/routes/albums/[id].tsx - Artist pages
ui/src/routes/artists/index.tsx - Management pages
ui/src/routes/settings.tsx - RPC client
ui/src/lib/rpc/client.ts
RPC services
- Library RPC
rpc/library.go - Management RPC
rpc/management.go - RPC handler
rpc/rpc.go - Image endpoint
images/handler.go
Library ingestion
- Scan coordinator
scan/scanner.go - Filesystem walker
scan/walk.go - Directory sync
scan/sync.go - Parse pipeline
metadata/pipeline.go - Metadata parser
metadata/parser.go - Library importer
metadata/importer.go - Audio metadata
metadata/reader.go
Persistence and media
- SQLite stores
sqlite/sqlite.go - Location storage
sqlite/location.go - Image store
images/store.go
Other components
- Library user
- Music filesystem
Connections 30
- Library user → App shell: browses and manages
- App shell → Library pages: routes to
- App shell → Management pages: routes to
- Library pages → RPC client: requests library data
- Artist pages → RPC client: requests artist data
- Album details → RPC client: requests album data
- Management pages → RPC client: manages locations and scans
- RPC client → RPC handler: sends RPC
- RPC handler → Library RPC: dispatches library calls
- RPC handler → Management RPC: dispatches management calls
- Library RPC → SQLite stores: reads library
- Management RPC → Scan coordinator: starts and monitors scans
- Management RPC → Location storage: manages locations
- Scan coordinator → Location storage: resolves scan root
- Scan coordinator → Filesystem walker: walks location
- Filesystem walker → Music filesystem: reads directories
- Scan coordinator → Directory sync: syncs walk results
- Directory sync → SQLite stores: updates scan state
- Scan coordinator → SQLite stores: records and sweeps scans
- Scan coordinator → Parse pipeline: signals dirty dirs
- Parse pipeline → SQLite stores: claims dirs and reads files
- Parse pipeline → Location storage: resolves location
- Parse pipeline → Metadata parser: parses claimed dir
- Metadata parser → Music filesystem: reads audio and images
- Metadata parser → Audio metadata: extracts audio tags
- Metadata parser → Image store: stores image blobs
- Parse pipeline → Library importer: hands over parse result
- Library importer → SQLite stores: imports library records
- Image endpoint → Image store: opens image blobs
- Library user → Image endpoint: requests cover image