diff --git a/.phase18-state.json b/.phase18-state.json index 0d1a7e8..940eeb4 100644 --- a/.phase18-state.json +++ b/.phase18-state.json @@ -1,11 +1,12 @@ { "completed_features": [], - "current_feature": "api-client-phase18", + "current_feature": "router-phase18", "started_at": "2026-05-23T07:29:44.977564", "attempted_features": [ "api-key-management", "audit-log-filters", "idle-detection", - "time-entry-comments" + "time-entry-comments", + "api-client-phase18" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 7473711..0f078fd 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -2226,3 +2226,22 @@ src/index.ts(27,25): error TS2769: No overload matches this call. Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTy +- `07:36:10` **INFO** Committed feature api-client-phase18 +- `07:36:10` **INFO** Pushed: rc=0 + +## Phase-3 Feature: router-phase18 (2026-05-23 07:36:10) + +- `07:36:10` **INFO** Description: Mount + UI-Routen für api-keys, comments +- `07:36:10` **INFO** Generating apps/api/src/routes/index.ts (ERWEITERT — füge apiKeyRoutes ('/api/api-keys') + timeEntryCommentRout…) +- `07:36:26` **INFO** wrote 2063 chars in 16.3s (attempt 1) +- `07:36:26` **INFO** Generating apps/web/src/App.tsx (ERWEITERT — füge /api-keys Route. Behalte alles.…) +- `07:37:20` **INFO** wrote 6554 chars in 54.1s (attempt 1) +- `07:37:20` **INFO** Running tsc --noEmit on api… +- `07:37:22` **WARN** tsc errors: +src/index.ts(27,25): error TS2769: No overload matches this call. + Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }, done: (err?: Error | undefined) => void): void'. + Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTy diff --git a/apps/api/src/routes/index.ts b/apps/api/src/routes/index.ts index 678d561..c766e14 100644 --- a/apps/api/src/routes/index.ts +++ b/apps/api/src/routes/index.ts @@ -5,6 +5,7 @@ import projectRoutes from "./projects" import projectTemplateRoutes from "./project-templates" import timeEntryRoutes from "./time-entries" import timeEntryTemplateRoutes from "./time-entry-templates" +import timeEntryCommentRoutes from "./time-entry-comments" import userRoutes from "./users" import settingsRoutes from "./settings" import auditLogRoutes from "./audit-log" @@ -15,10 +16,12 @@ import reportsRoutes from "./reports" import invoiceRoutes from "./invoices" import savedViewRoutes from "./saved-views" import notificationRoutes from "./notifications" +import apiKeyRoutes from "./api-keys" export async function setupRoutes(server: FastifyInstance) { server.register(authRoutes, { prefix: "/api/auth" }) server.register(timeEntryRoutes, { prefix: "/api/time-entries" }) + server.register(timeEntryCommentRoutes, { prefix: "/api/time-entry-comments" }) server.register(timeEntryTemplateRoutes, { prefix: "/api/time-entry-templates" }) server.register(customerRoutes, { prefix: "/api/customers" }) server.register(projectRoutes, { prefix: "/api/projects" }) @@ -33,4 +36,5 @@ export async function setupRoutes(server: FastifyInstance) { server.register(invoiceRoutes, { prefix: "/api/invoices" }) server.register(savedViewRoutes, { prefix: "/api/saved-views" }) server.register(notificationRoutes, { prefix: "/api/notifications" }) + server.register(apiKeyRoutes, { prefix: "/api/api-keys" }) } \ No newline at end of file diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index f299122..3c7b1c6 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -20,6 +20,7 @@ import Billing from "./pages/Billing" import Integrations from "./pages/Integrations" import ProjectTemplates from "./pages/ProjectTemplates" import Invoices from "./pages/Invoices" +import ApiKeys from "./pages/ApiKeys" import Nav from "./components/Nav" import CommandPalette from "./components/CommandPalette" import KeyboardHelp from "./components/KeyboardHelp" @@ -145,13 +146,6 @@ const projectDetailRoute = createRoute({ component: ProjectDetail }) -const documentsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: "/documents", - beforeLoad: authCheck, - component: Documents -}) - const profileRoute = createRoute({ getParentRoute: () => rootRoute, path: "/profile", @@ -159,6 +153,13 @@ const profileRoute = createRoute({ component: Profile }) +const adminUsersRoute = createRoute({ + getParentRoute: () => rootRoute, + path: "/admin/users", + beforeLoad: adminCheck, + component: AdminUsers +}) + const settingsRoute = createRoute({ getParentRoute: () => rootRoute, path: "/settings", @@ -166,33 +167,24 @@ const settingsRoute = createRoute({ component: Settings }) -const adminUsersRoute = createRoute({ - getParentRoute: () => rootRoute, - path: "/admin/users", - beforeLoad: async () => { - await authCheck() - await adminCheck() - }, - component: AdminUsers -}) - const auditLogRoute = createRoute({ getParentRoute: () => rootRoute, - path: "/admin/audit-log", - beforeLoad: async () => { - await authCheck() - await adminCheck() - }, + path: "/audit-log", + beforeLoad: adminCheck, component: AuditLog }) +const documentsRoute = createRoute({ + getParentRoute: () => rootRoute, + path: "/documents", + beforeLoad: authCheck, + component: Documents +}) + const webhooksRoute = createRoute({ getParentRoute: () => rootRoute, - path: "/admin/webhooks", - beforeLoad: async () => { - await authCheck() - await adminCheck() - }, + path: "/webhooks", + beforeLoad: authCheck, component: Webhooks }) @@ -219,11 +211,8 @@ const integrationsRoute = createRoute({ const projectTemplatesRoute = createRoute({ getParentRoute: () => rootRoute, - path: "/admin/project-templates", - beforeLoad: async () => { - await authCheck() - await adminCheck() - }, + path: "/projects/templates", + beforeLoad: authCheck, component: ProjectTemplates }) @@ -234,6 +223,13 @@ const invoicesRoute = createRoute({ component: Invoices }) +const apiKeysRoute = createRoute({ + getParentRoute: () => rootRoute, + path: "/api-keys", + beforeLoad: authCheck, + component: ApiKeys +}) + const routeTree = [ indexRoute, loginRoute, @@ -245,17 +241,18 @@ const routeTree = [ customerDetailRoute, projectsRoute, projectDetailRoute, - documentsRoute, profileRoute, - settingsRoute, adminUsersRoute, + settingsRoute, auditLogRoute, + documentsRoute, webhooksRoute, twoFactorRoute, billingRoute, integrationsRoute, projectTemplatesRoute, - invoicesRoute + invoicesRoute, + apiKeysRoute ] const router = createRouter({ @@ -271,8 +268,9 @@ declare module "@tanstack/react-router" { export default function App() { return ( - - - + Loading...} + /> ) } \ No newline at end of file