Skip to content

netz-sg/sonicvault

Repository files navigation

Buy Me A Coffee

Version License Node Docker Languages

SonicVault

Your music collection is a mess. SonicVault fixes that.

Self-hosted music library manager that scans your files, pulls metadata from the best sources on the web, and organizes everything into a clean folder structure — automatically. Runs on your hardware, works with Plex, Jellyfin, and Emby out of the box.


What It Does

You point SonicVault at a folder full of badly named music files. It figures out what each file is, grabs artist bios, album details, cover art, genres, and synced lyrics from multiple online databases — then sorts everything into a properly structured library with consistent naming.

Before:

downloads/
  track01.flac
  Unknown Artist - Song.mp3
  album_rip_2024.flac

After:

library/
  Radiohead/
    1997 - OK Computer/
      01 - Airbag.flac
      02 - Paranoid Android.flac
      cover.jpg
  Daft Punk/
    2001 - Discovery/
      01 - One More Time.flac

No cloud dependencies. No subscriptions. Just your music, properly organized.

Features

  • Smart Scanning — Reads audio metadata from FLAC, MP3, AAC, OGG, and more using embedded tags and acoustic fingerprinting
  • Metadata Enrichment — Automatically fetches artist bios, album details, genres, cover art, and synced lyrics from multiple sources
  • Library Organization — Moves or copies files into a clean folder structure with customizable naming patterns
  • Cover Art — Downloads high-resolution cover art and optionally embeds it directly into audio files
  • Tag Writing — Writes corrected metadata back into file tags after enrichment
  • NFO Generation — Creates .nfo sidecar files for media server compatibility
  • Auto-Watch — Monitors your library and automatically processes new files on a configurable interval
  • Source Folders — Scan from multiple locations (downloads, NAS, USB drives) into one organized library
  • Undo Operations — Every file operation can be reversed from the operations history
  • Multi-Language — Full English and German interface, selectable during setup or in settings
  • Docker Ready — Ship it anywhere with the included Dockerfile and docker-compose setup

Tech Stack

Layer Technology
Frontend Next.js 14 (App Router), React 18, TypeScript
Styling Tailwind CSS v4, Framer Motion
Database SQLite via better-sqlite3, Drizzle ORM
Audio music-metadata, node-taglib-sharp
Images sharp
State Zustand, TanStack Query
Icons Lucide

APIs & Data Sources

SonicVault enriches your library using these free, public APIs:

Source What It Provides Link
MusicBrainz Artist, album, and track identification. The backbone of all metadata lookups. musicbrainz.org
Cover Art Archive Album cover art in multiple resolutions, sourced from the MusicBrainz ecosystem. coverartarchive.org
fanart.tv High-quality artist images, backgrounds, and additional album artwork. Requires a free API key. fanart.tv
LRCLIB Synced and plain-text lyrics, community-maintained and completely free. lrclib.net
Wikipedia / Wikidata Artist biographies and contextual information. wikidata.org
AcoustID Audio fingerprinting for identifying unknown tracks. (Planned — not yet active) acoustid.org

MusicBrainz, Cover Art Archive, and LRCLIB require no API keys. fanart.tv needs a free key — sign up at fanart.tv/get-an-api-key.

Installation

Option 1: Docker (Recommended)

git clone https://github.com/netz-sg/sonicvault.git
cd sonicvault/docker
MUSIC_PATH=/path/to/your/music docker compose up -d --build

Open http://localhost:3000 and follow the setup wizard. All configuration happens in the browser.

Replace /path/to/your/music with the actual path to your music folder on the host system.

Option 2: Native (Node.js)

Requirements: Node.js 20+, npm

git clone https://github.com/netz-sg/sonicvault.git
cd sonicvault
npm install
npm run db:migrate
npm run dev

Open http://localhost:3000 and follow the setup wizard.

Configuration

All settings are configurable through the web interface under Settings:

Setting Description
Library Path Destination folder for organized music files
Naming Patterns Customize folder/file naming ({artist}, {year}, {album}, {track_number}, {title})
Organize Mode Copy or move files from source to library
Duplicate Handling Skip, overwrite, or rename when a file already exists
Auto Tag Write Automatically write corrected metadata back into audio files
Cover Embedding Embed cover art directly into audio file metadata
NFO Generation Generate .nfo sidecar files for media servers
Auto-Watch Periodically scan, enrich, and organize new files
Interface Language English or German

Project Structure

sonicvault/
├── renderer/                  # Next.js application
│   ├── app/                   # Pages and API routes
│   │   ├── api/               # REST API (albums, artists, tracks, settings, ...)
│   │   ├── albums/            # Album browser
│   │   ├── artists/           # Artist browser
│   │   ├── scan/              # Scanner page
│   │   └── settings/          # Settings page
│   ├── components/            # React components
│   │   ├── layout/            # Sidebar, TopBar, AppShell
│   │   ├── onboarding/        # Setup wizard
│   │   └── ui/                # Reusable UI primitives
│   ├── lib/
│   │   ├── api/               # External API clients (MusicBrainz, fanart, etc.)
│   │   ├── db/                # Database schema, migrations, connection
│   │   ├── i18n/              # Translations (EN/DE)
│   │   ├── services/          # Scanner, enrichment, organizer logic
│   │   └── store/             # Zustand state stores
│   └── styles/                # Global CSS, Tailwind config
├── docker/                    # Dockerfile, docker-compose, migration runner
├── drizzle.config.ts          # Drizzle ORM configuration
└── package.json

Contributing

Contributions are welcome. Fork the repo, create a branch, and open a pull request.

If you find a bug or have a feature request, open an issue.

License

MIT


Built with obsessive attention to music metadata by @netz-sg

About

Self-hosted music library manager — scans, enriches metadata, and organizes your collection automatically.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages