Public route

Minimal auth starter

This landing page is public. Use it for marketing content, docs, or whatever you like. Secure areas live under the invisible (secure) route group so server-side redirects protect them automatically.

Current session

You're browsing anonymously. Visit the dashboard to trigger the auth guard or sign in first.

How it works

  • JWT cookie decoded in `src/hooks.server.js` populates `locals.user`.
  • Public routes just read from `$page.data.user`.
  • Routes under `src/routes/(secure)` redirect to `/login` if no user.