Refactor the frontend (`services/frontend/`) to be cleaner, more maintainable, properly aligned with backend API, and rebranded from "bete/GMW" to "Discord Automod" and from "chatbot" to "chatbot".
- **chatbot → chatbot**: the frontend already uses "chatbot" naming for the component and API module; backend paths (`/api/chatbot/chat`) stay unchanged on frontend since they reference the actual backend path
- Remove unused shadcn/ui components (verified by grep)
## Target Directory Structure
```
src/
app/(dashboard)/
messages/page.tsx # slim → imports from components/messages/
dashboard/page.tsx # slim
voice/page.tsx # slim
media/page.tsx # slim
recordings/page.tsx # slim
analysis/page.tsx # slim
settings/page.tsx # slim
layout.tsx # unchanged
app/layout.tsx # update title
app/page.tsx # unchanged (redirect)
components/
messages/
message-card.tsx # from inline in messages/page.tsx
message-detail-view.tsx # from inline DetailView
ai-status-badge.tsx # from inline AiStatusBadge
images-grid.tsx # images tab content
review-list.tsx # review tab content
dashboard/
stats-section.tsx
users-section.tsx
user-detail-section.tsx
channels-section.tsx
channel-detail-section.tsx
voice/
voice-connection-card.tsx
active-speakers-panel.tsx
microphone-card.tsx
media/
music-player.tsx
recordings/
recording-list.tsx
analysis/
search-panel.tsx
shared/ # existing
layout/ # existing
chatbot/ # existing
ui/ # shadcn — remove unused
hooks/
use-messages.ts # cleaned, use shared WsHook type
use-dashboard.ts
use-voice.ts # cleaned
use-media.ts # cleaned
use-recordings.ts # cleaned
use-guilds.ts
use-config.ts
use-mobile.ts
index.ts
lib/
ws-hook.ts # NEW: shared WsHook type
api/
client.ts
messages.ts
voice.ts # voice-only
media.ts # NEW: extracted from voiceApi
dashboard.ts
recordings.ts
config.ts
chatbot.ts
ui-state.ts
index.ts
types/ # no structural changes, verify alignment
ws/ # no structural changes
format.ts
navigation.ts
utils.ts
```
## Key Changes Detail
### 1. Component Extraction
Each page file that has inline components (messages=689 lines, dashboard=570 lines) will have those components extracted into dedicated files. The page file becomes a thin composition layer.
### 2. WsHook Type Consolidation
Three files define `type WsHook = { on: <E>(eventType: E, handler: ...) => () => void }`. This moves to `lib/ws-hook.ts` and all three hooks import it.
### 3. LoadingSkeleton Fix
Replace dynamic `grid-cols-${columns}` with explicit Tailwind classes or inline style: