Overview
Operators can customize how their Chatto server presents itself. The server's name, description, welcome message, logo, banner, and message-of-the-day are all editable from the admin UI and visible to members and visitors. A small number of operational knobs (blocked usernames, etc.) live in the same config surface.
Behavior
- Server name — appears in page titles, the chat header, installed app metadata, and OG metadata. Defaults to "Chatto".
- Description — a short plain-text introduction. It is shown on server cards in the Server Directory and on the Server information page, and it is used in OG metadata for link previews when sharing the server URL. Sign-in pages do not show it.
- Welcome message — shown on sign-in pages and on the Server information page. Compact sign-in windows show it in an area of limited height, which scrolls, so that the form stays visible. Markdown is supported.
- MOTD (message of the day) — appears in a banner across the top of the chat surface for all members. The header shows a single-line Markdown preview with an ellipsis when space is limited. Click or tap the preview to open the full message in a modal with Markdown rendering. Back, Escape, or the close button dismisses the modal. Header links open their destinations directly. Changes broadcast to live clients.
- Logo — shown in the chat header, login page, and OG image fallback. Uploaded as an image; the public server profile exposes its canonical URL without transform arguments.
- Banner — shown on the login page and in OG previews. Same upload/serve pipeline as the logo.
- Account creation — the typed
registration.admissionsetting selects open registration or invitation-only account creation. It applies to direct signup and new SSO accounts. The default is open. Existing sign-in, provider linking, and operator-created accounts are not affected. See FDR-036. - Blocked usernames — newline-separated list checked at signup. Matches are rejected before account creation.
- Text configuration is bounded before storage: server name 80 bytes, description 500 bytes, MOTD 1,000 bytes, welcome message 10,000 bytes, blocked-usernames field 10,000 bytes, and each blocked username no longer than a normal username.
Design Decisions
1. Presentation config uses one partial-update surface
Decision: updateServerConfig accepts the presentation text fields as nullable values. A nil input for a field leaves the existing value untouched; only fields the caller explicitly sets get changed.
Why: Partial-update semantics let UI forms send only changed fields without GET-then-PUT round-trips and without overwriting other fields with whatever defaults the form thinks they should be. It also makes API clients (CLI tools, scripts) safer.
Tradeoff: Two ways to "clear" a string field: empty-string vs unset. The API treats empty string as a clear and nil as "leave alone". Documented; consistent across all string fields.
2. Durable profile facts map to one public change event
Decision: Public server profile changes stay as durable config facts in
EVT. The realtime service maps the applicable facts to one content-free
ServerProfileChangedEvent. The client reads the canonical server resource at
the event cursor. Blocked usernames and other private operator values do not
produce this public event.
Why: The durable fact is already the ordered source of truth. A second
transient publication can be lost and can disagree with replay. One public
resource-change event also hides internal config fact names from clients.
Tradeoff: A connected client makes a small cursor-bounded resource read
when the public server profile changes. These changes are infrequent.
3. Logo and banner have their own upload mutations
Decision: uploadServerLogo and uploadServerBanner are separate from updateServerConfig. They accept multipart uploads, process the image, store the binary in the asset store, and update the server's logo or banner pointer through the same event-sourced configuration flow as the rest of the server config.
Why: Image upload is a different shape from string config — multipart bodies, content-type validation, asset storage. Keeping it in its own mutations means updateServerConfig stays simple, while storing the current pointer in configuration events keeps branding restorable from the event log instead of depending on legacy KV state.
Tradeoff: The admin UI needs separate forms / flows for branding text vs branding images. In practice the UX is clearer this way (the image upload is its own focused interaction).
4. Branding asset bytes stay outside EVT
Decision: Server logo and banner binaries stay in the object store; configuration events record the current storage pointer and each change. A background job reads the previous logo or banner from configuration history. When a change releases an image, the job removes the stored image and its cached sizes. Why: The event log should record durable domain state and audit history, not inline image bytes. This matches the broader asset model while still making the user-visible branding selection replayable from EVT. Tradeoff: Backup/restore still needs the object-store bucket alongside EVT. A replay can reconstruct which logo or banner is current, but not the image bytes unless the asset store is preserved too.
5. Constrained Markdown for welcome and MOTD text
Decision: The login welcome message and MOTD use Chatto's shared, sanitizing Markdown renderer. Why: Operators can add a link or small amount of emphasis without giving configuration text an unrestricted HTML boundary. One reviewed renderer keeps the two presentation surfaces consistent. Tradeoff: Complex layout and unrestricted HTML are not supported. The MOTD header supports inline formatting and links, with line breaks replaced by spaces. Users open the modal to read the complete message with block formatting.
6. Blocked usernames as a dedicated security mutation
Decision: The blocked-usernames list is stored with server config, but edited through admin.updateBlockedUsernames rather than the general updateServerConfig mutation.
Why: The data is part of runtime config, but the workflow is a security/admin control rather than presentation copy. A dedicated mutation keeps the API boundary clear without introducing a full CRUD surface for a small newline-separated list. Blocked-username edits do not publish a member-visible live event; admins receive the updated value from the mutation response and future admin reads.
Tradeoff: Operators still edit the list as a text area, so very large lists could become awkward. None of the live deployments have lists big enough for this to matter.
7. Runtime text config has fixed size caps
Decision: Runtime-editable server text fields have fixed server-side size limits rather than operator-tunable limits. Why: These values are public presentation/configuration text, not bulk content. Fixed limits keep event payloads and admin forms bounded while preserving enough room for normal operator usage. Tradeoff: Operators who want unusually large welcome copy or blocklists have to shorten the content instead of raising a config value.
8. Edit window is an API constant, not a config field
Decision: messageEditWindowSeconds is queryable but read-only. The value comes from a Go constant (core.MessageEditWindow = 3 * time.Hour); server-config update APIs do not accept it.
Why: The frontend needs to know the window to render countdown timers and disable the edit affordance at the right moment, so exposing it through the public API is necessary. But making it operator-tunable opens space for inconsistent UX across servers without clear benefit — and the value isn't sensitive enough to need server-by-server control.
Tradeoff: Operators who want a different window have to recompile. If demand emerges this can be promoted to a config field cheaply.
9. Typed sections extend the server settings resource
Decision: New settings use typed sections on the existing admin server
resource. Registration starts with registration.admission.
UpdateServerConfig accepts a field mask with that leaf path. Unselected
fields stay unchanged. A selected absent admission resets to open.
Why: Each settings form can update its fields without replacing other
sections. Typed fields give validation and a defined API contract.
Tradeoff: Each new setting needs a schema field and domain handling. There
is no generic string-key settings store.
Admission changes publish ServerRegistrationAdmissionChangedEvent on the
server config aggregate. The config projection and its snapshot retain the
value. There is no file or environment override. Account creation catches up
the projection and checks the policy under the same EVT concurrency boundary
as account creation and invitation redemption. Unknown values reject creation.
The admin response returns the saved value; public discovery returns the
effective policy when read. Admission changes do not emit a public profile event.
Permissions
server.manage— gates presentation, branding, admission, and security-list mutations (updateServerConfig,admin.updateBlockedUsernames,uploadServerLogo,uploadServerBanner,deleteServerLogo,deleteServerBanner).
Related
- ADRs: ADR-012 (two-tier real-time events), ADR-033 (event-sourced state with projections), ADR-035 (per-aggregate phased migration), ADR-091 (semantic realtime events)
- FDRs: FDR-001 (Roles & Permissions), FDR-004 (Message Editing & Deletion), FDR-008 (File Attachments & Video Processing), FDR-021 (Admin Dashboard & System Monitoring), FDR-045 (Realtime Event Stream)