feat: dashboard setup with passkey authentication

Scaffold Vite + React + TypeScript project with Tailwind CSS dark theme.
Add Axios API client with JWT interceptor and auto-refresh, WebAuthn
passkey auth flow (register/login), protected route wrapper, and React
Router with public and protected routes.
This commit is contained in:
Viktor Barzin 2026-02-22 15:54:32 +00:00
parent f218865872
commit f121f376ae
No known key found for this signature in database
GPG key ID: 0EB088298288D958
20 changed files with 5274 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import type { ReactNode } from 'react';
import { Navigate } from 'react-router-dom';
interface ProtectedRouteProps {
children: ReactNode;
}
export function ProtectedRoute({ children }: ProtectedRouteProps) {
const token = localStorage.getItem('access_token');
if (!token) {
return <Navigate to="/login" replace />;
}
return <>{children}</>;
}