Portable iframe facade for the Wippy frontend. Serves a thin HTML shell that loads the Wippy frontend bundle from a CDN via iframe, with all configuration driven through ns.requirement entries.
index.htmlis served as a static file viahttp.static- On load, it fetches
GET /api/public/facade/configto get runtime configuration - Checks
localStoragefor an auth token, redirects tologin_pathif missing - Loads the Web Host bundle from CDN (
facade_url + '/module.js') - Calls
initWippyApp()with auth, feature flags, and customization config - Shows inline loader/error UI during initialization (no external CSS dependencies)
These fields are NOT configurable via requirements — they are computed at runtime:
| Field | Source | Description |
|---|---|---|
api_url |
PUBLIC_API_URL env var |
Base URL for API calls. Falls back to window.location.origin in the browser if empty. |
ws_url |
Derived from api_url |
WebSocket URL — http:// → ws://, https:// → wss:// |
iframe_origin |
Extracted from fe_facade_url |
Origin portion of facade URL (e.g. https://web-host.wippy.ai), used for postMessage security |
iframe_url |
fe_facade_url + fe_entry_path + ?waitForCustomConfig |
Full iframe URL passed to the Web Host |
| Requirement | Default | Description |
|---|---|---|
server |
(required) | HTTP server for static serving |
router |
(required) | Public router for config endpoint |
| Requirement | Default | Description |
|---|---|---|
fe_facade_url |
https://web-host.wippy.ai/webcomponents-1.0.12 |
CDN base URL for the Web Host frontend bundle |
fe_entry_path |
/iframe.html |
Iframe HTML entry point path (appended to fe_facade_url) |
Passed to the Web Host as customization.i18n.app — controls branding in sidebar and navigation.
| Requirement | Default | Config path | Description |
|---|---|---|---|
app_title |
Wippy |
customization.i18n.app.title |
Short title shown in sidebar header |
app_name |
Wippy AI |
customization.i18n.app.appName |
Full application name |
app_icon |
wippy:logo |
customization.i18n.app.icon |
Iconify icon reference (e.g. custom:logo, tabler:home) |
Passed to the Web Host as feature.* — control UI behavior and visibility.
| Requirement | Default | Type | Description |
|---|---|---|---|
show_admin |
true |
bool (~= "false") |
Show admin panel and keeper controls in the sidebar |
start_nav_open |
false |
bool (== "true") |
Navigation drawer open by default (collapsed shows icons only) |
hide_nav_bar |
false |
bool (== "true") |
Completely hide the left navigation sidebar |
disable_right_panel |
false |
bool (== "true") |
Disable the right sidebar panel |
allow_select_model |
false |
bool (== "true") |
Allow LLM model selection dropdown in chat |
session_type |
non-persistent |
string | Chat session persistence (non-persistent or cookie) |
history_mode |
hash |
string | Browser history mode (hash or history/browser) |
Boolean parsing:
show_admindefaults totrue(any value except"false"is truthy). All other boolean flags default tofalse(only"true"is truthy). This is implemented inconfig_handler.lua.
| Requirement | Default | Description |
|---|---|---|
login_path |
/login.html |
Path to redirect unauthenticated users (no token in localStorage) |
Passed to the Web Host as customization.* — control visual appearance across all host-rendered pages and web components.
| Requirement | Default | Config path | Description |
|---|---|---|---|
custom_css |
Poppins font @import |
customization.custom_css |
Raw CSS string injected as <style> into host and child iframes. Use for font imports, body font-family, and custom rules. |
css_variables |
{} |
customization.css_variables |
JSON object of CSS custom properties (e.g. {"--p-primary":"#6366f1"}). Injected as :root { --key: value; } overrides. Supports @dark and @light variants. |
icons |
{} |
customization.icons |
JSON object of custom Iconify icons (e.g. {"logo":{"body":"<svg>...</svg>","width":24,"height":24}}). Registered under custom: prefix — use as custom:logo. |
- name: facade
kind: ns.dependency
component: wippy/facade
version: "*"
parameters:
- name: server
value: app:gateway
- name: router
value: app:api.publicOnly override what differs from defaults.
- name: hide_nav_bar
value: "true"
- name: disable_right_panel
value: "true"
- name: show_admin
value: "false"
- name: custom_css
value: "@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); body { font-family: 'Inter', sans-serif; }"
- name: css_variables
value: '{"--p-primary":"#6366f1"}' - name: icons
value: '{"logo":{"body":"<svg viewBox=\"0 0 24 24\"><path d=\"M12 2L2 22h20L12 2z\"/></svg>","width":24,"height":24}}'
- name: app_icon
value: "custom:logo"GET /api/public/facade/config returns:
{
"facade_url": "https://web-host.wippy.ai/webcomponents-1.0.12",
"iframe_origin": "https://web-host.wippy.ai",
"iframe_url": "https://web-host.wippy.ai/webcomponents-1.0.12/iframe.html?waitForCustomConfig",
"api_url": "http://localhost:8085",
"ws_url": "ws://localhost:8085",
"feature": {
"session_type": "non-persistent",
"history_mode": "hash",
"show_admin": true,
"allow_select_model": false,
"start_nav_open": false,
"hide_nav_bar": false,
"disable_right_panel": false
},
"customization": {
"custom_css": "@import url('https://fonts.googleapis.com/css2?family=Poppins...');",
"css_variables": {},
"i18n": { "app": { "title": "Wippy", "icon": "wippy:logo", "appName": "Wippy AI" } },
"icons": {}
},
"login_path": "/login.html"
}fetch /api/public/facade/config
→ check localStorage for auth token → redirect to login_path if missing
→ import(facade_url + '/module.js') → load Web Host bundle from CDN
→ initWippyApp({ auth, feature, customization }, '#app')
→ listen for 'authExpired' and 'error' events → redirect to login_path
If any step fails (config fetch, CDN import, missing initWippyApp), the page shows a styled error message with a Retry button. No external CSS is required for the loader/error UI.
The Web Host (initWippyApp) supports additional options that are intentionally not wired as facade requirements because they are advanced or context-specific:
hideSessionSelector— hide session picker dropdownapiRoutes— override API endpoint pathsaxiosDefaults— custom HTTP client defaultsroutePrefix— prefix for internal route links (facade passesapi_urlasroutePrefix)chat.convertPasteToFile— auto-convert pasted content to file uploadsallowAdditionalTags— HTML sanitizer tag whitelistexternalEvents— cross-origin event bridging
These can be set by directly modifying index.html or by creating a custom facade entry.
cd src/facade && wippy publishThe wippy.yaml includes embed: ["public_files"] to bundle index.html into the wapp package.