- Added functionality to activate and deactivate lockdowns via the automod worker, responding to specific job names. - Enhanced the anti-raid join handler to apply a verification role when lockdown is active and the anti-raid action is set to VERIFY. - Updated the automod configuration to ensure default rules are created if missing, improving the setup process for new guilds. - Introduced new API endpoints for managing cases and warnings, allowing for soft deletion and reason updates. - Enhanced the moderation dashboard to include warnings management, improving user experience in moderation tasks. - Updated localization files to reflect new features and improve user guidance in both English and German.
283 lines
13 KiB
Markdown
283 lines
13 KiB
Markdown
## Phase 6 – WebUI-Fundament (Status: abgeschlossen, manuell bestätigt)
|
||
|
||
- OAuth/Sessions, Settings-Framework, Layout, Modul-Toggles, Access-Rules
|
||
- Login manuell bestätigt
|
||
|
||
## Phase 7 – WebUI Modul-Seiten + Owner-Panel (Status: abgeschlossen, manuell bestätigt)
|
||
|
||
### Abgeschlossen
|
||
|
||
- Alle Modul-Dashboard-Seiten, Commands-Seite, Overview-Aktivität
|
||
- Owner-Panel (`/owner`: Übersicht, Guilds, Users, Flags, Presence, Team, Jobs, Changelog, Audit)
|
||
- Prisma `20260722190000_phase7_owner`, Shared Zod (`dashboard.ts`, `owner.ts`)
|
||
- BullMQ WebUI↔Bot, Presence-/Wartungsmodus-Anbindung
|
||
- Manuell bestätigt (User-Freigabe)
|
||
|
||
## Phase 8 – Landing, Status, Rechtsseiten (Status: abgeschlossen, manuell bestätigt)
|
||
|
||
### Abgeschlossen
|
||
|
||
- Landing `/`, Status `/status`, Rechtsseiten, Public APIs, Core-Commands, `docs/verification.md`
|
||
- Manuell bestätigt (User-Freigabe)
|
||
|
||
## Deploy-Branch (`deploy`) – Traefik + Dashboard-Domain
|
||
|
||
### Abgeschlossen (Code auf Branch `deploy`; `main` unverändert)
|
||
|
||
- Traefik-Vollstack: Compose-Netz `traefik-network` (external) + `internal`
|
||
- WebUI hinter Traefik: Host `dashboard.nexumi.de`, Entrypoint `websecure`, `certresolver=letsencrypt`
|
||
- Host-Port `3000` entfernt; nur Traefik exponiert die WebUI
|
||
- `WEBUI_URL=https://dashboard.nexumi.de` (OAuth-Callback: `/api/auth/callback`)
|
||
- Marketing-Landing archiviert unter `apps/webui/src/archived/landing-page.tsx`
|
||
- `/` zeigt Login; `/login` leitet auf `/` weiter (Query erhalten)
|
||
- **SPEC-Abweichung (bewusst):** öffentliche Landing später extern auf `nexumi.de`; Dashboard unter Subdomain
|
||
- Rechtsseiten vollständig (Impressum/Datenschutz/ToS) DE+EN; Locale per Accept-Language (Cookie hat Vorrang)
|
||
- Plesk-Landing unter `landingpage/` mit lokalen Rechtsseiten (`impressum.php`, `datenschutz.php`, `nutzungsbedingungen.php`)
|
||
|
||
### Manuell testen (Deploy)
|
||
|
||
- [ ] DNS `dashboard.nexumi.de` → Traefik-Host
|
||
- [ ] Discord OAuth Redirect: `https://dashboard.nexumi.de/api/auth/callback`
|
||
- [ ] `docker compose up -d --build` (Netz `traefik-network` muss existieren)
|
||
- [ ] TLS-Zertifikat (Resolver-Name ggf. an Traefik anpassen)
|
||
- [ ] Login `/` → Dashboard; Session-Cookie `Secure`
|
||
|
||
## Post-Phase – Premium + DSGVO (Status: implementiert, manuelle Tests offen)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Premium: `PremiumTierConfig`, Guild-/User-Zuweisung, Owner-UI `/owner/premium`
|
||
- Limits enforced (Tags/Feeds/Backups) in Bot + WebUI
|
||
- DSGVO: `/privacy`, `/gdpr delete confirm:true` (Löschung/Anonymisierung + `GdprDeletionLog`)
|
||
- Log-Retention: `LoggingConfig.retentionDays` + täglicher Job `retention`/`purgeExpiredLogs`
|
||
- Snipe standardmäßig aus (`GuildSettings.snipeEnabled`, Toggle in Allgemeine Einstellungen)
|
||
- Migration `20260722200000_premium_gdpr`
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Owner `/owner/premium`: Limits speichern, Guild PREMIUM zuweisen
|
||
- [ ] Free-Limit: mehr Tags/Feeds/Backups als Free-Cap → Fehler
|
||
- [ ] `/privacy` und `/gdpr delete confirm:true`
|
||
- [ ] Logging-Retention im Dashboard setzen
|
||
- [ ] Snipe: default aus; nach Aktivierung in Einstellungen nutzbar
|
||
|
||
### Bewusst offen
|
||
|
||
- Musik- und KI-Modul (nur auf Zuruf)
|
||
- Premium-Zahlungsanbindung
|
||
- Externe Marketing-Landing auf `nexumi.de`
|
||
|
||
## Post-Phase – Dashboard-UI + Command-Palette + Landing-Polish (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Guild-/Owner-Shell: Branding, Sticky-Header, mobile Sidebar-Sheet, Overview-Polish
|
||
- Globale Cmd/Ctrl+K-Suche: Seiten, Slash-Commands, Einstellungsfelder (Deep-Links)
|
||
- Settings-Feld-Registry + Form-Anchors; Commands-Seite liest `?q=`
|
||
- Plesk-Landing: Inter, Hero-Hierarchie, dezente Motion, Designsprache an WebUI
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Dashboard: Cmd/Ctrl+K → Seite, Command und Option navigieren (Hash-Scroll)
|
||
- [ ] Mobile: Sidebar-Sheet + Such-Trigger
|
||
- [ ] Overview und Owner-Panel Layout
|
||
- [ ] Landing Light/Dark (`prefers-color-scheme`) + CTAs
|
||
|
||
### Bewusst offen
|
||
|
||
- Musik- und KI-Modul (nur auf Zuruf)
|
||
- Premium-Zahlungsanbindung
|
||
|
||
## Post-Phase – Channel-Picker überall (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- `DiscordChannelSelect` / `DiscordChannelMultiSelect` + `useGuildChannels`
|
||
- Alle Modul-Forms: Kanal-ID-Texteingaben durch durchsuchbare Channel-Auswahl ersetzt
|
||
- Voice-/Category-Filter für TempVoice/Stats/Tickets
|
||
|
||
## Post-Phase – Role-Picker überall (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- `DiscordRoleSelect` / `DiscordRoleMultiSelect` + `useGuildRoles`
|
||
- Modul-Forms/Manager: Rollen-ID-Texteingaben durch durchsuchbare Role-Auswahl ersetzt (Welcome, Verification, Leveling, Logging, Birthdays, Giveaways, Tags, Tickets, Access Rules, Feeds, Scheduler, Commands)
|
||
- Selfroles-Textarea (`roleId | label | emoji`) bewusst unverändert
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Rollen in den Modul-Settings per Dropdown setzen und speichern
|
||
- [ ] Multi-Select (Autoroles, No-XP-Roles, Support-Roles, …) speichert string[] korrekt
|
||
- [ ] Access-Rules: Rolle wählen und Module zuweisen
|
||
|
||
## Post-Phase – Command-Global-Rules + Channel-Picker (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Globale Command Channel-Whitelist/-Blacklist in `GuildSettings` + Commands-UI
|
||
- Searchable Multi-Select für Kanäle/Rollen (statt Raw-IDs) auf der Commands-Seite
|
||
- APIs: `/commands/globals`, `/channels`, `/roles`
|
||
- Bot erzwingt globale + per-Command Channel/Role/Cooldown-Regeln in `routeCommand`
|
||
- Migration `20260722210000_command_global_channels`
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Commands: globale Whitelist/Blacklist speichern, in Discord prüfen
|
||
- [ ] Per-Command Channel/Rollen per Dropdown setzen
|
||
- [ ] Deaktivierter Command / Cooldown antwortet ephemeral
|
||
|
||
## Post-Phase – Discord Embed-Builder (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Wiederverwendbare `DiscordEmbedBuilder`-Komponente inkl. Live-Vorschau
|
||
- Basis: Titel, Beschreibung, Farbe
|
||
- Erweitert: Author (Name/Icon/URL), Thumbnail, großes Bild, Footer (Text/Icon), Titel-URL, Timestamp
|
||
- Welcome/Leave, Tags (EMBED) und Scheduler nutzen denselben Builder + `buildEmbedFromPayload`
|
||
- Platzhalter in Text-/URL-Feldern inkl. `{user.avatar}` / `{server.icon}` (Welcome/Tags)
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Welcome/Leave-Embed mit Author, Thumbnail, Banner und Footer speichern und in Discord prüfen
|
||
- [ ] Tag mit Antworttyp Embed (auch nur Bild/Author ohne Titel) erstellen/bearbeiten
|
||
- [ ] Geplante Nachricht mit erweitertem Embed anlegen
|
||
- [ ] Einfaches Embed (nur Titel/Beschreibung/Farbe) funktioniert weiter wie zuvor
|
||
|
||
## Post-Phase – Logging Multi-Event pro Kanal (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Logging-UI: pro Log-Kanal mehrere Event-Typen per Multi-Select
|
||
- Bestehende 1:1-Mappings werden beim Laden nach Kanal gruppiert; Speichern expandiert wieder auf `LogChannel`-Zeilen
|
||
- Event-Typen sind exklusiv (DB `@@unique([guildId, eventType])`) – Auswahl in einer Zeile entfernt sie aus anderen
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Mehrere Events einem Kanal zuweisen und speichern
|
||
- [ ] Event von Kanal A nach Kanal B umhängen (verschwindet bei A)
|
||
- [ ] Bot schreibt Logs der gewählten Events in den richtigen Kanal
|
||
|
||
## Post-Phase – Platzhalter-Hilfe (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Aufklappbare `PlaceholderHelp`-Komponente mit Kopieren pro Token
|
||
- Kontextspezifische Presets (Welcome, Tags, Birthdays, Leveling, TempVoice, Stats, Feeds, Scheduler)
|
||
- Welcome-DM nutzt jetzt dieselben Platzhalter wie Welcome-Text (nicht nur `{user}`)
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Welcome: Liste aufklappen, Platzhalter kopieren, in Embed/Text einfügen
|
||
- [ ] Tags/Birthdays/Leveling/Stats/Feeds/Scheduler: nur die jeweiligen Tokens sichtbar
|
||
|
||
## Post-Phase – Components V2 (Status: implementiert, manuelle Tests offen)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Shared Zod: `MessageComponentsV2` + Actions, `COMPONENTS_V2` für Welcome/Tags, Leave-Typen, custom_id `cv2:{source}:{ref}:{actionId}`
|
||
- Prisma-Migration `20260722220000_components_v2`: `welcomeComponents`/`leaveType`/`leaveComponents`, `Tag.components`, `ScheduledMessage.components`, `ComponentMessageBinding`
|
||
- Bot: `buildComponentsV2Payload`, Anbindung Welcome/Leave/Tags/Scheduler, Interaction-Handler, Dashboard-Send-Queue `messages`/`dashboardMessageSend`
|
||
- Slash: `/embed builder` + `/embed components` (Quick-V2)
|
||
- WebUI: `DiscordComponentsV2Builder`, Mode-Switches Welcome/Tags/Scheduler, Dashboard-Seite `/messages`
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Welcome V2 mit Container + Thumbnail-Section + Link-Button + Toggle-Role-Button
|
||
- [ ] Tag V2 mit String-Select → ephemeral reply
|
||
- [ ] Scheduler V2 Ankündigung
|
||
- [ ] Dashboard Messages: Embed + Components V2 senden
|
||
- [ ] Slash `/embed components`
|
||
- [ ] Bestehende Embeds unverändert
|
||
- [ ] Migration anwenden (`prisma migrate deploy`) und Bot/WebUI neu bauen
|
||
|
||
### Bewusst offen
|
||
|
||
- Modal-only Components, File-Component, Premium-Buttons (nicht im MVP)
|
||
- Pixelgenaue Discord-Vorschau im Dashboard
|
||
|
||
## Post-Phase – Harden (Sharding / Gates / Observability) (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Confirmations (Moderation + Guildbackup) in Redis mit TTL statt Prozess-`Map`
|
||
- Command-Registrierung einmal im Manager (Redis-Lock); Recurring Jobs einmal (Primary-Shard + Lock)
|
||
- Modul-Toggles + FeatureFlags + User-/Guild-Blacklists im Bot erzwungen (`routeCommand`, Events, GuildCreate leave)
|
||
- Moderation: Hierarchy-Checks, Duration vor Ban-Confirm, Timeout-Cap 28d, warn remove guild-scoped, atomare Case-Nummern, Temp-Ban Job-Dedup + UNBAN-Case, `setDefaultMemberPermissions`
|
||
- Sentry (`@sentry/node`) in Bot + WebUI (`instrumentation.ts`); echte Prometheus-Metrics (`/metrics`)
|
||
- Interaction-Registry statt if-Kette; Unit-Tests für Duration, Confirm-Store, Module-Gates, Metrics
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Ban mit Dauer: Confirm auf anderem Shard / nach Restart innerhalb TTL
|
||
- [ ] Dashboard: Modul Moderation aus → `/ban` antwortet „Modul deaktiviert“
|
||
- [ ] Owner: User-Blacklist → Interactions blockiert; Guild-Blacklist → Bot verlässt Server
|
||
- [ ] `/metrics` mit Bearer-Token: Counters + Shard-Ping
|
||
- [ ] Temp-Ban ablaufen → Unban + Case `UNBAN`
|
||
|
||
### Bewusst offen
|
||
|
||
- Musik- und KI-Modul (nur auf Zuruf)
|
||
- Premium-Zahlungsanbindung
|
||
- P4-UX (Server-Lock, Ban deleteMessageSeconds) bewusst nachgelagert
|
||
|
||
## Post-Phase – Verification Captcha-Anbieter + Alt-Erkennung (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Captcha-Anbieter wählbar pro Guild: `MATH`, `RECAPTCHA_V2`, `RECAPTCHA_V3`, `HCAPTCHA`, `TURNSTILE`
|
||
- Google/hCaptcha/Turnstile Keys in `.env` (WebUI); Dashboard zeigt nur konfigurierte Anbieter
|
||
- Captcha-Seite `/verify/captcha` mit Provider-Widgets; Server-side Siteverify
|
||
- Alt-Account-Erkennung: gesalzener IP-Hash (Captcha-Flow) + Invite-Cluster; optional blockieren via `failAction`
|
||
- Prisma `VerificationRecord` + Config-Felder; Migration `20260723120000_verification_captcha_alt`
|
||
- Slash `/verify setup`: `captcha_provider`, `alt_detection`
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] `.env`: `RECAPTCHA_SITE_KEY`/`SECRET` setzen → Dashboard zeigt reCAPTCHA v2/v3
|
||
- [ ] Guild Captcha-Modus + Anbieter wählen → Verify-Button → WebUI Captcha → Rolle
|
||
- [ ] Alt-Erkennung an: zweiter Account gleiche IP → Kick/Ban je nach failAction
|
||
- [ ] Migration: `prisma migrate deploy` + Bot/WebUI neu bauen
|
||
- [ ] `CAPTCHA_IP_HASH_SALT` gesetzt (min. 16 Zeichen), sonst keine IP-Alt-Signale
|
||
|
||
### Bewusst offen
|
||
|
||
- Kein Browser-Fingerprinting (DSGVO); IP nur gehasht mit Salt
|
||
- Keine manuelle „Alt freigeben“-UI (nur Flag in `VerificationRecord`)
|
||
|
||
## Post-Phase – Leveling Rollen-Belohnungen UI (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Dashboard Leveling: Level→Rolle-Belohnungen bearbeiten (Liste, speichern ersetzt `LevelReward`)
|
||
- Shared Schema `rewards` + `hasUniqueRewardLevels`; i18n DE/EN
|
||
- Stapel-Toggle mit Hinweis neben dem Belohnungs-Editor
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Belohnung hinzufügen (z. B. Level 5 → Rolle), speichern, Mitglied levelt → Rolle vergeben
|
||
- [ ] Stack an/aus: stapeln vs. nur aktuelle Belohnungsrolle
|
||
- [ ] Doppeltes Level → Fehlermeldung, speichern blockiert
|
||
|
||
## Post-Phase – Automod/Moderation Dashboard Ausbau (Status: implementiert)
|
||
|
||
### Abgeschlossen (Code)
|
||
|
||
- Automod: alle 10 Filterregeln im Dashboard (Aktion, Schwellen, Link-WL/BL, Wörter/Regex, Ausnahmen)
|
||
- Lockdown an/aus enqueued `activateLockdown` / `deactivateLockdown` an den Bot
|
||
- Anti-Raid-Aktion `VERIFY` (Unverified-Rolle) zusätzlich zu `LOCKDOWN`
|
||
- Moderation: Warn-Tabelle + Case edit/delete im Dashboard
|
||
- `/lock` `/unlock` Option `server` für guild-weiten Lock
|
||
- Shared: `AutomodRuleDashboardSchema`, `CaseUpdateDashboardSchema`, `AntiRaidAction` inkl. VERIFY
|
||
|
||
### Manuell testen
|
||
|
||
- [ ] Automod: WORD_FILTER Wörter setzen, EXTERNAL_LINK Whitelist, Regel speichern → Filter greift
|
||
- [ ] Lockdown-Toggle aus → Kanäle wieder beschreibbar
|
||
- [ ] Anti-Raid VERIFY: Unverified-Rolle in Verification konfiguriert, Join-Welle → Rolle
|
||
- [ ] Cases: Grund editieren / löschen; Warnings entfernen
|
||
- [ ] `/lock server:true` und `/unlock server:true`
|
||
|
||
## Nächster geplanter Schritt
|
||
|
||
- Deploy auf Traefik-Server manuell verifizieren; danach ggf. `deploy` → `main` mergen (nur auf Freigabe).
|