Skip to content

Deployment notes

CXGear is not a single website process. A working deployment is a small set of services that share a database and a few public URLs. This page is for admins and implementers who stand up or troubleshoot an environment.

For local development details, see Environments.

ServiceRole
WebBrowser UI (projects, Records, Billing, Dialler, …)
APILogin, projects, billing, channels, job creation, public ingest/trigger
RuntimeActually runs spinner jobs (steps, AI, channels)
DatabasePostgres — orgs, tables, jobs, sessions, billing state
Docs (optional)This documentation site

If web and API are up but runtime is not, people can click Run now and create jobs, but jobs will not progress. That is the most common “everything looks fine but nothing happens” failure.

Screenshot needed
Architecture sketch or ops checklist showing web, API, runtime, and database.
Where: Internal runbook / deployment diagram
Save as: src/assets/screenshots/41-deployment-services.png
HostPurpose
app.cxgear.aiWeb UI
api.cxgear.aiAPI (/api/v1/…) and OpenAPI (/docs)
docs.cxgear.aiProduct documentation (this site)

Runtime workers usually do not need a public hostname; they need database access and outbound network to providers (LLM, Meta, SMS, and so on).

PUBLIC_API_URL is the publicly reachable base URL of the API — for example https://api.cxgear.ai.

CXGear uses it to build:

  • OAuth redirect URIs (WhatsApp / Meta)
  • Webhook URLs shown in the product
  • Links and callbacks that external systems must call
RuleWhy
Must be HTTPS in productionProviders reject insecure callbacks
Must match provider app settings exactlyOAuth redirect mismatch is fatal
Must be reachable from the public internetMeta and CRMs cannot call localhost
Should not point at the web hostCallbacks are API routes, not UI routes

Example WhatsApp callback:

https://api.cxgear.ai/api/v1/channels/whatsapp/oauth/callback

If you change API hostnames, update PUBLIC_API_URL and every provider console entry that embeds the old URL.

VariablePurpose
PUBLIC_APP_URLPublic base URL of the web app
DATABASE_URLPostgres connection for API and runtime
META_APP_ID / META_APP_SECRETWhatsApp Meta OAuth
Payment provider keysStripe / Razorpay for Billing checkout

Never commit secrets to git. Inject them through your host’s secret store.

The docs app lives under apps/docs and is intended to publish to https://docs.cxgear.ai.

Local preview:

Terminal window
npm run dev:docs

Open http://localhost:4321.

Docs are static guidance for operators and integrators. They do not replace OpenAPI for request schemas — use https://api.cxgear.ai/docs for live API reference.

Before declaring an environment ready:

  1. Web loads and can reach the API
  2. Sign up / login works and sessions persist
  3. Runtime is running and a test spinner job completes
  4. PUBLIC_API_URL matches real HTTPS DNS
  5. Billing page loads (even on Trial)
  6. Docs are linked for your team (docs.cxgear.ai or internal mirror)
  • Users work on the app host; integrations call the API host
  • OAuth and ingest webhooks succeed without redirect errors
  • Jobs progress only when runtime is healthy
  • Docs are available at docs.cxgear.ai for training
ProblemLikely causeWhat to do
Jobs stuck queued/running foreverRuntime not deployedStart runtime workers
OAuth redirect mismatchPUBLIC_API_URL wrongAlign env and Meta app settings
CRM cannot ingestAPI not public or wrong pathExpose API; copy URL from product
UI works, API 401 stormsClock skew or bad JWT secretCheck API auth config
Docs 404 for sidebar pagesDocs not rebuilt after content addRedeploy docs app