feat: implement user authentication and dashboard
Adds a complete user authentication system and a protected dashboard. - Implements JWT-based authentication using ElysiaJS. - Integrates Prisma for database access and user management. - Creates a login page and protected routes for the dashboard. - Adds a dashboard layout with pages for API key management. - Includes necessary UI components from Mantine.
This commit is contained in:
@@ -2,12 +2,26 @@
|
||||
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
||||
import Home from "./pages/Home";
|
||||
import NotFound from "./pages/NotFound";
|
||||
import Login from "./pages/Login";
|
||||
import ProtectedRoute from "./components/ProtectedRoute";
|
||||
import Dashboard from "./pages/dashboard/dashboard_page";
|
||||
import DashboardLayout from "./pages/dashboard/dashboard_layout";
|
||||
import ApiKeyPage from "./pages/dashboard/apikey/apikey_page";
|
||||
|
||||
export default function AppRoutes() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/login" element={<Login />} />
|
||||
<Route element={<ProtectedRoute />}>
|
||||
<Route path="/dashboard" element={<DashboardLayout />}>
|
||||
<Route index element={<Dashboard />} />
|
||||
<Route path="landing" element={<Dashboard />} />
|
||||
<Route path="apikey" element={<ApiKeyPage />} />
|
||||
</Route>
|
||||
</Route>
|
||||
|
||||
<Route path="*" element={<NotFound />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
|
||||
Reference in New Issue
Block a user