- Layout with sidebar navigation (Dashboard, Rules, Keys, Settings) - Dashboard page: stat cards, cost savings area chart (Recharts), model usage table - Rules page: routing rules CRUD with modal editor, strategy/complexity/model matching - Keys page: API key generation, copy-once reveal, revocation, quick-start code snippet - Settings page: org info, provider config, danger zone - API client (SWR + fetch wrapper) with full TypeScript types - dd0c dark theme: indigo primary, cyan accent, dark surfaces - Vite proxy config for local dev against API on :3000
21 lines
676 B
TypeScript
21 lines
676 B
TypeScript
import { Routes, Route, Navigate } from 'react-router-dom';
|
|
import Layout from './components/Layout';
|
|
import Dashboard from './pages/Dashboard';
|
|
import Rules from './pages/Rules';
|
|
import Keys from './pages/Keys';
|
|
import Settings from './pages/Settings';
|
|
|
|
export default function App() {
|
|
return (
|
|
<Routes>
|
|
<Route element={<Layout />}>
|
|
<Route path="/" element={<Navigate to="/dashboard" replace />} />
|
|
<Route path="/dashboard" element={<Dashboard />} />
|
|
<Route path="/rules" element={<Rules />} />
|
|
<Route path="/keys" element={<Keys />} />
|
|
<Route path="/settings" element={<Settings />} />
|
|
</Route>
|
|
</Routes>
|
|
);
|
|
}
|