SiteWeaver_CMS/.decisions/frontend_architecture_decisions.yaml
Funky Waddle 180fda0296
Some checks failed
CI / build_and_test (push) Has been cancelled
Mulligan
2026-09-20 00:13:41 -05:00

38 lines
1.9 KiB
YAML

decisions_log:
- question: >
Which build tool bundles the Vue Components and produces the `public/build`
output (e.g. Vite, Webpack, esbuild)?
decision: Vite
rationale: >
Chosen as the build tool despite being new to the author, as a deliberate
opportunity to learn it.
- question: >
How are Vue components mounted into PHP-rendered templates, and how is data
passed from PHP to a mounted component?
decision: >
Components are referenced directly in server-rendered markup as a custom HTML
element tag matching the component name (e.g. `<AlertBox message="Something
went wrong">`); data is passed in as HTML attributes, which Vue exposes to the
component's script block as props.
rationale: >
Matches Vue's own documented Single-File Component usage pattern, keeping the
PHP-side markup declarative rather than needing a separate bootstrap script to
wire up mount points and data.
- question: >
Is there a single global Vue application instance mounting multiple components
per page, or does each interactive widget get its own independent Vue instance?
decision: Each interactive widget gets its own independent Vue instance.
rationale: >
Keeps each widget (Theme/Plugin Editor, Focal Point Selector, Faceted Search
filter panel, etc.) self-contained rather than coordinated through one shared
page-level app instance.
- question: >
Will Vue Components be authored as Single-File Components (`.vue` files needing
a build step) or as plain JS component definitions, and where do their source
files live?
decision: >
Single-File Components (`.vue` files), living under `assets/js/components`
within each theme.
rationale: >
Keeps component source files colocated with the theme that uses them, following
Vue's standard SFC authoring approach.