Engine

Configuration

GozWire config is parsed with Zod at engine start. Secrets stay in the environment. Policy thresholds are not UI controls.

Configuration is parsed with Zod at engine start. See defaultConfig() in @gozwire/core for the full tree. Secrets must come from the environment. Never put them in a browser bundle.

Important groups:

  • engine : id, environment
  • database : PostgreSQL URL
  • redis : rate limits and Centrifugo engine
  • realtime : Centrifugo URL, API key, HMAC secret, token TTL
  • storage : S3-compatible endpoint, bucket, keys, browser-facing publicEndpoint, sidecar-facing internalEndpoint
  • messages : max text length, allowed types, attachment count
  • media : per-kind enablement, max bytes, MIME allowlists
  • moderation : enabled flags, sidecar URLs, service token, textPolicy / imagePolicy
  • retention : default mode, TTL, per-type byType, conversation policy roles
  • reactions : suggested (not an allowlist). Default ["👍","❤️","🎉"]
  • limits : per-user and per-conversation send windows
  • profilePictures : enablement, MIME, max bytes and pixels
  • workers : outbox poll, batch, backoff
  • push : enablement (default false), policy, and independently optional webPush / fcm / apns credentials

parseConfig rejects the bundled local credentials when engine.environment is production. Production also rejects placeholder push credentials for any enabled provider, and rejects push.enabled with zero providers.

The demo exposes a public engine config slice at GET /api/config. Policy thresholds are visible but not editable. configuration.updateModeration() can enable or disable moderation and each modality.

Public JSON may include push enablement, policy, and the VAPID public key. It must not include PostgreSQL, Redis, or storage secrets, Centrifugo API keys, sidecar tokens, FCM service-account material, or APNs .p8 keys.