feat(FN-005): implement frontend foundation with auth and routing

- Add OIDC authentication with PKCE flow
- Create dashboard shell with sidebar and header
- Implement project management UI (list, create, detail)
- Add tool spawn page with tool/project selection
- Create tool instance detail page with status and controls
- Set up React Router with route guards
- Add Zustand auth store and API client with types
This commit is contained in:
2026-05-14 17:28:15 +02:00
parent 6aea953734
commit 6f18dd24a5
27 changed files with 1469 additions and 43 deletions
+24
View File
@@ -0,0 +1,24 @@
import { create } from 'zustand'
import type { User } from '../types/api.ts'
export type AuthState = 'loading' | 'authenticated' | 'unauthenticated' | 'error'
interface AuthStore {
state: AuthState
user: User | null
error: Error | null
setState: (state: AuthState) => void
setUser: (user: User | null) => void
setError: (error: Error | null) => void
logout: () => void
}
export const useAuthStore = create<AuthStore>((set) => ({
state: 'loading',
user: null,
error: null,
setState: (state) => set({ state }),
setUser: (user) => set({ user, state: user ? 'authenticated' : 'unauthenticated' }),
setError: (error) => set({ error, state: 'error' }),
logout: () => set({ user: null, state: 'unauthenticated', error: null }),
}))