Sample partner app
The public Paprel Embed examples repository contains a production-shaped, framework-neutral real-estate application. It mounts @paprel/embed-accounting and @paprel/embed-reports as real npm consumers and demonstrates the boundaries your host application should own.
Run locally
git clone https://github.com/nexara-global/paprel-embed-ui-examples.git
cd paprel-embed-ui-examples
npm install
cp apps/real-estate-accounting/.env.example apps/real-estate-accounting/.env.local
npm run dev
Open http://127.0.0.1:5181/. Without App Connect credentials, the application still starts and shows the exact server variables required for the selected entity.
The sample includes:
- A local-only
/api/embed-tokenBFF that exchanges App Connect credentials - Host-owned routing, company context, URL-backed search, filters, tabs, and pagination
- Delegated
paprel:resource-open,paprel:view-change, andpaprel:operation-successevents - Account, journal, bank, transaction, reconciliation, lock, and report routes
- One App Connect client per managed entity and automatic browser-safe token renewal
- Inherited Paprel design tokens inside a partner-owned shell
Pass criteria
Before porting the pattern into your stack, confirm:
- Session chip shows a valid token expiry
- Chart of accounts loads without console errors
- Journal list loads and pagination works
- Row click opens journal detail
- Editor saves a balanced journal and the host displays success feedback
- Banking, reconciliation, and report routes load with the required scopes
- Browser history restores list filters and pagination
Environment
Copy .env.example to .env.local and set:
- App Connect
client_idandclient_secret(server-side only — never in the browser) - API base URL (sandbox or production)
partnerDomainmatching your registered app client
The Vite BFF is for local development only. A production route must authenticate and authorize the partner user before choosing an entity or minting a token. Never put a client secret in a VITE_* variable.