TopoloCRM
CRM workflows, records, and SDR inbox/control-plane services exposed through the platform auth layer.
Documentation Map
What It Is
CRM workflows, records, and SDR inbox/control-plane services exposed through the platform auth layer.
Canonical documentation for TopoloCRM lives in `PlatformApplications/TopoloDocs`.
Use this repository for implementation only. Local product and operational docs have been retired in favor of the docs application.
Architecture
Owners: crm
Source repos: PlatformApplications/TopoloCRM
Dependencies: topolo-auth, topolo-one, applications-packages
Repo shape
- PlatformApplications/TopoloCRM/README.md
- PlatformApplications/TopoloCRM/all-contacts.csv
- PlatformApplications/TopoloCRM/app/
- PlatformApplications/TopoloCRM/backend.log
- PlatformApplications/TopoloCRM/docs/
- PlatformApplications/TopoloCRM/frontend.log
- PlatformApplications/TopoloCRM/infra/
- PlatformApplications/TopoloCRM/migration.config.ts
- PlatformApplications/TopoloCRM/package-lock.json
- PlatformApplications/TopoloCRM/package.json
- PlatformApplications/TopoloCRM/packages/
- PlatformApplications/TopoloCRM/pnpm-lock.yaml
- PlatformApplications/TopoloCRM/postman-collection.json
- PlatformApplications/TopoloCRM/scripts/
- PlatformApplications/TopoloCRM/topolo.cloudcontrol.json
Runtime Surfaces
Hosts:
https://crm.topolo.app Config: PlatformApplications/TopoloCRM/app/wrangler.toml
Main: not declared
Routes: workers.dev or asset-only surface
Config: PlatformApplications/TopoloCRM/packages/backend/wrangler.toml
Main: index.ts
Routes: workers.dev or asset-only surface
API Reference
Coverage: OpenAPI-backed
Source: PlatformApplications/TopoloCRM/packages/backend/openapi.yaml
Source exists in repo: yes
CRM owns its worker API contract and delegates browser login, cookie refresh, logout propagation, one-time `sso_code` callback exchange, and shared-launcher Auth data reads to the shared Auth client plus same-origin `/api/auth/*` Pages gateway. The explicit `/login` route renders the branded shared LoginPage without an initial refresh probe, embedded password-login success returns to the CRM route tree after shared Auth token persistence, shared Auth token update events are treated as already-persisted state, and the browser app does not expose a legacy `/sso?token=` token handoff route or app-local `/sso/exchange` parser. CRM keeps same-tab sessionStorage access-token restore enabled by default after login and refresh so normal reloads do not appear logged out before cookie refresh completes. The callback route guards one-time code exchange with a fixed `/dashboard` completion target so Auth home-path re-resolution cannot retry an already consumed `sso_code`. CRM exposes `GET /api/widget` with the shared `@topolo/sdk` widget response contract for TopoloOne live workspace.
App API page: /reference/apps/topolo-crm
Generated OpenAPI page: /reference/generated/topolo-crm
Operations: 23
Security schemes: none declared
Auth and Permissions
Depends on Topolo Auth: yes
Service IDs:
srv_iCwM4jGXcwlj API key scopes
View customer activities and history
Resource pattern: none
Log customer activities and notes
Resource pattern: none
Manage CRM machine credentials
Resource pattern: none
View CRM attachments and files
Resource pattern: none
Upload and manage CRM attachments and files
Resource pattern: none
View commission records and payouts
Resource pattern: none
Create and manage commission records and payouts
Resource pattern: none
View companies and account records
Resource pattern: none
Create and manage companies and account records
Resource pattern: none
View customer contacts and profiles
Resource pattern: none
Create and edit customer contacts
Resource pattern: none
View sales deals and opportunities
Resource pattern: none
Manage sales deals and pipeline
Resource pattern: none
View CRM documents and transaction files
Resource pattern: none
Create and manage CRM documents and transaction files
Resource pattern: none
View property listings
Resource pattern: none
Create and manage property listings
Resource pattern: none
View CRM notes and contact history
Resource pattern: none
Create and manage CRM notes
Resource pattern: none
View offers and negotiation records
Resource pattern: none
Service permissions
activities:read, activities:write, api_keys:write, attachments:read, attachments:write, commissions:read, commissions:write, companies:read, companies:write, contacts:read, contacts:write, deals:read, deals:write, documents:read, documents:write, listings:read, listings:write, notes:read, notes:write, offers:read
Data Ownership
Binding: CRM_DB
Target: 00000000-0000-0000-0000-000000000000
Environment: default
Source: PlatformApplications/TopoloCRM/packages/backend/wrangler.toml
Binding: CRM_DB
Target: cf93b0b6-8a56-4516-a0c7-4e2d8dee4157
Environment: stg
Source: PlatformApplications/TopoloCRM/packages/backend/wrangler.toml
Binding: crm_attachments
Target: edge-crm-attachments-staging
Environment: stg
Source: PlatformApplications/TopoloCRM/packages/backend/wrangler.toml
Binding: CRM_DB
Target: 77e9aeb0-fb0d-48a7-adb1-e0ce6700ab89
Environment: prod
Source: PlatformApplications/TopoloCRM/packages/backend/wrangler.toml
Binding: CRM_KV
Target: 2bf87302ccb04e43bda3c946a1d7f15b
Environment: prod
Source: PlatformApplications/TopoloCRM/packages/backend/wrangler.toml
Binding: crm_attachments
Target: edge-crm-attachments-production
Environment: prod
Source: PlatformApplications/TopoloCRM/packages/backend/wrangler.toml
Queues / Cron / Workflows
Queue bindings:
No queue bindings were detected.
Cron triggers
No cron triggers were detected.
Workflow signals
No explicit queue/workflow script or cron signal was discovered.
Environment Variables and Bindings
Environment variables:
API_KEY_HASH_ITERATIONS API_KEY_PREFIX AUTH_API_URL ENVIRONMENT NEXUS_GATEWAY_URL NODE_ENV SALT_ROUNDS account_id All wrangler bindings
-
CRM_DB(d1) -> 00000000-0000-0000-0000-000000000000 -
CRM_DB(d1) -> cf93b0b6-8a56-4516-a0c7-4e2d8dee4157 [stg] -
crm_attachments(r2) -> edge-crm-attachments-staging [stg] -
CRM_DB(d1) -> 77e9aeb0-fb0d-48a7-adb1-e0ce6700ab89 [prod] -
CRM_KV(kv) -> 2bf87302ccb04e43bda3c946a1d7f15b [prod] -
crm_attachments(r2) -> edge-crm-attachments-production [prod]
Deployments
Deployment environments: dev, stg, prod
Routes: workers.dev or Pages-only delivery
Observability enabled: yes
Wrangler surfaces
- PlatformApplications/TopoloCRM/app/wrangler.toml -> topolo-crm-frontend
- PlatformApplications/TopoloCRM/packages/backend/wrangler.toml -> edge-crm (assets ./public)
Build and deploy commands
-
build— PlatformApplications/TopoloCRM/app/package.json :: vite build -
preview— PlatformApplications/TopoloCRM/app/package.json :: vite preview -
deploy:stg— PlatformApplications/TopoloCRM/app/package.json :: VITE_API_URL=https://edge-crm-stg.topolo.workers.dev/api VITE_APP_NAME=TopoloCRM VITE_APP_VERSION=1.0.0 npm run build && npx wrangler pages deploy dist --project-name=topolo-crm-frontend-staging -
deploy:prod— PlatformApplications/TopoloCRM/app/package.json :: VITE_API_URL=https://crm-api.topolo.app/api VITE_APP_NAME=TopoloCRM VITE_APP_VERSION=1.0.0 npm run build && npx wrangler pages deploy dist --project-name=topolo-crm-frontend -
build— PlatformApplications/TopoloCRM/package.json :: npm run build --workspace=packages/backend -
build:app— PlatformApplications/TopoloCRM/package.json :: npm run build --workspace=app -
build:all— PlatformApplications/TopoloCRM/package.json :: npm run build && npm run build:app -
deploy:stg— PlatformApplications/TopoloCRM/package.json :: npm run deploy:stg --workspace=packages/backend -
deploy:prod— PlatformApplications/TopoloCRM/package.json :: npm run deploy:prod --workspace=packages/backend -
deploy:app:stg— PlatformApplications/TopoloCRM/package.json :: npm run deploy:stg --workspace=app -
deploy:app:prod— PlatformApplications/TopoloCRM/package.json :: npm run deploy:prod --workspace=app -
deploy:all:stg— PlatformApplications/TopoloCRM/package.json :: npm run deploy:stg && npm run deploy:app:stg -
build— PlatformApplications/TopoloCRM/packages/backend/package.json :: tsc --noEmit && echo 'Build validation successful' -
build:deploy— PlatformApplications/TopoloCRM/packages/backend/package.json :: wrangler deploy --dry-run -
deploy:dry-run— PlatformApplications/TopoloCRM/packages/backend/package.json :: wrangler deploy --dry-run --outdir .wrangler/build -
deploy:stg— PlatformApplications/TopoloCRM/packages/backend/package.json :: wrangler deploy --env stg
Failure Modes
No default failure-mode heuristics are currently flagged for this system.
Debugging Runbooks
Start with these entrypoints:
- PlatformApplications/TopoloCRM/app/wrangler.toml
- PlatformApplications/TopoloCRM/packages/backend/wrangler.toml
- PlatformApplications/TopoloCRM/packages/backend/openapi.yaml
- PlatformApplications/TopoloCRM/README.md
- PlatformApplications/TopoloCRM/app/package.json
- PlatformApplications/TopoloCRM/package.json
- PlatformApplications/TopoloCRM/packages/backend/package.json
Change Log / Verification
Lifecycle: active
Last verified: 2026-04-25
Any code change to this system is expected to update the canonical docs in PlatformApplications/TopoloDocs and refresh the verification date.