Vantz Stockwell
c5d057146a
feat: Complete Phase 1 frontend — WebSocket + Wipe feature end-to-end
...
Implements full-stack vertical slice for wipe management with real-time updates.
WebSocket Integration:
- useWebSocket composable with auto-reconnect (exponential backoff up to 30s)
- JWT authentication via query parameter
- Automatic connection on auth state change
- Bi-directional messaging support
- Message handler subscription pattern
- Vite dev proxy configured for WebSocket (ws: true)
Toast Notification System:
- Pinia store with convenience methods (success/error/warning/info)
- Vue component with Lucide icons and Tailwind styling
- Auto-dismiss with configurable duration (5s default, 8s for errors)
- Manual dismiss with X button
- Smooth slide-in transitions from bottom-right
- Stack multiple toasts with proper spacing
Wipe Store Implementation:
- All API methods: fetchProfiles, fetchSchedules, fetchHistory
- Trigger wipe with optimistic UI update
- Dry-run simulation endpoint
- Profile CRUD operations (create, update, delete)
- WebSocket event listeners for real-time status updates
- Toast notifications on wipe_started, wipe_completed, wipe_failed
- Automatic history refresh on completion events
- Error handling with user-facing messages
Real-time Event Flow:
1. User triggers wipe → POST /api/wipes/trigger
2. Backend publishes NATS event: corrosion.{license_id}.wipe_started
3. WebSocket forwards event to frontend
4. Wipe store updates history array
5. Toast notification shows "Wipe started"
6. Progress events update status in real-time
7. Completion event triggers success toast + history refresh
Files Created:
- frontend/src/composables/useWebSocket.ts (208 LOC)
- frontend/src/stores/toast.ts (63 LOC)
- frontend/src/components/ToastNotification.vue (47 LOC)
Files Modified:
- frontend/src/stores/wipe.ts (273 LOC, was 42 LOC — 5 TODO methods → fully implemented)
- frontend/src/App.vue (added ToastNotification component)
- frontend/vite.config.ts (enabled WebSocket proxy)
TypeScript: Strict mode, zero build errors
Frontend builds: ✅ 929ms, 45.86 kB gzip
Phase 1 Status: ~80% complete
- ✅ WebSocket/NATS real-time layer
- ✅ Wipe feature production-ready
- ⏸️ Remaining stores (plugins, chat, players) still stubbed
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-02-15 12:17:31 -05:00
Vantz Stockwell
88b50a30b4
feat: Phase 1c — Platform Admin Dashboard
...
Full super-admin dashboard for SaaS platform management:
Backend (10 files):
- Migration 003: Add is_super_admin column to users table
- JWT Claims: Carry is_super_admin through access tokens
- SuperAdmin extractor: Axum FromRequestParts that rejects non-admins (403)
- Admin API module: 10 endpoints behind /api/admin/*
- GET /stats (KPIs: licenses, users, MRR, servers, signups)
- GET/POST /licenses (paginated, filterable, manual generation)
- GET/PATCH /licenses/:id (detail view, revoke/activate)
- GET /subscriptions (module sub list with MRR breakdown)
- GET/PATCH /users (paginated, toggle admin, disable accounts)
- GET /servers (fleet overview across all licenses)
- GET /health (DB pool, NATS status, table row counts)
- Bootstrap updated: first user gets is_super_admin = true
Frontend (8 files):
- 5 admin views in src/views/platform-admin/
- DashboardLayout: "Platform" nav section (gated on isSuperAdmin)
- Router: /admin/* routes with superAdmin meta guard
- Auth store: isSuperAdmin computed property
- Types: is_super_admin on User interface
Build: 80 chunks, zero TS errors, clean production build.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-15 02:07:38 -05:00
Vantz Stockwell
e237333861
fix: Resolve all TypeScript build errors — path aliases + unused params
...
Adds baseUrl and @/* path mapping to tsconfig.app.json so vue-tsc can
resolve @/types, @/stores, and @/composables. Prefixes unused stub
parameters with _ to satisfy noUnusedParameters. Full build now passes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-14 23:00:26 -05:00
Vantz Stockwell
a53cb4d8a5
feat: Implement server endpoints, store, and live dashboard
...
Backend: Server connection/config/admins DB queries, server API routes
with auth-gated endpoints (overview, config CRUD, admin management).
Frontend: Server store wired to API, dashboard fetches server data on
mount with live status indicators, uptime formatting, and server
config display. Logout now redirects to /login.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-14 21:51:49 -05:00
Vantz Stockwell
e2f2f64d33
scaffold: Vue 3 frontend — router, stores, views, composables, layouts
...
Complete frontend skeleton: Vite + Vue 3 + TypeScript + Tailwind CSS,
Pinia stores (auth, server, wipe, plugins), authenticated API composable,
full route tree with auth guards, DashboardLayout with sidebar nav,
23 view stubs across auth/admin/public, all TypeScript interfaces.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-14 21:42:21 -05:00