KAIBO Low Voltage ProjectsPhases 1–6 · Secure Marketplace App
Marketplace Integration

A secure backend skeleton for low-voltage installers.

This app is installed per sub-account as a private HighLevel marketplace app. It verifies an encrypted user context from the marketplace, derives location and user identity server-side, and isolates every query by location — no credentials ever reach the browser.

Encrypted SSO context

The /app page requests an AES-encrypted user payload from the marketplace parent frame and verifies it server-side with a shared secret.

Per-location row isolation

Every database query is scoped by the verified locationId. No client-sent locationId is ever trusted.

OAuth install + token rotation

Install redirects through OAuth, exchanges the code for location tokens, stores them encrypted, and refreshes them server-side.

Locked-down framing

Content-Security-Policy frame-ancestors allow only the marketplace domains; API routes are never frameable.

Endpoints (Phase 1)

  • GET /api/public/crm/install — redirects to the OAuth "choose location" URL
  • GET /api/public/crm/callback — exchanges the code for encrypted location tokens
  • POST /api/public/crm/uninstall — deletes a location's tokens
  • /app — embedded status page (marketplace iframe only)

Demo mode

Without the marketplace secrets configured, the app runs in demo mode with clearly marked fictitious data — never mixed with real location data. Open the app to explore the full workflow.

Open app in demo mode →