examples/microfrontend/README.md
This is a single route-level microfrontend host that supports both:
No iframe is used.
/app/*, /app-chat/*) owned by the host shell.GET /api/microfrontend/bootstrap?appPath=/app/<workspace-url>Note: bootstrap endpoint is available only for Enterprise licensing.
Set window.__BUDIBASE_APP_URL__ in index.html.
Default:
window.__BUDIBASE_APP_URL__ = `${window.location.origin}/app/microfrontend`
Requirements:
/app/ or /app-chat/Use this when Budibase login/session handling is enough.
http://localhost:10000.yarn install
yarn dev
http://localhost:5173
Use this when users must log in through your platform OIDC and be silently bridged into Budibase.
http://localhost:10000.cp .env.oidc.example .env
.env:OIDC_ISSUEROIDC_CLIENT_IDOIDC_CLIENT_SECRETyarn install
yarn dev:oidc
http://localhost:5174
This starts:
51735174In OIDC mode, the shell shows Login/Logout actions and uses /auth/* endpoints from bff.server.mjs.
Vite proxies to Budibase:
/api/*/socket/*/builder/*BFF (bff.server.mjs) proxies:
/api/global/auth/* to Budibase auth endpointsWhen using nginx.root.conf in OIDC mode, ensure nginx routes these to BFF:
/auth/*/api/global/auth/*For bridge mode, set Budibase platform URL to the BFF public URL (for local: http://localhost:5174).
This prevents Budibase OIDC redirects from sending users to :10000.
nginx.root.conf demonstrates same-domain path routing and Referer forwarding.