gnexus-ui-kit for UI primitives and design systemProject decision: do not use TypeScript. Reliability should come from a small API normalization layer, explicit mappers, and runtime response validation where backend shapes are uncertain.
webclient-vue/
docs/
public/
src/
app/
App.vue
main.js
providers.js
api/
client.js
errors.js
http.js
mappers.js
modules/
areas.js
devices.js
scripts.js
schemas/
areas.js
common.js
devices.js
scripts.js
assets/
components/
app/
data/
feedback/
forms/
layout/
overlays/
features/
areas/
devices/
scripts/
router/
index.js
routes.js
stores/
areas.js
devices.js
favorites.js
scripts.js
ui.js
styles/
main.scss
tokens.scss
utils/
concurrency.js
dates.js
format.js
storage.js
index.html
package.json
vite.config.js
Use hash mode first.
Reason:
#!/....Target route mapping:
| Route | Component |
|---|---|
/ |
Redirect to /areas/favorites. |
/devices |
features/devices/pages/DevicesListPage.vue |
/devices/scanning |
features/devices/pages/DevicesScanningPage.vue |
/scripts/actions |
features/scripts/pages/ScriptActionsPage.vue |
/scripts/regular |
features/scripts/pages/ScriptRegularPage.vue |
/scripts/scopes |
features/scripts/pages/ScriptScopesPage.vue |
/areas/favorites |
features/areas/pages/AreaFavoritesPage.vue |
/areas/tree |
features/areas/pages/AreaTreePage.vue |
| fallback | features/system/NotFoundPage.vue |
Future option:
Use Vite environment variables:
VITE_API_BASE_URL=http://smart-home-serv.local VITE_API_PROXY_PATH=/proxy.php VITE_API_TIMEOUT_MS=10000
For local development with Vite dev server:
VITE_API_BASE_URL=http://localhost:5173 VITE_API_PROXY_PATH=/proxy.php
If proxy.php remains in the old webclient/ directory during development, either:
webclient-vue/public/proxy.php for PHP-served deployment;The API client should be promise-based:
const result = await devicesApi.list();
if (!result.ok) {
// normalized error
return;
}
const devices = result.data.devices;
No UI component should parse raw backend envelopes directly.
Layering:
http.js - low-level fetch, timeout, abort, proxy path wrapping.client.js - common request helpers and response normalization.modules/*.js - domain-specific methods.mappers.js - response field unification currently done by Helper.schemas/*.js - lightweight runtime validators for uncertain response shapes.The gnexus-ui-kit repository was not available from this environment, so exact package exports are intentionally not assumed in this spec.
Acceptable integration options, in preferred order:
Whichever option is chosen, create one local compatibility layer:
src/components/ui/ UiButton.vue UiBadge.vue UiCard.vue UiDialog.vue UiInput.vue UiSelect.vue UiTable.vue UiToast.vue
Application code should prefer local compatibility components for app-specific behavior, but these components must remain thin and track UI-kit public APIs. The goal is full UI-kit update compatibility, not a forked component library.
Expected package dependencies:
{
"dependencies": {
"@vitejs/plugin-vue": "latest",
"vite": "latest",
"vue": "latest",
"vue-router": "latest",
"pinia": "latest"
},
"devDependencies": {
}
}
Add exact gnexus-ui-kit dependency only after its packaging format is known.
Recommended scripts:
{
"scripts": {
"dev": "vite --host 0.0.0.0",
"build": "vite build",
"preview": "vite preview --host 0.0.0.0"
}
}
Minimum files for the first working milestone:
src/app/main.jssrc/app/App.vuesrc/router/index.jssrc/router/routes.jssrc/api/client.jssrc/api/modules/areas.jssrc/stores/areas.jssrc/features/areas/pages/AreaFavoritesPage.vuesrc/components/layout/AppShell.vuesrc/components/feedback/AppErrorState.vuesrc/components/feedback/AppLoadingState.vueThe first milestone is complete when /areas/favorites can call GET /api/v1/areas/list, render favorite areas from localStorage, and show an empty state without using any code from the old client.