Library / SDK
leerob/next-music-player avatar
leerob/next-music-player

next-music-player serves a local music library from Next.js and Drizzle

A blazing fast, information dense media player built with Next.js.

832 stars93 forksTypeScriptLicense varies

At a glance

What is it?
next-music-player is a Next.js application for playing a folder of local media files, with a Drizzle and Postgres database behind a keyboard driven interface, and it is a personal project with an unspecified licence rather than a distributable product.
Who is it for?
next-music-player suits a developer who wants a self-hosted player for a local music folder, who likes a keyboard driven interface, and who is comfortable running Postgres and a Drizzle migration locally.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 102 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 25, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The unit of the app is a folder of local files

next-music-player is described as a nice GUI for playing and viewing local media files, and the repository description calls it a blazing fast, information dense media player built with Next.js. The important word in both sentences is local. There is no account system, no catalogue service and no streaming backend in the feature list. Instead you put audio files in a top level tracks folder, which is git ignored, and the application reads them. The database exists to hold the song and playlist rows, not to be the source of the media. The project homepage is a deployed instance at next-tracks.vercel.app, which is a demo of the interface rather than evidence of a hosted service. The audience is someone with a personal music collection who wants a fast, dense player for it, and the repository is a single application rather than a library.

Setup is a script that writes your .env

The getting started is three commands, using pnpm rather than npm.

bash
git clone https://github.com/leerob/next-music-player
cd next-music-player
pnpm install

Then the setup script creates the .env file for you.

bash
pnpm db:setup

The package.json shows that the script is npx tsx lib/db/setup.ts, so it runs TypeScript directly through tsx rather than a compiled artifact. The rest of the database commands follow the same pattern: db:migrate runs lib/db/migrate.ts, db:seed runs lib/db/seed.ts, db:generate runs drizzle-kit generate, and db:studio runs drizzle-kit studio so you can look at what is in the database. The presence of a setup script that writes the environment file is a small convenience, but it also means the required variables are not spelled out in the README, so you will be reading the script or the generated file to learn what the application expects.

The import path runs yt-dlp against a playlist

The README says one option to download files is yt-dlp, and that you can provide arguments to download the song metadata as well as the cover image.

bash
yt-dlp -x --audio-format mp3 --add-metadata --embed-thumbnail "https://www.youtube.com/playlist?list=..."

The flags explain the design: extract audio, convert to mp3, write the metadata into the file, and embed the thumbnail as the cover. That means the player does not have to read tags from a remote service at request time, and the cover art and title come from the file itself, which then feeds the seed step that populates the songs and playlists tables. The database step is two commands.

bash
pnpm db:migrate
pnpm db:seed

After that pnpm dev starts the Next.js development server and the app is at http://localhost:3000. The dev script runs next dev --turbo, so the project uses Turbopack for local development.

The interface is keyboard first, and the feature list is honest about its edges

The feature list reads like a list of decisions rather than a list of aspirations, and two of the entries are unfinished. It uses the MediaSession API to sync track metadata with system controls, so the OS media keys and the notification shade reflect what is playing. Space plays or pauses from anywhere in the app. Up and down or j and k move between songs in the tracklist, and h and l move between the playlists panel and the tracklist, so the whole interface is navigable without the mouse. Clicking a song row plays it, the active row has a now playing animation, and the progress bar can be dragged to seek. You can create a new playlist in the UI, add and remove songs, search over songs, and playlist images are uploaded to Vercel Blob. Mobile responsiveness and support for both local and remote files are both listed. Then there are three entries phrased as intentions rather than claims: persist the active song to storage, and hook up the volume controls.

Drizzle with Postgres, and the rest of the stack

The dependency list tells you what kind of application this is. Drizzle ORM at 0.45.2 with drizzle-kit for migrations and the studio, the postgres driver, and zod for validation. The framework is Next.js 16.2.10 with React 19.2.7, Tailwind 4, radix-ui primitives for the dropdown menu, scroll area and slot, lucide-react for icons, and class-variance-authority with clsx and tailwind-merge for styling. The audio metadata comes from music-metadata, and uuid supplies identifiers. Two entries stand out. The ai package with @ai-sdk/openai is present as a dependency, and the README does not describe a feature that uses it, which suggests either work in progress or a leftover. babel-plugin-react-compiler is also there, so the React Compiler is in the build. The project is private in the package.json and has a single devDependency, @tailwindcss/postcss, with pnpm onlyBuiltDependencies listing esbuild and sharp.

Where this stops being the right shape

Two limits are structural. The first is the media source. The documented way to fill the tracks folder is yt-dlp pointed at a playlist URL, which means the app is designed around files that were downloaded from a video platform, and the storage, hosting and terms questions that raises are not addressed anywhere in the README. A player for files you already own and have placed in a folder is a clean and defensible use of this code, and the same code is equally happy with any other source, but the importer as shipped is aimed at one workflow. The second is the project status. There are no GitHub releases, the licence field in the package.json is empty and there is no licence file among the repository entries, and the topics list contains only nextjs, which is a project profile of a personal scratch application rather than a maintained product. For use as a starting point that is fine and the licence ambiguity is the only thing to resolve. For anything you intend to distribute, the licence question has to be answered first.

Editorial conclusion

next-music-player suits a developer who wants a self-hosted player for a local music folder, who likes a keyboard driven interface, and who is comfortable running Postgres and a Drizzle migration locally. It is the wrong choice for a team that needs a licensed, supported product, since the licence field is empty and there is no licence file among the repository entries, and it is the wrong choice for a streaming service, since the model is a local tracks folder and a seeded database rather than a catalogue API. Before deploying it, read the tracks and database steps in the README end to end, decide how you will obtain audio since the documented import path uses yt-dlp against a playlist URL, and check whether the Vercel Blob upload path for playlist images matters to your deployment. The last push was on 2026-07-16 and the repository publishes no releases.

Frequently asked questions

How do I run the next-music-player locally?

Clone the repository, run pnpm install, then pnpm db:setup to create the .env file, add audio files to a top level tracks folder, run pnpm db:migrate and pnpm db:seed, and start the app with pnpm dev. It is then available at http://localhost:3000.

What database does next-music-player use?

Drizzle ORM with the postgres driver, managed through drizzle-kit. The scripts include db:generate, db:migrate, db:seed and db:studio, and a drizzle.config.ts file sits at the repository root.

Which keyboard shortcuts does the next-music-player interface support?

Space plays or pauses from anywhere, up and down or j and k move between songs in the tracklist, and h and l move between the playlists panel and the tracklist. The player also syncs metadata with the system controls through the MediaSession API.

How are local audio files imported into next-music-player?

The README names yt-dlp as one option, with a command that extracts audio to mp3, adds the metadata and embeds the thumbnail, run against a playlist URL. Files are placed in a top level tracks folder, which is git ignored, and then the database is seeded.

Official sources

  1. Issues
  2. leerob/next-music-player on GitHub
  3. Project website
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/leerob-next-music-player.svg)](https://hysenlabs.com/projects/leerob-next-music-player)

Was this useful?