| Before (dashboard-old) | After (dashboard) |
|---|---|
| 3,180 lines HTML monolith | 21 React components |
| Vanilla JS + inline CSS | React 18 + TypeScript + Tailwind |
| No build step | Vite build system |
| Font Awesome icons | Lucide React icons |
| Manual fetch | React Query (auto-refresh) |
| 140KB+ uncompressed | 169KB gzipped bundle |
dashboard/
โโโ src/
โ โโโ components/
โ โ โโโ cards/ # SystemCard, OpenClawCard, PiewellCard, ScreenerCard
โ โ โโโ modals/ # KpiModal, KanbanModal
โ โ โโโ ui/ # Card, Button, Badge, Dialog (shadcn/ui style)
โ โ โโโ Header.tsx
โ โ โโโ Footer.tsx
โ โโโ hooks/
โ โ โโโ useProjects.ts # React Query for projects API
โ โ โโโ useSystem.ts # React Query for system metrics
โ โ โโโ useTheme.ts # Dark/light theme toggle
โ โโโ lib/
โ โ โโโ api.ts # API client
โ โ โโโ utils.ts # Helpers (cn, formatUptime, formatBytes)
โ โโโ types/
โ โ โโโ index.ts # TypeScript interfaces
โ โโโ App.tsx
โ โโโ main.tsx
โโโ dist/ # Production build (deployed)
โโโ backend/ # Node.js API (unchanged)
โโโ DEPLOY.md # Deployment guide
โโโ README.md # Quick start
โโโ package.json
GET /api/projects # All projects summary
GET /api/projects/:id # Single project details
GET /api/system # System metrics (CPU, RAM, Disk)
GET /api/projects/:id/kanban-tasks # Task board data
POST /api/actions/restart # Restart service
Current: https://dashboard.szhub.space
Build: npm run build โ dist/ folder
Server: PM2 + nginx proxy
Kept for reference. Contains:
Can be deleted after: 2026-03-25 (30 days retention)
/home/app/dashboard/backend/index.js:
Migration Date: 2026-02-25 03:20 UTC Migration By: Morty (via sub-agent) Status: โ Production Ready