Skip to main content

Music Assistant frontend (Vue PWA)

The Music Assistant frontend/panel is developed in Vue, development instructions below.

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

nvm use node
pnpm install

Compile and Hot-Reload for Development

pnpm dev

This will launch an auto-reload development environment (usually at http://localhost:3000) Open the url in the browser and a popup will ask the location of the MA server. You can either connect to a locally launched dev server or an existing running server on port 8095.

Type-Check, Compile and Minify for Production

pnpm build

Lint with ESLint

pnpm lint

UI Framework

This project is migrating from Vuetify to shadcn-vue as its primary UI component library.

Development Guidelines

Components

  • Size limit: Keep components under 300–400 lines. If a component grows beyond this, split it into smaller, focused sub-components.
  • Single responsibility: Each component should do one thing well. Extract repeated logic or UI patterns into reusable components.
  • Composition over complexity: Prefer composing small components rather than building monolithic ones with many responsibilities.

UI Components

  • Use shadcn-vue: All new UI should use shadcn-vue components located in src/components/ui/. Do not introduce new Vuetify components.
  • Extend, don't override: If a shadcn-vue component needs customization, extend it via props or slots rather than overriding styles globally.
  • Avoid inline styles: Use Tailwind utility classes for styling. Avoid style="" attributes except for dynamic values that cannot be expressed as classes.

TypeScript

  • Always type props and emits: Define explicit types for all component props and emits — avoid any.
  • Prefer interface for object shapes: Use interface for defining data shapes and type for unions/intersections.
  • No implicit any: Every function parameter and return value should be typed or clearly inferrable.

State & Composables

  • Extract reusable logic into composables: Any stateful logic shared between two or more components belongs in a composable under src/composables/.
  • Keep <script setup> lean: Heavy logic (data fetching, transformations) should live in composables, not inline in the component.

Helpers & Utilities

  • Pure functions go in src/helpers/: Any standalone utility function (e.g. string manipulation, date formatting, data transformation) must be placed in src/helpers/ rather than inlined in a component or composable.
  • One file per concern: Group related helpers in a named file (e.g. src/helpers/string.ts, src/helpers/date.ts). Avoid a single catch-all utils.ts.
  • Test every helper: Each helper file must be covered by unit tests. For new helpers, add a corresponding test file colocated with the helper (e.g. src/helpers/string.test.ts). Existing tests under tests/helpers/ may remain, but new tests should follow the colocated pattern. Helpers with no test coverage should not be merged.

API Calls & User Feedback

  • Always show feedback on API calls: Every API call must be wrapped with user feedback:
    • On success: call toast.success(...) with a clear confirmation message.
    • On failure: call toast.error(...) with a meaningful error message — never silently swallow errors.
  • Example pattern:
    try {
      await api.doSomething()
      toast.success("Action completed successfully")
    } catch (e) {
      toast.error("Failed to complete action")
    }
    
  • Do not use console.error as a substitute for user-facing feedback on API errors (or for meaningful calls).

General Best Practices

  • No magic numbers/strings: Extract constants with descriptive names.
  • Meaningful naming: Variables, functions, and components should clearly describe their purpose. Avoid abbreviations unless universally understood.
  • Keep templates readable: If a template expression is complex, move it to a computed property.
  • Clean up side effects: Always clean up event listeners and intervals in onUnmounted; manually created watchers outside component setup or manual effect scopes must also be cleaned up.
  • Accessibility: Use semantic HTML elements and provide aria-* attributes where appropriate.

Translation Management

We use Lokalise to manage the translation files for the Music Assistant frontend

Lokalise logo

Contributing

If you wish to assist in translating Music Assistant into a language that it currently does not support, please see here https://music-assistant.io/help/lokalise/.


A project from the Open Home Foundation

Release files for music-assistant-frontend 2.17.312

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for music-assistant-frontend 2.17.312
File Size Uploaded
music_assistant_frontend-2.17.312.tar.gz 7.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for music-assistant-frontend 2.17.312
File Interpreter ABI Platform
music_assistant_frontend-2.17.312-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 MB

Release files / music_assistant_frontend-2.17.312.tar.gz

Download URL music_assistant_frontend-2.17.312.tar.gz
Size 7.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a74ffccfeb16e1299acdd1a6d7630ef7b2da375f3bef8c12781776dfd88f4e00
BLAKE2b-256 checksum
How to use checksums
3136fd01e5e5cf8bf40b6531932c0350ce076b565dcf2464489d9925d7f97cf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / music_assistant_frontend-2.17.312-py3-none-any.whl

Download URL music_assistant_frontend-2.17.312-py3-none-any.whl
Size 7.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5fb27096101273b25033b5528c5b3c70380ef9a138857b6e970bddc6b3854d01
BLAKE2b-256 checksum
How to use checksums
7af25d2cb86c921cd906976bc6e0b2537c15bc4220bd8772a4c2415924a6f0cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

2.17.312 This release

2 release files

2.17.9

2 release files

2.17.8

2 release files

2.17.6

2 release files

2.17.5

2 release files

2.17.4

2 release files

2.17.3

2 release files

2.17.2

2 release files

2.17.1

2 release files

2.17.0

2 release files

2.16.8

2 release files

2.16.7

2 release files

2.16.6

2 release files

2.16.2

2 release files

2.16.1

2 release files

2.16.0

2 release files

2.15.3

2 release files

2.15.2

2 release files

2.15.1

2 release files

2.15.0

2 release files

2.14.6

2 release files

2.14.5

2 release files

2.14.4

2 release files

2.14.3

2 release files

2.14.2

2 release files

2.14.0

2 release files

2.13.3

2 release files

2.13.1

2 release files

2.12.0

2 release files

2.11.8

2 release files

2.11.7

2 release files

2.11.6

2 release files

2.11.5

2 release files

2.11.4

2 release files

2.11.3

2 release files

2.11.2

2 release files

2.10.9

2 release files

2.10.8

2 release files

2.10.7

2 release files

2.10.6

2 release files

2.10.5

2 release files

2.9.17

2 release files

2.9.16

2 release files

2.9.14

2 release files

2.9.13

2 release files

2.9.12

2 release files

2.9.11

2 release files

2.9.10

2 release files

2.9.9

2 release files

2.9.6

2 release files

2.9.5

2 release files

2.9.4

2 release files

2.9.3

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.9.0

2 release files

2.8.13

2 release files

2.8.11

2 release files

2.8.10

2 release files

2.8.9

2 release files

2.8.8

2 release files

2.8.7

2 release files

2.8.6

2 release files

2.8.5

2 release files

2.8.4

2 release files

2.8.3

2 release files

2.8.2

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.4

2 release files

2.6.3

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.15

2 release files

2.5.14

2 release files

2.5.13

2 release files

2.5.12

2 release files

2.5.11

2 release files

2.5.10

2 release files

2.5.9

2 release files

2.5.8

2 release files

2.5.7

2 release files

2.5.6

2 release files

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.7

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.15

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page