Golden Path β Frontend overview β
The Golden Path (Frontend) is about how to organize files once your plugin grows beyond a single widget file. Required runtime pieces (frontend/index.ts, usePluginApi, i18n, generated-config) are documented under How to use β use those first; this section is lighter than the backend Golden Path on purpose.
Vue today
Docs assume Vue 3. React support is planned via a Vite abstraction.
Stack (short) β
| Layer | Role |
|---|---|
| Core | Plugin registration, store |
| Orchestrator | Compositions, slots, widgets, URL state |
| Theme | App UI kit (Vuetify, β¦) β How to use β Themes |
| Your plugin | frontend/index.ts, widgets/, optional components/ / composables/ |
UI concepts β
- Composition β workbench layout (grid of widgets).
- Slot β where a composition is shown (
page,modal,inline). - Widget β your
*Widget.vue+setup.ts; only the folder contract is fixed.
URL parameters for a slot become widget props automatically. Reading/writing them in depth: Routing & URL state (advanced).
Golden Path folder shape β
frontend/
βββ index.ts
βββ generated-config.ts # from backend
βββ widgets/
β βββ TodoList/
β βββ TodoListWidget.vue # entry only β keep thin
β βββ setup.ts
βββ components/ # shared across widgets (recommended)
βββ composables/Minimal: all logic in one *Widget.vue β fine for icons or demos.
Golden Path: *Widget.vue as entry; reuse components & composables with normal Vue best practices.
Page map β
| Kind | Page |
|---|---|
| How to use | Plugin index Β· usePluginApi Β· i18n Β· generated-config Β· Themes |
| Golden Path | Widgets Β· Vue structure |
| Advanced | Routing Β· Exports & styles |
| Index | Frontend reference |