feat(appshell): integrate @abe-kap/appshell-sdk (strangler, mock fallback)
Wire the AppShell SDK for auth/identity across the CRM, gated behind isShellConfigured() so the existing mock portal + static demo user stay the fallback until the Shell BFF is configured. - providers.tsx: app-wide <AppShellProvider> (auth passed only when Supabase env set) - next.config.ts: transpilePackages + /shell -> BFF rewrite (keeps /api/geo intact) - login: password -> login(), social -> loginWithOAuth(), OAuth return -> completeOAuthLogin() - register: email/password sign-ups call register() on finish - dashboard: AuthGate bounces unauthenticated visitors; topbar shows ACE identity - docs/APPSHELL_INTEGRATION.md, .env.local.example, .npmrc for GitHub Packages
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// Integration helpers for appshell-sdk. NEXT_PUBLIC_* vars are inlined at build
|
||||
// time, so this reflects deploy-time configuration.
|
||||
|
||||
/**
|
||||
* True when the Shell (Supabase → BFF) is configured. When false, the app falls
|
||||
* back to the existing mock portal / static user so the demo keeps working before
|
||||
* the backend is deployed. Gate real-vs-mock auth on this.
|
||||
*/
|
||||
export function isShellConfigured(): boolean {
|
||||
return Boolean(process.env.NEXT_PUBLIC_SUPABASE_URL);
|
||||
}
|
||||
Reference in New Issue
Block a user