Replace Next.js app with Vite React app (gerbil-manager-web)

- Remove gerbil-manager-nextjs (unused scaffold; recoverable from history)
- Scaffold gerbil-manager-web: Vite + React 19 + TypeScript
- German-only UI (lang=de, central strings in src/strings/de.ts)
- Mobile-first shell: bottom tab bar on phones, sidebar on >=768px
- react-router with skeleton routes (Start, Rennmaeuse, Wuerfe, Zuechter)
- API client (src/api/client.ts) pointing at GerbilManagerWebAPI,
  configurable via VITE_API_BASE_URL (default http://localhost:5179)
- nginx-based Dockerfile with SPA fallback; docker-compose frontend
  service now builds gerbil-manager-web

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-05 23:30:34 +02:00
parent 42a43ae24e
commit 6ee85bc909
41 changed files with 3436 additions and 4758 deletions

View File

@@ -0,0 +1,47 @@
import { NavLink, Outlet } from 'react-router-dom'
import { de } from '../strings/de'
const navItems = [
{ to: '/', label: de.nav.home, icon: '🏠', end: true },
{ to: '/rennmaeuse', label: de.nav.gerbils, icon: '🐭', end: false },
{ to: '/wuerfe', label: de.nav.litters, icon: '🍼', end: false },
{ to: '/zuechter', label: de.nav.breeders, icon: '🧑‍🌾', end: false },
]
/**
* App-Grundgerüst, mobile-first:
* - Smartphone: Kopfzeile oben, Tab-Leiste unten
* - Laptop (ab 768px): Seitenleiste links, Inhalt rechts
*/
export default function AppShell() {
return (
<div className="app-shell">
<header className="app-header">
<span className="app-logo" aria-hidden="true">🐭</span>
<h1 className="app-title">{de.app.title}</h1>
</header>
<nav className="app-nav" aria-label={de.nav.mainNavigation}>
{navItems.map((item) => (
<NavLink
key={item.to}
to={item.to}
end={item.end}
className={({ isActive }) =>
isActive ? 'nav-link nav-link--active' : 'nav-link'
}
>
<span className="nav-icon" aria-hidden="true">
{item.icon}
</span>
<span className="nav-label">{item.label}</span>
</NavLink>
))}
</nav>
<main className="app-main">
<Outlet />
</main>
</div>
)
}