How brunovieira003/groov-api works
Groov API is a backend for a music player. Its principal workflow accepts uploaded audio or a folder-scan request, queues file processing, and exposes the resulting music library through song, artist, album, playlist, and search endpoints. Other major capabilities include streaming audio and cover art, lyrics, playlist editing, and maintenance tasks. The sampled controllers and services support the request-to-service links shown; worker internals and several service implementations were not sampled, so uncertain processing links are omitted.
Main entry points: src/index.ts HTTP application · controller.ts Search routes · service.ts Song service · database/index.ts Database access
Components 19
API entry
- HTTP application
src/index.ts - Song routes
src/resources/song/controller.ts - Artist routes
src/resources/artists/controller.ts - Album routes
src/resources/albums/controller.ts - Playlist routes
src/resources/playlists/controller.ts - Task routes
src/resources/tasks/controller.ts - Search routes
src/resources/tools/controller.ts
Music library
- Song service
src/resources/song/service.ts - Artist service
src/resources/artists/service.ts - Album service
src/resources/albums/service.ts - Playlist service
src/resources/playlists/service.ts
Ingestion and tasks
- Task service
src/resources/tasks/service.ts - Scan command
src/bin/scan.ts - File read queue
src/lib/queues/read-file.ts - Prune queues
src/lib/queues
Persistence and files
- Database access
src/database/index.ts - Music schema
src/database/schema.ts - Audio and images
src/lib/constants.ts
Other components
- Player client
Connections 29
- Player client → HTTP application: sends requests
- HTTP application → Song routes: dispatches
- HTTP application → Artist routes: dispatches
- HTTP application → Album routes: dispatches
- HTTP application → Playlist routes: dispatches
- HTTP application → Task routes: dispatches
- HTTP application → Search routes: dispatches
- Song routes → Song service: calls
- Artist routes → Artist service: calls
- Album routes → Album service: calls
- Playlist routes → Playlist service: calls
- Task routes → Task service: calls
- Search routes → Song service: searches
- Search routes → Artist service: searches
- Search routes → Album service: searches
- Search routes → Playlist service: searches
- Song routes → File read queue: enqueues file
- Task service → File read queue: enqueues scan
- Task service → Prune queues: enqueues pruning
- Song service → Database access: queries
- Artist service → Database access: queries
- Album service → Database access: queries
- Playlist service → Database access: queries
- Database access → Music schema: uses schema
- Song service → Audio and images: reads audio and lyrics
- Song service → Audio and images: reads covers
- Playlist service → Audio and images: reads and writes covers
- Artist service → Audio and images: reads covers
- Album service → Audio and images: reads covers