diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx
new file mode 100644
index 0000000..de21baf
--- /dev/null
+++ b/apps/web/src/App.tsx
@@ -0,0 +1,70 @@
+import { createRootRoute, createRoute, createRouter, RouterProvider, Outlet, redirect } from "@tanstack/react-router"
+import Dashboard from "./pages/Dashboard"
+import Login from "./pages/Login"
+import TimeEntries from "./pages/TimeEntries"
+import { api } from "./lib/api"
+
+const rootRoute = createRootRoute({
+ component: () => (
+
+
+
+ )
+})
+
+const loginRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: "/login",
+ component: Login
+})
+
+const indexRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: "/",
+ beforeLoad: async () => {
+ try {
+ await api.getMe()
+ } catch (error: any) {
+ if (error.status === 401) {
+ throw redirect({ to: "/login" })
+ }
+ }
+ },
+ component: Dashboard
+})
+
+const timeEntriesRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: "/time-entries",
+ beforeLoad: async () => {
+ try {
+ await api.getMe()
+ } catch (error: any) {
+ if (error.status === 401) {
+ throw redirect({ to: "/login" })
+ }
+ }
+ },
+ component: TimeEntries
+})
+
+const routeTree = rootRoute.addChildren([
+ indexRoute,
+ loginRoute,
+ timeEntriesRoute
+])
+
+const router = createRouter({
+ routeTree,
+ defaultPreload: "intent"
+})
+
+declare module "@tanstack/react-router" {
+ interface Register {
+ router: typeof router
+ }
+}
+
+export default function App() {
+ return
+}
\ No newline at end of file