nfunc

v0.5.2

A catalogue for your music collection — the records on the shelf and the files on disk — kept on your own machine, and shared over Nostr when you choose.

What it is

A desktop app for Apple, Linux and Windows. Your catalogue lives in a single database file that the app carries with it. ndisc reads the tags in your audio files, and can write them. It publishes with a Nostr keypair that is yours. You can open, create, import and export databases.

The stack

Tauri 2 desktop binary, React 19, TypeScript, Tailwind v3.

SQLite (through rusqlite, bundled), lofty to read audio tags and pull out embedded artwork, nostr-sdk to publish to relays, keyring to hold the secret key in the operating system’s keychain, and reqwest to fetch cover images.

The catalogue is at ~/.local/share/uk.upleb.ndisc/discography.db on Linux by default. The path is set per install, from the database switcher in the header.

Get it

Version 0.5.2. Every release, and the source: GitHub.

Features

Library import
Point it at a music folder and each directory of audio files becomes a release: FLAC, MP3, M4A, AAC, Ogg, Opus, WAV, AIFF, APE, WavPack, DSD and more, with the cover beside them. Records come in from a Discogs collection export.
Cover art kind:31237kind:24242kind:10063
Shows the cover from an https address, and falls back to the file in the album folder. It can pull artwork out of the audio files themselves, and put a cover on your own Blossom server so the release points there.
Labels kind:31238
A library of record labels and their artwork, which you can publish so other apps show the same images.
Genres kind:31237
Up to three per release, from a fixed list, so the same word means the same thing everywhere.
Where it came from, and duplicates kind:5
Note where you got each release — Bandcamp, a shop, a marketplace. That stays on your machine and is never published. A record you own twice, on the shelf and on disk, can be merged into one entry; the spare one is withdrawn from the network first.
Current kind:31239kind:4550kind:30000
Short notes — now playing, just added — published as a feed the other apps read.
Refresh from disk
Rescan the library when files change. A scan never overwrites what you have curated: it reports the disagreement and you decide.
Content audit
Compares what the relays are serving with what your catalogue would publish today, tag by tag, and changes nothing.

Identity and publishing

Your key kind:0
Make a new keypair or bring one. The secret key is never written to a plain file: it goes into the operating system’s own store.
  • Linux — the Secret Service (libsecret)
  • macOS — the Keychain
  • Windows — Credential Manager
Publish kind:31237kind:5kind:7
One release or the whole library. Each release is its own event that can be replaced in place, with a link you can share. Unpublish asks the relays to delete it. Listeners can react to a release.

Publishing is public, permanent and indexable, and a list of the music you own is a personal disclosure. ndisc asks you to confirm before it publishes a whole library.

How Nostr does it

There is no NIP for a personal music collection, so the release event is the suite’s own convention, not a Nostr standard: an addressable event of kind 31237, experimental and not registered. Its address is 31237:<pubkey>:<d>, shared as an naddr1… link.

Event kinds

  • kind:31237 a release — the suite’s own convention
  • kind:31238 the label library — the suite’s own convention
  • kind:31239 a feed note — the suite’s own convention
  • kind:0 your profile — read for your name and NIP-05
  • kind:5 a deletion request (NIP-09)
  • kind:7 a reaction (NIP-25)
  • kind:4550 an approval of a feed note (NIP-72)
  • kind:30000 a people set: who may contribute (NIP-51)
  • kind:24242 permission for one upload to a Blossom server (BUD-01)
  • kind:10063 your list of Blossom servers (BUD-03)

NIPs in play

  • NIP-01 the base event protocol
  • NIP-09 deletion requests — Unpublish
  • NIP-19 naddr links to a published release
  • NIP-25 reactions on releases
  • NIP-51 the people set of feed contributors
  • NIP-72 approvals of feed notes
  • NIP-73 external ids — the Discogs release
  • NIP-65 relay lists — not emitted yet

The release event

TagCarries
drequireda stable id for the release
titlerequiredalbum or release title
artistrequiredthe album-level artist
mediumrequiredphysical or digital
typemusic, sample, stem, field-recording, message, other
categoryalbum, ep, single, compilation, mix, live, soundtrack…
formatLP, CD, FLAC 24/96, MP3 320…
yearfour digits
labelrecord label
catalogcatalogue number
countrytwo letters, or free text
conditionphysical only: M, NM, VG+…
sourcea link to the listing, only when it is a real URL
irepeatsexternal ids (NIP-73) — the Discogs release
trepeatsone per genre
imagecover art address; relays do not store images
trackstrack count
videovideo count, when there is any

The event’s content carries your notes. The full contract is in the README.

glmps, the companion site

A public, read-only view of a published discography, in a browser: glmps.nfunc.xyz.