-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programfrontendgood first issueGood for newcomersGood for newcomers
Description
Bootstrap the application with global providers and ensure authentication state is hydrated before any protected page renders.
Requirements
providers.tsx — Wraps the app in:
QueryClientProvider(React Query)- Any other global providers
AuthInitializer component — A use client component that calls useAuthStore.getState().initialize() on mount using useEffect. Must be included in the root layout so it runs on every page load.
Middleware (middleware.ts) — Next.js edge middleware that:
- Checks for the
isAuthenticatedcookie - Redirects
/→/dashboard - Redirects unauthenticated users from
/(dashboard)/*routes to/login - Redirects authenticated users away from
/(auth)/*routes to/dashboard
Acceptance Criteria
-
initialize()runs once on app boot - Unauthenticated access to
/dashboardredirects to/login - Authenticated access to
/loginredirects to/dashboard
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programfrontendgood first issueGood for newcomersGood for newcomers