feat: complete React + Flask rebuild of dashboard

Backend:
- New Flask 3 app with service-layer architecture
- Pydantic v2 models and unified API response format
- psycopg3 connection pool with stored procedure support
- 14 services: DB, SSH, K8s, BGD, RMQ (admin + game), realtime, player, economy, guild, world, progression, character, audit, chat
- 30+ API endpoints covering players, guilds, economy, world, admin, server, files, director, chat
- SSE real-time events for battlegroup, chat, metrics, connection status
- SocketIO remote shell (xterm.js compatible)
- Settings CRUD, moderation (ban/kick/unban), audit logging
- Security: CSRF, rate limiting, CSP, HSTS, read-only SQL enforcement

Frontend:
- Vite + React 18 + TypeScript + Tailwind CSS
- 14 Dune house themes via CSS custom properties
- SWR for server state, Axios API client with interceptors
- 14 pages: Overview, Player Explorer + Detail, Guild Manager, Vehicles, Buildings, Map Viewer, Accounts, Server Control, Admin Tools (7 tabs), Chat Monitor, Remote Shell, File Browser, Director, Settings
- Player Detail with 6 tabs: overview, inventory, vehicles, buildings, progression, actions
- Admin Tools: broadcast, economy, world, character, functions, raw query, audit log
- Interactive canvas map viewer with zoom/pan/filter
- Toast notifications, connection badges, theme switcher

Other:
- Updated .gitignore for frontend/backend structure
- Updated README with new architecture, development guide, and project structure
- Legacy app/ templates/ static/ remain untouched
This commit is contained in:
Reditus committed 2026-05-23 07:08:30 +01:00
1 parent fa620f4da9
commit be845f76f1
76 files changed
+8410 -10

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
import { Link, useLocation } from 'react-router-dom'
import { useApp } from '../../stores/AppContext'
import ThemeSwitcher from './ThemeSwitcher'
import ConnectionBadge from './ConnectionBadge'
const NAV_ITEMS = [
{ path: '/', label: 'Overview' },
{ path: '/players', label: 'Players' },
{ path: '/guilds', label: 'Guilds' },
{ path: '/server', label: 'Server' },
{ path: '/chat', label: 'Chat' },
{ path: '/admin', label: 'Admin' },
{ path: '/shell', label: 'Shell' },
]
export default function NavBar() {
const location = useLocation()
const { state } = useApp()
return (
<nav className="sticky top-0 z-50 h-[52px] bg-nav-bg flex items-center px-6 shadow-md border-b border-border">
<div className="flex items-center gap-2 mr-8">
<span className="text-primary font-serif font-bold text-lg tracking-wide">Dune</span>
<span className="text-nav-text text-xs uppercase tracking-widest">Admin</span>
</div>
<div className="flex items-center gap-1">
{NAV_ITEMS.map((item) => (
<Link
key={item.path}
to={item.path}
className={`px-4 h-[52px] flex items-center text-[13px] font-medium border-b-2 transition-colors ${
location.pathname === item.path
? 'text-nav-active border-nav-active'
: 'text-nav-text border-transparent hover:text-white hover:bg-white/5'
}`}
>
{item.label}
</Link>
))}
</div>
<div className="ml-auto flex items-center gap-4">
<ConnectionBadge />
<ThemeSwitcher />
{state.user && (
<span className="text-nav-text text-xs">{state.user}</span>
)}
</div>
</nav>
)
}