{"id":19732119,"url":"https://github.com/ffalt/jamserve","last_synced_at":"2025-04-30T02:31:41.161Z","repository":{"id":37828620,"uuid":"153272687","full_name":"ffalt/jamserve","owner":"ffalt","description":"audio library server written in Typescript for NodeJS","archived":false,"fork":false,"pushed_at":"2025-04-04T11:21:38.000Z","size":26880,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T21:51:12.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ffalt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-16T11:14:45.000Z","updated_at":"2025-04-04T11:21:35.000Z","dependencies_parsed_at":"2023-02-18T15:31:30.616Z","dependency_job_id":"73f439e1-d982-40af-af43-985d1e7d05da","html_url":"https://github.com/ffalt/jamserve","commit_stats":null,"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffalt%2Fjamserve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffalt%2Fjamserve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffalt%2Fjamserve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffalt%2Fjamserve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ffalt","download_url":"https://codeload.github.com/ffalt/jamserve/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251629160,"owners_count":21618111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T00:24:49.692Z","updated_at":"2025-04-30T02:31:41.155Z","avatar_url":"https://github.com/ffalt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jamserve Audio Server\n\nAn audio library server written in Typescript for NodeJS\n\n[![Test](https://github.com/ffalt/jamserve/workflows/test/badge.svg)](https://github.com/ffalt/jamserve/actions?query=workflow%3Atest)\n[![Maintainability](https://api.codeclimate.com/v1/badges/78793d8ce54f2e8e6236/maintainability)](https://codeclimate.com/github/ffalt/jamserve/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/78793d8ce54f2e8e6236/test_coverage)](https://codeclimate.com/github/ffalt/jamserve/test_coverage)\n\n## Preamble\n\nThis is my long term pet project to manage/stream/edit my own music collection.\nIt's work in progress and probably always will be.\n\nThis is the backend development repository. See\n\n[Jamberry](https://github.com/ffalt/jamberry) for web-client development\n\n[Jampacked](https://github.com/ffalt/jampacked) for mobile app development\n\n[Jam-Dockerimage](https://github.com/ffalt/jam-dockerimage) Docker-Image for JamServe \u0026 Jamberry\n\n[Jam-Docker](https://github.com/ffalt/jam-docker) run JamServe \u0026 Jamberry with Docker\n\nFeatures:\n\n* REST \u0026 GraphQL API for Media Scanning, Streaming, Transcoding, MP3 ID3v2 Editing, User Management\n* API Specs \u0026 Documentation with OpenAPI, see [JamAPI](https://editor.swagger.io/?url=https://raw.githubusercontent.com/ffalt/jamserve/main/specs/jam.openapi.json)\n* Enhance Metadata via Musicbrainz, LastFM, Wikipedia, lyricsOVH, LrcLib \u0026 AcoustID\n* Database Support for [postgresql](https://www.postgresql.org/) and SQLite for local development\n\n## Requirements\n\n* install [NodeJS](https://nodejs.org/) and [NPM](https://www.npmjs.com/)\n\n* install [FFMPEG](https://ffmpeg.org/)\n\n    `apt-get install ffmpeg`\n\n     manual installation: available in PATH or [environment variable](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#ffmpeg-and-ffprobe): *FFPROBE_PATH* and *FFMPEG_PATH*\n\noptional for metadata matching \u0026 mp3 repair support\n\n* install [fpcalc](https://github.com/acoustid/chromaprint/releases/)\n\n    `apt-get install libchromaprint-tools`\n\n     manual installation: available in PATH or environment variable *FPCALC_PATH*\n\n* install [mp3val](http://mp3val.sourceforge.net/)\n\n    `apt-get install mp3val`\n\n     manual installation: available in PATH or environment variable *MP3VAL_PATH*\n\n* install [flac](https://xiph.org/flac/)\n\n    `apt-get install flac`\n\n     manual installation: available in PATH or environment variable *FLAC_PATH*\n\n## Installation\n\n* run command `npm install` in the root folder of this repository\n* in folder `config`:\n    copy file `firststart.config.dist.json` to `firststart.config.json` and\n    add an admin user / add some media folders (can be changed on runtime via the frontend UI)\n* set environment variables or create an environment variables file `.env`\n\n## Environment Variables\n\nExample `.env` file for debugging on localhost\n\n```dosini\n## Server\n\n# Server Domain URL (e.g. https://music.yourdomain.somewhere)\nJAM_DOMAIN=http://localhost:4040\n\n# Server listen address\nJAM_HOST=0.0.0.0\n\n# Server listen port\nJAM_PORT=4040\n\n# Log Level, possible values: 'error' | 'warn' | 'info' | 'debug'\nJAM_LOG_LEVEL=debug\n\n# JamServe data directory (NOT the media files)\nJAM_DATA_PATH=./data/\n\n# JamServe Frontend Path\nJAM_FRONTEND_PATH=./static/jamberry/\n\n## JSON Web Token https://jwt.io/\n\n# An unique string for your instance to sign the jwt tokens\nJAM_JWT_SECRET=keyboard cat is stomping\n\n# Max Age for a valid jwt (set 0 for no expiration)\n# possible values: 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute'\nJAM_JWT_MAXAGE=1 day\n\n\n## Login: Cookie Session\n\n# Due to CORS security you MUST name all domains where login with session cookie is allowed\n# https://de.wikipedia.org/wiki/Cross-Origin_Resource_Sharing\n# (background: random sites cannot access/create cookies for your domain)\nJAM_ALLOWED_COOKIE_DOMAINS=http://localhost:4040,http://localhost:4200\n\n# An unique string for your instance to sign the session cookie (change it!)\n# http://www.senchalabs.org/connect/session.html\nJAM_SESSION_SECRET=keyboard cat is dancing\n\n# If true, session cookies are only available for https, NOT http\nJAM_SESSION_COOKIE_SECURE=false\n\n# If true, server trusts first reverse proxy like nginx\nJAM_SESSION_TRUST_PROXY=false\n\n# Max Age for a valid session cookie (set 0 for no expiration)\nJAM_SESSION_MAXAGE=1 day\n\n# DB to use: \"postgres\" \n# or: \"sqlite\" (does not support multiuser, so only use it for testing/development)\nJAM_DB_DIALECT=sqlite\n\n# Database name\nJAM_DB_NAME=jam\n\n# Database user\nJAM_DB_USER=jam\n\n# Database user password\nJAM_DB_PASSWORD=jam\n\n# Datebase Unix Socket Path to connect (or use host/port)\n# NOT the socket itself /var/run/postgresql/.s.PGSQL.5432\nJAM_DB_SOCKET=/var/run/postgresql/\n\n# Datebase Host\nJAM_DB_HOST=127.0.0.1\n\n# Datebase Port\nJAM_DB_PORT=5432\n\n```\n\nExample **config/firststart.config.json**:\n\n```json5\n/*\n  Add Admin user and media folders on first start\n */\n{\n  /*\n    Default Admin user\n  */\n  \"adminUser\": {\n    \"name\": \"admin\",\n    /*\n      Since the default admin password is stored in clear in this file,\n      you MUST change it on first login\n    */\n    \"pass\": \"your admin password\"\n  },\n  /*\n    Default Media folders\n    Scan strategies:\n    'auto' -- try to figure it out\n    'artistalbum' -- artist/album folder structure\n    'compilation' -- bunch of compilation folders\n    'audiobook' -- bunch of audiobook folders\n   */\n  \"roots\": [\n    {\"name\": \"Music\", \"path\": \"path/to/music\", \"strategy\": \"auto\"},\n    {\"name\": \"Compilations\", \"path\": \"path/to/compilations\", \"strategy\": \"compilation\"},\n    {\"name\": \"Soundtracks\", \"path\": \"path/to/soundtracks\", \"strategy\": \"compilation\"},\n    {\"name\": \"Audiobooks\", \"path\": \"path/to/audiobooks\", \"strategy\": \"audiobook\"}\n  ]\n}\n```\n\n## Commands\n\n### Start\n\n`npm run start` to run the server (available after a successful build)\n\n### Development Build\n\n`npm run build` to build the server into dist/\n\n### Production Build\n\n`npm run build:prod` to clean \u0026 build the server into dist/\n\n### Develop Full\n\n`npm run develop` to run the server \u0026 rebuild/reload on source file changes\n\n### Clean Dist\n\n`npm run clean` to clean up the distribution folder\n\n### Test\n\n`npm run test` to run all tests\n\n### Test Coverage\n\n`npm run coverage` to run all tests \u0026 generate a coverage report\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffalt%2Fjamserve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fffalt%2Fjamserve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffalt%2Fjamserve/lists"}