The Music Assistant frontend
Project description
Music Assistant frontend (Vue PWA)
The Music Assistant frontend/panel is developed in Vue, development instructions below.
Recommended IDE Setup
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:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensionsfrom VSCode's command palette - Find
TypeScript and JavaScript Language Features, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Windowfrom the command palette.
Customize configuration
See Vite Configuration Reference.
Project Setup
nvm use node
yarn install
Compile and Hot-Reload for Development
yarn 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
yarn build
Lint with ESLint
yarn 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
interfacefor object shapes: Useinterfacefor defining data shapes andtypefor 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
composableundersrc/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 insrc/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-allutils.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 undertests/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.
- On success: call
- Example pattern:
try { await api.doSomething() toast.success("Action completed successfully") } catch (e) { toast.error("Failed to complete action") }
- Do not use
console.erroras 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 componentsetupor 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
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/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file music_assistant_frontend-2.17.142.tar.gz.
File metadata
- Download URL: music_assistant_frontend-2.17.142.tar.gz
- Upload date:
- Size: 5.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
157aa453f30733383192b432b34f81213c6d53095ccb30ae871044ff4af715f2
|
|
| MD5 |
6cb98acf5d3a322a2cdf8d12f1ca5dd2
|
|
| BLAKE2b-256 |
bade608552e47e49bcceedb1497e687c4ed744e1b73ec769135bdaed7468790c
|
File details
Details for the file music_assistant_frontend-2.17.142-py3-none-any.whl.
File metadata
- Download URL: music_assistant_frontend-2.17.142-py3-none-any.whl
- Upload date:
- Size: 5.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd794a7d868da7ca5a112f0d67254fc9b3e12166da168877131b45b75ed83cb0
|
|
| MD5 |
16f30c55f7e044fa66bc4c8bf694ab54
|
|
| BLAKE2b-256 |
fca8b391eff45497e894c0bdfe41640cf8a1c77f2e34b41a0a3f1d850028c1c5
|