- Vite + React 18 + TypeScript + Mantine + TanStack Query + react-router-dom - typed client: openapi-typescript -> src/api/schema.d.ts (committed), openapi-fetch - fetch wrapper middleware: cookies, X-CSRF-Token on writes, 401 -> /login, non-401 errors carry parsed JSON body - SessionProvider/useSession (GET /api/session), ProtectedRoute skeleton - app shell (Mantine + router) with placeholder login/home/config pages + gear nav - dev proxy to FastAPI; vitest smoke test; frontend README - npm scripts: dev/build/preview/lint/typecheck/test/codegen
19 lines
382 B
TypeScript
19 lines
382 B
TypeScript
/**
|
|
* Entry point — mounts the React app into #root.
|
|
*/
|
|
|
|
import { StrictMode } from 'react'
|
|
import { createRoot } from 'react-dom/client'
|
|
import App from './App'
|
|
|
|
const rootElement = document.getElementById('root')
|
|
if (!rootElement) {
|
|
throw new Error('Root element #root not found in document')
|
|
}
|
|
|
|
createRoot(rootElement).render(
|
|
<StrictMode>
|
|
<App />
|
|
</StrictMode>,
|
|
)
|