Engine

Configuration

GozWire config is parsed with Zod at engine start. Secrets stay in the environment. Named presets and maps are not UI-owned.

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.

Runtime APIs:

  • configuration.moderation() / configuration.updateModeration({ enabled?, textEnabled?, imageEnabled?, textPreset?, imagePreset?, textPolicy?, imagePolicy? }) returns a public-safe DTO. Never service tokens or sidecar URLs.
  • configuration.updateReceipts()
  • configuration.updateReactions({ suggested }) is the only editor for picker inventory. reactions.suggested is not an allowlist.

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, textPreset / imagePreset (default lenient / strict), resolved textPolicy / imagePolicy, policyVersion
  • retention : default mode, TTL, per-type byType, conversation policy roles
  • reactions : suggested (not an allowlist). Default ["👍","❤️","🎉"]
  • limits : per-user and per-conversation send windows, plus alias, block, and mention-lookup windows
  • profilePictures : enablement, MIME, max bytes and pixels
  • workers : outbox poll, batch, backoff
  • push : enablement (default false), policy including mentionOverridesMute: false, 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 maps and presets are visible on purpose. Public JSON may include push enablement, policy, presets, effective maps, 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.

Breaking defaults (no schema rollback): mentionOverridesMute is false; text preset is lenient. Set mentionOverridesMute: true or textPreset: "balanced" to restore the previous behavior.