- React+Vite Frontend mit Routing, eigenem fetch-Client (kein axios) - Express Backend: Auth (JWT), Topics, Tasks, Leaderboard - PostgreSQL Schema + Seed: 7 Kategorien, 21 Topics, ~25 Aufgaben - Gamification: XP, Level (100×n^1.5), tägliche Streaks - docker-compose auf Port 3100 für DS1621 - Alltagsaufgaben: Finanzen, Geometrie, Physik, Informatik, Verkehr, Shopping
19 lines
677 B
JavaScript
19 lines
677 B
JavaScript
import { Routes, Route, Navigate } from 'react-router-dom'
|
|
import Home from './pages/Home.jsx'
|
|
import Login from './pages/Login.jsx'
|
|
import Register from './pages/Register.jsx'
|
|
import Dashboard from './pages/Dashboard.jsx'
|
|
import TopicPage from './pages/TopicPage.jsx'
|
|
|
|
export default function App() {
|
|
return (
|
|
<Routes>
|
|
<Route path="/" element={<Home />} />
|
|
<Route path="/login" element={<Login />} />
|
|
<Route path="/register" element={<Register />} />
|
|
<Route path="/dashboard" element={<Dashboard />} />
|
|
<Route path="/topic/:slug" element={<TopicPage />} />
|
|
<Route path="*" element={<Navigate to="/" replace />} />
|
|
</Routes>
|
|
)
|
|
}
|