Docs
Developer Documentation

Dashboard Schemas & Localization

Build zero-code dashboard forms, configure channel logs, and support all 16 locales.

Medusa follows a strict rule: never hardcode module-specific logic or UI components in the dashboard. Instead, the dashboard queries Medusa's internal API to dynamically render forms, settings, navigation tabs, and localization dictionaries.

When you create or update a module, you define JSON schemas in resources/ that the web dashboard automatically renders.

Dynamic Configuration (resources/config/)

Module settings forms are declared in resources/config/<group>.json. The dashboard reads these schemas and automatically creates interactive form controls.

modules/example/resources/config/general.json
{
  "id": "general",
  "title": "General Settings",
  "fields": [
    {
      "key": "ENABLED",
      "type": "boolean",
      "label": "Enable Feature",
      "default": true
    },
    {
      "key": "NOTIFICATION_CHANNEL",
      "type": "channel",
      "channelTypes": ["GuildText", "GuildAnnouncement"],
      "label": "Notification Channel",
      "default": null
    },
    {
      "key": "PING_ROLE",
      "type": "role",
      "label": "Mention Role",
      "default": null
    },
    {
      "key": "EMBED_COLOR",
      "type": "color",
      "label": "Embed Accent Color",
      "default": "#22c55e"
    }
  ]
}

Supported Field Types

  • boolean: Renders an iOS-style toggle switch.
  • text: Standard single-line text input.
  • textarea: Multi-line markdown editor.
  • number: Numeric input with min, max, and step increments.
  • color: Hexadecimal color picker with preset palette choices.
  • channel: Server channel dropdown filtered by channel type.
  • role: Server role dropdown with colored role badges.
  • select: Custom options dropdown.

Form inputs omit verbose descriptions to ensure clean horizontal and vertical grid alignment across adjacent controls in the dashboard.

Logging Schemas (resources/logs/)

Define which server actions can be routed to Discord audit channels:

modules/moderation/resources/logs/cases.json
{
  "id": "cases",
  "label": "Moderation Cases",
  "events": [
    { "id": "ban", "label": "Member Banned" },
    { "id": "kick", "label": "Member Kicked" },
    { "id": "timeout", "label": "Member Timed Out" },
    { "id": "warn", "label": "Member Warned" }
  ]
}

Localization System (resources/lang/)

Medusa is fully multi-language supported across 16 languages:

  • English (en), Spanish (es), French (fr), German (de), Portuguese (pt), Italian (it), Russian (ru), Turkish (tr), Japanese (ja), Korean (ko), Chinese Simplified (zh-CN), Chinese Traditional (zh-TW), Dutch (nl), Polish (pl), Arabic (ar), and Swedish (sv).

Every module includes localized JSON dictionaries for each locale under resources/lang/<locale>/:

modules/example/resources/lang/en/common.json
{
  "module.example.name": "Example",
  "example.success": "The operation finished successfully.",
  "example.error.not_found": "The requested item was not found."
}

Display Names

A module's manifest name is always the lowercase identifier (e.g. name: "engagement"). The capitalized dashboard title is supplied by the module.<id>.name translation key (e.g. "module.engagement.name": "Engagement"), allowing full localization in every language.

On this page