Skip to content

Commit a495717

Browse files
committed
Dashboard-first config workflow
This change removes the old /config YAML upload/download/update flow in favor of the dashboard, auto-provisions a default config when a guild joins, and updates onboarding/error messaging to send users to /config. Docs and metadata were refreshed to reflect the dashboard-first setup model and default-config behavior.
1 parent 4cc8e4c commit a495717

15 files changed

Lines changed: 113 additions & 416 deletions

File tree

CLAUDE.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,13 @@ Two independent layers (see `docs/permissions.md`):
9090
stripped rather than rejecting the whole config).
9191
- `config/manager.ts` (`ConfigManager`, singleton `configManager`) is the only way plugins read/write guild
9292
config: `getGuildConfig`/`getEffectiveConfig` (cached, falls back to defaults if a guild has no stored/valid
93-
config), `saveGuildConfig` (full YAML upload), and granular patch helpers (`patchPluginConfig`,
94-
`setPluginEnabled`, `patchLevels`, `setPermissionGrant`) used by `/permissions`, `/plugin toggle`, etc. Two YAML
95-
copies are stored per guild: the full merged snapshot (`configYaml`) and just the user's overrides
96-
(`userConfigYaml`), so `/config update` can re-merge overrides onto new defaults without clobbering
97-
customization.
93+
config), `saveGuildConfig` (full YAML replace — called by the dashboard bridge, and once by `bot.ts`'s
94+
`GuildCreate` handler to auto-provision a default config so a brand-new guild's commands work immediately), and
95+
granular patch helpers (`patchPluginConfig`, `setPluginEnabled`, `patchLevels`, `setPermissionGrant`) used by
96+
`/permissions`, `/plugin toggle`, etc. Two YAML copies are stored per guild: the full merged snapshot
97+
(`configYaml`) and just the user's overrides (`userConfigYaml`), so future default changes can be re-merged onto
98+
overrides without clobbering customization. There is no in-Discord config upload/download anymore — `/config`
99+
just links to the dashboard.
98100
- `npm run schema:export` (also run in `prebuild`) writes `schema/guild-config.schema.json` from the zod schemas
99101
for the external website's config editor to consume — keep plugin config schemas in sync if you change them.
100102

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Dreamliner
22

3-
Moderation and ops for large Discord communities: YAML config, staff permissions, logging, automod, and a web dashboard.
3+
Moderation and ops for large Discord communities: web-dashboard config, staff permissions, logging, automod, and stats.
44

55
Dreamliner is a Discord moderation and server-operations bot built for communities that outgrow one-size-fits-all tools. It is designed for staff teams that need clear permission boundaries, auditable configuration, and features that stay reliable as membership and moderation load grow.
66

7-
Configure your server with versionable YAML: download a template, edit channels, plugins, and access levels, then upload. Day-to-day work can also run through the web dashboard for live config, logs, stats, and custom commands, without giving up file-based control. Dreamliner does not require Administrator; invite with least privilege and grant only what your staff need.
7+
Configure your server entirely from the web dashboard: channels, plugins, and access levels, saved live with no restart. A new server gets a working default config the moment Dreamliner joins, so every command works immediately — the dashboard is only for customizing it. Dreamliner does not require Administrator; invite with least privilege and grant only what your staff need.
88

99
Core capabilities include infractions and case management, automod and raid tooling, content filters, structured logging, role and onboarding systems, multilingual translation, activity stats, and visually built custom slash commands. Enable only the plugins your community uses so the bot stays focused and predictable for operators.
1010

@@ -24,21 +24,20 @@ Recommended permissions are pre-selected. Dreamliner does **not** require Admini
2424

2525
## Why operators choose it
2626

27-
- **Config as source of truth:** Guild YAML is portable, reviewable, and easy to back up or hand off between staff.
28-
- **Least privilege by design:** Level-based access plus per-command `can_*` overrides so senior mods, trial staff, and helpers stay in their lane.
27+
- **Works on invite:** A default config is provisioned the instant Dreamliner joins — no setup step blocks day-one use.
28+
- **Least privilege by design:** Dreamliner Roles plus per-command `can_*` grants so senior mods, trial staff, and helpers stay in their lane.
2929
- **Ops without noise:** Enable only the plugins your community needs; leave the rest off.
3030
- **Slash-first management:** Staff workflows and custom commands stay in Discord’s command surface.
31-
- **Dashboard when you want it:** Live config, logs, stats, and building custom commands without abandoning file-based control.
31+
- **Dashboard-first config:** Live config, logs, stats, and building custom commands, all from one web dashboard.
3232

3333
---
3434

3535
## Quick start
3636

3737
1. Invite Dreamliner with the link above.
38-
2. Run `/config template` (requires **Manage Server**).
39-
3. Edit the YAML: channels, plugins, and permission levels (levels can also be adjusted later with `/permissions`).
40-
4. Run `/config upload` with your file.
41-
5. Use `/permissions` for incremental access changes and `/help` for command discovery.
38+
2. Run `/config` (requires **Manage Server**) to get a link to this server's dashboard.
39+
3. Sign in with Discord, then edit channels, plugins, and Dreamliner Roles. Click **Save** — changes apply immediately.
40+
4. Use `/permissions` for incremental access changes in Discord, and `/help` for command discovery.
4241

4342
Walkthrough: [Getting started](docs/getting-started.md)
4443

docs/configuration.md

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Configuration
22

3-
Dreamliner server configuration is written in YAML. Each server has its own config stored in the database after upload.
3+
Dreamliner server configuration is edited entirely from the **web dashboard** and stored as YAML in the database
4+
under the hood — there is no in-Discord upload/download workflow anymore. The YAML shape below documents that
5+
underlying format (and what a fork's `config/default.server.yaml` looks like), not something you write by hand.
46

57
## File format
68

@@ -32,7 +34,7 @@ Dreamliner Role instead. See [Permissions](permissions.md).
3234

3335
The icons used on command response embed titles (success, error, neutral, warning, unchecked) and on log card
3436
titles (`logging.emojis`) are **fixed bot-wide and not configurable** — every server sees the same set, and
35-
neither the dashboard nor a `/config upload` can change them. The `emojis`/`logging.emojis` keys are no longer
37+
the dashboard cannot change them. The `emojis`/`logging.emojis` keys are no longer
3638
part of guild config; an uploaded YAML with either block simply has it ignored (they fail schema validation and
3739
get repaired away). See `src/core/embeds.ts` (`DEFAULT_EMOJIS`) and `src/core/logging/emojis.ts` (`LOG_EMOJI`) if
3840
you're maintaining a fork and want to change the defaults in code.
@@ -97,37 +99,28 @@ Each plugin is configured under `plugins.<name>`:
9799

98100
## Merge behavior
99101

100-
On upload, your YAML is **deep-merged** with `config/default.server.yaml`. You only need to include keys you want to change.
102+
Whatever you save on the dashboard is **deep-merged** with `config/default.server.yaml` — you only ever customize the fields you touch, and new Dreamliner defaults apply automatically to anything you haven't.
101103

102104
See also: [Autorole](plugins/autorole.md), [Member identity](plugins/member_identity.md), [Translation](plugins/translation.md), [Logs](plugins/logs.md), [Starboard](plugins/starboard.md).
103105

104106
## Config commands
105107

106-
| Command | Description |
107-
| ------------------ | --------------------------------------------------------------- |
108-
| `/config template` | Default template from bot operator |
109-
| `/config download` | Current effective config for this server |
110-
| `/config upload` | Validate and save a config file |
111-
| `/config validate` | Dry-run validation |
112-
| `/config update` | Apply new Dreamliner defaults while keeping your customizations |
113-
| `/permissions role ...` | Manage Dreamliner Roles without re-uploading YAML |
114-
| `/plugin toggle` | Enable or disable a plugin (`plugin` + `state`: Enable / Disable) |
115-
| `/plugin list` | Show which plugins are enabled or disabled |
108+
| Command | Description |
109+
| ------------------------ | ------------------------------------------------------------------ |
110+
| `/config` | Posts a link to open this server's dashboard |
111+
| `/permissions role ...` | Manage Dreamliner Roles without leaving Discord |
112+
| `/plugin toggle` | Enable or disable a plugin (`plugin` + `state`: Enable / Disable) |
113+
| `/plugin list` | Show which plugins are enabled or disabled |
116114

117115
### Workflow
118116

119-
1. Run `/config template` (new server) or `/config download` (existing server).
120-
2. Edit the YAML file locally, or use the website **config editor** (loads the schema from this repo).
121-
3. Run `/config validate` to check for errors (optional).
122-
4. Run `/config upload` to apply.
117+
1. Run `/config` (or open the dashboard link from the join message) and sign in with Discord.
118+
2. Pick this server, edit plugins and fields (channels/roles/members have search autocomplete).
119+
3. Click **Save** — Dreamliner applies the config immediately, no restart or re-upload needed.
123120

124-
Machine-readable schema for the editor is generated with `npm run schema:export` into `schema/guild-config.schema.json` (also run during `prebuild`).
125-
126-
### `/config update`
127-
128-
When Dreamliner ships new default settings, run `/config update` to pick up changes you did not customize. Your overrides are preserved using the raw YAML from your last upload.
129-
130-
If your config was saved before this feature existed, the bot uses diff detection against the stored defaults snapshot. Re-uploading via `/config upload` improves future updates.
121+
A new server already has a working default config the moment Dreamliner joins, so every command works
122+
immediately; the dashboard is only for customizing it. Machine-readable schema for the editor is generated with
123+
`npm run schema:export` into `schema/guild-config.schema.json` (also run during `prebuild`).
131124

132125
## Reloading
133126

@@ -151,4 +144,4 @@ Dreamliner is organized into plugins under the `plugins:` key. Each plugin has i
151144
| Utilities | utility, stats, bot\_customisation, logs |
152145
| Feedback | reviews, suggestions |
153146

154-
See [Documentation index](/broken/pages/ScBf0pRjbQl3XDFHSAMa) for setup guides per plugin. The default template (`/config template`) includes all configurable fields.
147+
See [Documentation index](/broken/pages/ScBf0pRjbQl3XDFHSAMa) for setup guides per plugin. The dashboard exposes every configurable field for every plugin.

docs/getting-started.md

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Getting started
22

3-
Dreamliner uses a **download → edit → upload** workflow for server configuration. After the first upload, you can also manage Dreamliner Roles and command access in Discord with `/permissions role ...` (no re-upload needed).
3+
Dreamliner is configured entirely from the **web dashboard** — there is no download/upload YAML workflow. You can
4+
also manage Dreamliner Roles and command access in Discord with `/permissions role ...` without ever opening the
5+
dashboard.
46

57
## 1. Invite the bot
68

@@ -19,23 +21,23 @@ At minimum you will need:
1921

2022
The bot also needs standard read/send message permissions in channels where commands are used.
2123

22-
## 2. Download the template
24+
As soon as Dreamliner joins, it provisions a working default config for the server — every command works
25+
immediately, before anyone touches the dashboard.
26+
27+
## 2. Open the dashboard
2328

2429
A server administrator runs:
2530

2631
```
27-
/config template
32+
/config
2833
```
2934

30-
This sends `dreamliner-template.yaml` - the default configuration maintained by the bot operator. It includes emoji settings and utility plugin defaults.
31-
32-
## 3. Edit the configuration
35+
This posts a link to this server's dashboard. Open it and sign in with Discord — this server is already selected.
3336

34-
Open the YAML file in any text editor. Common first steps:
37+
## 3. Configure
3538

3639
1. Set up Dreamliner Roles - assign your mod/admin Discord roles or users to the built-in **Moderator**/**Admin** roles (dashboard **Roles** page, or `/permissions role assign`).
37-
2. Adjust `emojis` if you want custom success/error/neutral/warning/unchecked prefixes.
38-
3. Enable and configure plugins under `plugins` - see [plugin documentation](/broken/pages/ScBf0pRjbQl3XDFHSAMa#plugins) for categories:
40+
2. Enable and configure plugins - see [plugin documentation](/broken/pages/ScBf0pRjbQl3XDFHSAMa#plugins) for categories:
3941
* **Moderation** - infractions, lockdown, slowmode
4042
* **Protection** - automod, scam protect, persist, autodelete
4143
* **Role management** - staff role assign, templates, autorole, pingables
@@ -47,39 +49,18 @@ Open the YAML file in any text editor. Common first steps:
4749
* **Customization** - custom events, aliases, custom commands
4850
* **Utilities** - utility commands, stats, bot customisation, logs
4951
* **Feedback** - reviews and suggestions
50-
4. Grant `plugins.utility`'s `can_*` permissions to your Dreamliner Roles.
51-
52-
See [Permissions setup](permissions.md) for a full walkthrough and examples. See [Configuration](configuration.md) for the full YAML format.
53-
54-
## 4. Upload your configuration
55-
56-
```
57-
/config upload file:<your-edited.yaml>
58-
```
59-
60-
Dreamliner validates the file, merges it with defaults, saves it to the database, and applies it immediately.
61-
62-
Use `/config validate` to check a file without saving.
63-
64-
## 5. Download your current config
65-
66-
To edit an existing setup:
67-
68-
```
69-
/config download
70-
```
52+
3. Grant `plugins.utility`'s `can_*` permissions to your Dreamliner Roles.
53+
4. Click **Save**. Dreamliner applies the config immediately - no restart, no re-upload.
7154

72-
This returns the effective configuration currently stored for your server.
55+
See [Permissions setup](permissions.md) for a full walkthrough and examples. See [Configuration](configuration.md) for the underlying config format.
7356

74-
## 6. Use utility commands
57+
## 4. Use utility commands
7558

76-
Once a configuration is uploaded, moderators can use commands like `/search`, `/user`, `/clean`, and `/help`. Permission is controlled by Dreamliner Roles, not just Discord roles.
59+
Moderators can use commands like `/search`, `/user`, `/clean`, and `/help` right away. Permission is controlled by Dreamliner Roles, not just Discord roles.
7760

7861
## Troubleshooting
7962

8063
| Problem | Solution |
81-
| ---------------------------- | ------------------------------------------------------- |
82-
| "No configuration yet" | Run `/config template` → edit → `/config upload` |
64+
| ----------------------------- | ------------------------------------------------------- |
8365
| "You do not have permission" | See [Permissions setup](permissions.md#troubleshooting) |
84-
| Upload validation errors | Run `/config validate` to see specific field errors |
8566
| Commands not appearing | Ask the bot operator to run `pnpm register-commands` |

docs/permissions.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ When inviting Dreamliner, grant at least these **bot permissions**:
1818
| View Channels | See channels and run commands |
1919
| Send Messages | Reply to slash commands |
2020
| Embed Links | Link previews in some outputs |
21-
| Attach Files | `/config download`, `/source`, `/avatar` |
21+
| Attach Files | `/source`, `/avatar` |
2222
| Read Message History | `/message`, `/context`, `/clean`, `/source` |
2323
| Manage Messages | `/clean` bulk delete |
2424
| Ban Members | `/bansearch`, `/ban`, `/unban`, `/softban` |
@@ -41,15 +41,13 @@ If commands fail in specific channels, check channel permission overwrites for t
4141

4242
***
4343

44-
## Step 2: Upload a server configuration
44+
## Step 2: Open the dashboard
4545

46-
Utility commands are disabled until a server admin uploads a config:
46+
A default config is provisioned automatically the moment Dreamliner joins, so every command already works. To
47+
customize it:
4748

48-
1. `/config template`
49-
2. Edit the YAML file
50-
3. `/config upload`
51-
52-
Only members with Discord **Manage Server** can use `/config` commands.
49+
1. Run `/config` (requires Discord **Manage Server**) for a link to this server's dashboard.
50+
2. Sign in with Discord, edit plugins/fields, then **Save** — it applies immediately.
5351

5452
***
5553

@@ -184,10 +182,9 @@ Voice, moderation, and nickname commands also use Discord's own **role hierarchy
184182

185183
| Action | Requirement |
186184
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
187-
| Upload / download / validate config | Discord **Manage Server** |
185+
| Edit server config on the dashboard | Discord **Manage Server** |
188186
| Create/rename/delete Dreamliner Roles, assign targets, grant commands | Discord **Manage Server** (dashboard **Roles** page or `/permissions role ...`) |
189187
| Hot-reload config (`/reload`) | `can_reload_guild` granted via a Dreamliner Role the member belongs to |
190-
| Edit full YAML | `/config download` → edit → `/config upload` |
191188

192189
### In-Discord permission editor
193190

@@ -208,17 +205,16 @@ Use `/permissions role ...` (requires **Manage Server**) instead of the dashboar
208205

209206
`role` and `command` options support autocomplete. Changes are saved immediately (same store the dashboard's Roles page uses).
210207

211-
`/config download` → edit → `/config upload` still covers everything else in the config, but `can_*` grants are not among them anymore — always use Dreamliner Roles for those.
208+
The dashboard still covers everything else in the config, but `can_*` grants are not among them anymore — always use Dreamliner Roles for those.
212209

213210
***
214211

215212
## Troubleshooting
216213

217214
| Symptom | Likely cause | Fix |
218215
| --------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------- |
219-
| "No configuration yet" | No YAML uploaded | `/config template` → edit → `/config upload` |
220216
| "You do not have permission" | No Dreamliner Role the member belongs to grants that flag | Assign them to a role that has it, or grant it on their existing role |
221-
| "You need Manage Server" | User lacks Discord perm | Grant Manage Server or have an admin upload config |
217+
| "You need Manage Server" | User lacks Discord perm | Grant Manage Server or have an admin configure it on the dashboard |
222218
| "You need Manage Messages" | `can_clean` ok but Discord perm missing | Add Manage Messages to mod role |
223219
| Command works for admins but not mods | Mod's Discord role/user isn't assigned to a Dreamliner Role with that flag | Assign it on the dashboard **Roles** page or `/permissions role assign` + `role grant` |
224220
| Bot does not respond in a channel | Channel overwrite | Allow bot View Channel + Send Messages |

0 commit comments

Comments
 (0)