Современный React-рефакторинг исходного HTML-монолита dashboard.
npm install
npm run dev
npm run build
npm run preview # preview production build
Создайте .env.local для локальной разработки:
VITE_API_BASE=http://localhost:3000/api
По умолчанию используется production API:
VITE_API_BASE=https://dashboard.szhub.space/api
src/
├── components/
│ ├── cards/
│ │ ├── SystemCard.tsx
│ │ ├── OpenClawCard.tsx
│ │ ├── PiewellCard.tsx
│ │ └── ScreenerCard.tsx
│ ├── modals/
│ │ ├── KpiModal.tsx
│ │ └── KanbanModal.tsx
│ ├── ui/
│ │ ├── card.tsx
│ │ ├── button.tsx
│ │ ├── badge.tsx
│ │ └── dialog.tsx
│ ├── Header.tsx
│ └── Footer.tsx
├── hooks/
│ ├── useProjects.ts
│ ├── useSystem.ts
│ └── useTheme.ts
├── lib/
│ ├── api.ts
│ └── utils.ts
├── types/
│ └── index.ts
├── App.tsx
├── main.tsx
└── index.css
#6366f1 (indigo)#10b981 (green)#ef4444 (red)#f59e0b (amber)#8b5cf6 (purple)#10b981 (green)#ef4444 (red)#f59e0b (amber)@dnd-kit/sortable для перестановки карточекGET /api/projects — все проектыGET /api/projects/:id — детали проектаGET /api/system — системные метрикиGET /api/projects/:project/kanban-tasks — задачиPOST /api/actions/restart — перезапуск сервиса| Технология | Версия | Назначение |
|---|---|---|
| React | 18 | UI framework |
| TypeScript | 5 | Type safety |
| Vite | 7 | Build tool |
| Tailwind CSS | 3 | Styling |
| React Query | 5 | Data fetching |
| Recharts | 2 | Charts |
| Lucide React | Latest | Icons |
| Было (HTML) | Стало (React) |
|---|---|
| 3180 строк monolith HTML | Модульная архитектура |
| Vanilla JS | React + TypeScript |
| Inline CSS | Tailwind utility classes |
| Font Awesome | Lucide React |
| Manual DOM updates | React Query auto-refresh |
| SortableJS | @dnd-kit (TODO) |
Создано: 2026-02-25
Версия: 1.0.0
Автор: Dashboard Lead (Sub-Agent)