Claudio Ortolina 1b89f244f8 Change test to avoid timing-related failures
When inserting twice, the second insertion is a no-op, due to the fact
that we use `on_conflict: :nothing` in the `Repo.insert/2` call.

This means that for fields generated client side like timestamps we
don't get the stored values, but the client side values (which haven't
been persisted).

In case of the test crossing the second boundary, the second asset would
be different because of the timestamps, and the test would fail.

This test is better. It tests that no matter how many times we insert
the same thing we always have one stored.
2025-09-15 07:42:03 +03:00
2025-09-15 07:13:05 +03:00
2024-10-07 08:12:05 +01:00
2025-08-27 09:11:53 +03:00
2025-09-14 17:42:04 +03:00
2025-02-18 12:56:29 +00:00
2025-07-14 08:45:21 +01:00
2025-02-17 18:05:41 +00:00
2025-09-12 14:22:39 +03:00
2025-09-01 11:58:25 +03:00
2025-09-12 14:22:39 +03:00
2025-09-14 17:42:04 +03:00
2025-09-12 17:32:19 +03:00
2025-09-15 07:12:35 +03:00
2025-09-11 22:38:50 +03:00

Music Library

Features

  • Add records from MusicBrainz, with optional override of specific pieces of data
  • Manage a collection and a wishlist of records, with ways to quickly search and filter based on records' metadata
  • Integration with Last.fm:
    • display latest scrobbles, and where possible connect them with records in the collection or wishlist
    • scrobble a record
    • store a local copy of the complete scrobble history, and setup rules to fix its data as needed
  • Some basic stats
  • All data stored in a single SQLite database for portability and ease of backup/restore

Screenshots

Stats

Stats

Collection

Collection

Searching for a record to add

Searching for a Record to add

Edit a record in the collection

Edit a record in the collection

View a record's details in the collection

View a record's details in the collection

View a record's tracklist

View a record's tracklist

Adding a record in the wishlist

Adding a record in the wishlist

View an artist's details

View an artist's details

View the scrobble activity

View the scrobble activity

Setup

The project is managed and configured via mise-en-place:

  • mise install will pull the correct Erlang, Elixir and Node.js versions
  • mise run dev:setup will setup dependencies and database structure

Important

The project uses Fluxon UI, so it requires a valid set of credentials. See the env section in mise.toml for the required environment variables.

Environment configuration

The application requires the following environment variables:

  • LAST_FM_USER: the Last.fm username used to populate the Scrobble Activity
  • LAST_FM_API_KEY (secret): the Last.fm API key used to fetch the Scrobble Activity
  • OPENAI_KEY (secret): the OpenAI API key used to populating genres

In production, the application also requires:

  • LOGIN_PASSWORD (secret): the password used for accessing the application.

You can create a mise.local.toml with the required variables (sample values are included at the top of mise.toml).

Running the application

Start the Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server.

Now you can visit localhost:4000 from your browser. The default password for development is change me.

Deployment

The application provides a Dockerfile suitable for production use. You can build a working image using mise run docker:build.

CI

See the .github folder.

Architecture

See the docs folder.

Favicons

This favicon was generated using the following graphics from Twitter Twemoji:

S
Description
No description provided
Readme 63 MiB
Languages
Elixir 77.4%
Python 10%
TypeScript 6.6%
HTML 3.7%
Shell 1.4%
Other 0.8%