Architecture
@open-condo/bridge, which wraps postMessage in a Promise-based API with request tracking and timeouts. The host resolves each request and posts back a <MethodName>Result or <MethodName>Error event.
Key packages
@open-condo/bridge
Core postMessage bridge. Provides
send, subscribe, unsubscribe, and supports — everything a mini-app needs to talk to the Condo host.@open-condo/miniapp-utils
Helper functions, hooks, and Apollo middleware for common mini-app patterns: launch params, SSR proxying, tracing, environment detection, and more.
Mini-app template
The
@app/miniapp workspace in the monorepo is a ready-to-fork Next.js + KeystoneJS template that wires up auth, Apollo, i18n, and frame resizing for you.Condo marketplace
Mini-apps are surfaced to end-users through the Condo service marketplace. Any registered mini-app can be discovered and launched by residents and staff.
Use cases
- Marketplace extensions — add domain-specific screens (billing, inspections, smart-home controls) directly into the resident or staff interface.
- Custom workflows — guide users through multi-step processes that need data from external services, then write results back to Condo via GraphQL.
- Third-party integrations — embed partner dashboards, payment flows, or analytics without redirecting users away from Condo.
How a request works
- The mini-app calls
bridge.send('CondoWebAppResizeWindow', { height: 800 }). - The bridge assigns a
requestId, serialises the payload, and posts it to the parent frame. - The Condo host receives the message, validates it, and performs the action.
- The host posts back
{ type: 'CondoWebAppResizeWindowResult', data: { height: 800 }, requestId }(orCondoWebAppResizeWindowErroron failure). - The bridge’s internal listener matches the
requestIdand resolves (or rejects) the original Promise.
All bridge calls time out after 1 second by default.
CondoWebAppRequestAuth has a longer 10-second timeout because it involves a network request on the host side.Next steps
- Read the Bridge API reference for the full list of methods and their parameters.
- Follow the Building a mini-app guide to create your own mini-app from the template.