Phase D underway

INSAIM AIChat Bot now has an auth entry and a session-aware admin surface.

The dashboard is being built around the real Supabase architecture: workspaces, one MVP bot, website and PDF sources, sync runs, conversations, feedback, and usage.

Supabase Auth

Magic-link auth with server-side session verification.

Schema-aligned UI

Phase D UI mirrors tenant, source, and analytics tables already present in Supabase.

Magic link auth

Enter the admin app

The Phase D control plane uses Supabase Auth as the canonical session layer. Email auth is the only MVP entrypoint.

For SSR magic links, the Supabase email template should resolve to /auth/confirm?token_hash=...&type=email so the app can verify the token and set cookies on the server.

Environment setup required

The web app only enables auth and dashboard queries once Supabase credentials are present.

Add NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY to enable login.

Add SUPABASE_SERVICE_ROLE_KEY to enable server-side PDF uploads into the private bucket.