Socialize
Social publishing and campaign tooling with brand-scoped API key bindings.
Documentation Map
What It Is
Social publishing and campaign tooling with brand-scoped API key bindings.
Canonical documentation for Socialize lives in `PlatformApplications/TopoloDocs`.
Use this repository for implementation only. Architecture, operational workflows, auth, billing behavior, and integration boundaries are canonical in the docs application rather than in repo-local markdown.
Architecture
Owners: socialize
Source repos: PlatformApplications/TopoloSocialize
Dependencies: topolo-auth, topolo-nexus, topolo-one, applications-packages
Repo shape
- PlatformApplications/TopoloSocialize/LICENSE
- PlatformApplications/TopoloSocialize/README.md
- PlatformApplications/TopoloSocialize/apps/
- PlatformApplications/TopoloSocialize/docs/
- PlatformApplications/TopoloSocialize/eslint.config.js
- PlatformApplications/TopoloSocialize/migration.config.ts
- PlatformApplications/TopoloSocialize/package.json
- PlatformApplications/TopoloSocialize/packages/
- PlatformApplications/TopoloSocialize/pnpm-lock.yaml
- PlatformApplications/TopoloSocialize/pnpm-workspace.yaml
- PlatformApplications/TopoloSocialize/scripts/
- PlatformApplications/TopoloSocialize/topolo.cloudcontrol.json
- PlatformApplications/TopoloSocialize/tsconfig.base.json
- PlatformApplications/TopoloSocialize/wrangler.toml
Runtime Surfaces
Hosts:
https://socialize.topolo.app Config: PlatformApplications/TopoloSocialize/apps/web/wrangler.toml
Main: not declared
Routes: workers.dev or asset-only surface
Config: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Main: dist/index.js
Routes: workers.dev or asset-only surface
Config: PlatformApplications/TopoloSocialize/wrangler.toml
Main: packages/worker/dist/index.js
Routes: workers.dev or asset-only surface
API Reference
Coverage: OpenAPI-backed
Source: PlatformApplications/TopoloSocialize/packages/worker/openapi.yaml
Source exists in repo: yes
The worker remains the primary API owner, and the authenticated web workspace renders through `TopoloAppShell`, inheriting shared Improve Topolo and TopoloNotify chrome while keeping brand workflows Socialize-owned. The browser app-switcher lane now reads Auth-owned catalog data through same-origin /api/auth/* on the Socialize host. `POST /api/brands/:brandId/transfer-organization` moves an existing brand to another accessible Topolo Auth organization by updating `brands.topolo_org_id` without changing the brand ID or content records. `PUT /api/posts/:id` supports reverting scheduled posts to drafts by clearing the schedule and returning draft state before the browser reports success, and now preserves explicit Facebook Page or Group, LinkedIn organization, and Instagram account target metadata during browser edits. `GET /api/integrations` now returns eligible Facebook Groups alongside Pages from the stored connection metadata and reports whether each provider is production-ready, sandbox-only, setup-required, or still planned. `POST /api/integrations/{platform}/connect` now rejects non-connectable providers up front instead of generating placeholder OAuth redirects. Nexus now supplies the org-wide image-generation default and allowed image-model catalog for Socialize image tools, and inline model overrides remain request-scoped and permission-gated instead of mutating the stored org setting. The worker now also exposes authenticated `GET /api/widget` for TopoloOne live workspace. Embedded password-login success completes through Socialize app navigation after shared Auth token persistence, login controls stay interactive while background auth bootstrap runs, and same-tab session-storage access-token restore preserves normal browser refreshes before cookie refresh completes. Socialize mobile resolves `topolo_auth_flutter` from the canonical Auth repo git package path and does not preload Auth identity from SharedPreferences.
App API page: /reference/apps/socialize
Generated OpenAPI page: /reference/generated/socialize
Operations: 31
Security schemes: BearerAuth (http), ApiKeyAuth (apiKey)
Auth and Permissions
Depends on Topolo Auth: yes
Service IDs:
srv_1R2xJCdwS7Aq API key scopes
View connected social accounts
Resource pattern: none
Connect and manage social accounts
Resource pattern: none
View social media analytics
Resource pattern: none
Manage Socialize machine credentials
Resource pattern: none
View content calendar
Resource pattern: none
Manage content calendar
Resource pattern: none
View social media dashboard
Resource pattern: none
View scheduled and published posts
Resource pattern: none
Create and schedule social posts
Resource pattern: none
Service permissions
accounts:read, accounts:write, analytics:read, api_keys:write, calendar:read, calendar:write, dashboard:read, posts:read, posts:write
Data Ownership
Binding: SESSIONS_KV
Target: socialize-dev-kv-sessions
Environment: dev
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: CACHE_KV
Target: socialize-dev-kv-cache
Environment: dev
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: PRIMARY_DB
Target: d5c08b56-fbb7-4f7a-839a-09720719b8aa
Environment: dev
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: MEDIA_BUCKET
Target: socialize-dev-r2-media
Environment: dev
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: SESSIONS_KV
Target: socialize-stage-kv-sessions
Environment: stage
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: CACHE_KV
Target: socialize-stage-kv-cache
Environment: stage
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: PRIMARY_DB
Target: YOUR_STAGE_DB_ID
Environment: stage
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: MEDIA_BUCKET
Target: socialize-stage-r2-media
Environment: stage
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: SESSIONS_KV
Target: 836aaf550e7a4a61b248391c4bd4b644
Environment: prod
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: CACHE_KV
Target: de9ca9a9622e440b8d64fe94a8eb38f2
Environment: prod
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: PRIMARY_DB
Target: 5a6254f2-630c-40b3-9d54-c4261e5a4ab0
Environment: prod
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: MEDIA_BUCKET
Target: socialize-prod-r2-media
Environment: prod
Source: PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
Binding: SESSIONS_KV
Target: socialize-dev-kv-sessions
Environment: dev
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: CACHE_KV
Target: socialize-dev-kv-cache
Environment: dev
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: FEATURE_FLAGS_KV
Target: socialize-dev-kv-flags
Environment: dev
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: PRIMARY_DB
Target: d5c08b56-fbb7-4f7a-839a-09720719b8aa
Environment: dev
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: MEDIA_BUCKET
Target: socialize-dev-media
Environment: dev
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: BACKUP_BUCKET
Target: socialize-backups
Environment: dev
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: SESSIONS_KV
Target: socialize-stage-kv-sessions
Environment: stage
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: CACHE_KV
Target: socialize-stage-kv-cache
Environment: stage
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: PRIMARY_DB
Target: socialize-stage-db-primary
Environment: stage
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: MEDIA_BUCKET
Target: socialize-stage-r2-media
Environment: stage
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: BACKUP_BUCKET
Target: socialize-backups
Environment: stage
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: SESSIONS_KV
Target: 836aaf550e7a4a61b248391c4bd4b644
Environment: prod
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: CACHE_KV
Target: de9ca9a9622e440b8d64fe94a8eb38f2
Environment: prod
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: PRIMARY_DB
Target: 5a6254f2-630c-40b3-9d54-c4261e5a4ab0
Environment: prod
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: MEDIA_BUCKET
Target: socialize-prod-r2-media
Environment: prod
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: BACKUP_BUCKET
Target: socialize-backups
Environment: prod
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Binding: VOICE_CONTEXT_INDEX
Target: brand-voice-context
Environment: prod
Source: PlatformApplications/TopoloSocialize/wrangler.toml
Queues / Cron / Workflows
Queue bindings:
-
NOTIFICATION_QUEUE-> socialize-dev-queue-notifications (dev) -
POST_SCHEDULER_QUEUE-> socialize-dev-queue-posts (dev) -
NOTIFICATION_QUEUE-> socialize-stage-queue-notifications (stage) -
NOTIFICATION_QUEUE-> socialize-prod-queue-notifications (prod) -
POST_SCHEDULER_QUEUE-> socialize-prod-queue-posts (prod)
Cron triggers
0 * * * *via PlatformApplications/TopoloSocialize/wrangler.toml* * * * *via PlatformApplications/TopoloSocialize/wrangler.toml
Workflow signals
- NOTIFICATION_QUEUE -> socialize-dev-queue-notifications
- POST_SCHEDULER_QUEUE -> socialize-dev-queue-posts
- NOTIFICATION_QUEUE -> socialize-stage-queue-notifications
- NOTIFICATION_QUEUE -> socialize-prod-queue-notifications
- POST_SCHEDULER_QUEUE -> socialize-prod-queue-posts
- cron 0 * * * *
- cron * * * * *
- PlatformApplications/TopoloSocialize/package.json :: build:scheduler
Environment Variables and Bindings
Environment variables:
API_URL APP_URL ENVIRONMENT ORG_SLUG SERVICE_ID TIKTOK_USE_SANDBOX TOPOLO_AUTH_DOMAIN All wrangler bindings
-
SESSIONS_KV(kv) -> socialize-dev-kv-sessions [dev] -
CACHE_KV(kv) -> socialize-dev-kv-cache [dev] -
PRIMARY_DB(d1) -> d5c08b56-fbb7-4f7a-839a-09720719b8aa [dev] -
MEDIA_BUCKET(r2) -> socialize-dev-r2-media [dev] -
SESSIONS_KV(kv) -> socialize-stage-kv-sessions [stage] -
CACHE_KV(kv) -> socialize-stage-kv-cache [stage] -
PRIMARY_DB(d1) -> YOUR_STAGE_DB_ID [stage] -
MEDIA_BUCKET(r2) -> socialize-stage-r2-media [stage] -
SESSIONS_KV(kv) -> 836aaf550e7a4a61b248391c4bd4b644 [prod] -
CACHE_KV(kv) -> de9ca9a9622e440b8d64fe94a8eb38f2 [prod] -
PRIMARY_DB(d1) -> 5a6254f2-630c-40b3-9d54-c4261e5a4ab0 [prod] -
MEDIA_BUCKET(r2) -> socialize-prod-r2-media [prod] -
SESSIONS_KV(kv) -> socialize-dev-kv-sessions [dev] -
CACHE_KV(kv) -> socialize-dev-kv-cache [dev] -
FEATURE_FLAGS_KV(kv) -> socialize-dev-kv-flags [dev] -
PRIMARY_DB(d1) -> d5c08b56-fbb7-4f7a-839a-09720719b8aa [dev] -
MEDIA_BUCKET(r2) -> socialize-dev-media [dev] -
BACKUP_BUCKET(r2) -> socialize-backups [dev] -
NOTIFICATION_QUEUE(queue) -> socialize-dev-queue-notifications [dev] -
POST_SCHEDULER_QUEUE(queue) -> socialize-dev-queue-posts [dev] -
SESSIONS_KV(kv) -> socialize-stage-kv-sessions [stage] -
CACHE_KV(kv) -> socialize-stage-kv-cache [stage] -
PRIMARY_DB(d1) -> socialize-stage-db-primary [stage] -
MEDIA_BUCKET(r2) -> socialize-stage-r2-media [stage] -
BACKUP_BUCKET(r2) -> socialize-backups [stage] -
NOTIFICATION_QUEUE(queue) -> socialize-stage-queue-notifications [stage] -
SESSIONS_KV(kv) -> 836aaf550e7a4a61b248391c4bd4b644 [prod] -
CACHE_KV(kv) -> de9ca9a9622e440b8d64fe94a8eb38f2 [prod] -
PRIMARY_DB(d1) -> 5a6254f2-630c-40b3-9d54-c4261e5a4ab0 [prod] -
MEDIA_BUCKET(r2) -> socialize-prod-r2-media [prod] -
BACKUP_BUCKET(r2) -> socialize-backups [prod] -
NOTIFICATION_QUEUE(queue) -> socialize-prod-queue-notifications [prod] -
POST_SCHEDULER_QUEUE(queue) -> socialize-prod-queue-posts [prod] -
VOICE_CONTEXT_INDEX(vectorize) -> brand-voice-context [prod]
Deployments
Deployment environments: dev, stage, prod
Routes: workers.dev or Pages-only delivery
Observability enabled: yes
Wrangler surfaces
- PlatformApplications/TopoloSocialize/apps/web/wrangler.toml -> socialize
- PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml -> socialize-scheduler
- PlatformApplications/TopoloSocialize/wrangler.toml -> socialize-prod-api
Build and deploy commands
-
build— PlatformApplications/TopoloSocialize/apps/web/package.json :: tsc -b && vite build -
deploy:pages:prod— PlatformApplications/TopoloSocialize/apps/web/package.json :: pnpm build && pnpm exec wrangler pages deploy dist --project-name socialize --branch main -
preview— PlatformApplications/TopoloSocialize/apps/web/package.json :: vite preview -
build— PlatformApplications/TopoloSocialize/package.json :: pnpm -r run build -
build:worker— PlatformApplications/TopoloSocialize/package.json :: pnpm --filter=@socialize/worker... build -
build:scheduler— PlatformApplications/TopoloSocialize/package.json :: pnpm --filter=@socialize/scheduler build -
deploy:dev— PlatformApplications/TopoloSocialize/package.json :: pnpm build:worker && wrangler deploy --env dev -
deploy:stage— PlatformApplications/TopoloSocialize/package.json :: pnpm build:worker && wrangler deploy --env stage -
deploy:staging— PlatformApplications/TopoloSocialize/package.json :: pnpm run deploy:stage -
build— PlatformApplications/TopoloSocialize/packages/app/package.json :: tsc -
build— PlatformApplications/TopoloSocialize/packages/billing-webhook/package.json :: esbuild src/index.ts --bundle --outfile=dist/index.js --format=esm --platform=neutral --target=es2022 --external:@cloudflare/workers-types --main-fields=main --resolve-extensions=.ts,.js -
build:watch— PlatformApplications/TopoloSocialize/packages/billing-webhook/package.json :: pnpm build --watch -
build— PlatformApplications/TopoloSocialize/packages/cli/package.json :: shx rm -rf dist && tsc -b
Failure Modes
No default failure-mode heuristics are currently flagged for this system.
Debugging Runbooks
Start with these entrypoints:
- PlatformApplications/TopoloSocialize/apps/web/wrangler.toml
- PlatformApplications/TopoloSocialize/packages/scheduler/wrangler.toml
- PlatformApplications/TopoloSocialize/wrangler.toml
- PlatformApplications/TopoloSocialize/packages/worker/openapi.yaml
- PlatformApplications/TopoloSocialize/README.md
- PlatformApplications/TopoloSocialize/apps/web/package.json
- PlatformApplications/TopoloSocialize/package.json
- PlatformApplications/TopoloSocialize/packages/app/package.json
- PlatformApplications/TopoloSocialize/packages/billing-webhook/package.json
- PlatformApplications/TopoloSocialize/packages/cli/package.json
Change Log / Verification
Lifecycle: active
Last verified: 2026-04-27
Any code change to this system is expected to update the canonical docs in PlatformApplications/TopoloDocs and refresh the verification date.