From 8d720278cbadd78b721a22d386407af7d92fa0f7 Mon Sep 17 00:00:00 2001 From: maaz519 Date: Sat, 20 Jun 2026 17:28:38 +0530 Subject: [PATCH] feat: portal selector home page + remove self-serve signup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the home page with a portal selector showing three access paths: - Organisation Portal → /org/login - Chapter Portal → /login - Member Portal → /member-login Remove /signup and its BFF route — tenants are now only created by org owners through the org portal or assigned by super admins. Self-serve community creation is no longer supported. Update sidebar to bypass auth guard for / (exact match) without accidentally matching all paths via startsWith. Co-Authored-By: Claude Sonnet 4.6 --- apps/web/app/_lib/sidebar.tsx | 5 +- apps/web/app/api/auth/signup/route.ts | 19 ---- apps/web/app/page.tsx | 74 ++++++++++---- apps/web/app/signup/SignupForm.tsx | 142 -------------------------- apps/web/app/signup/page.tsx | 24 ----- 5 files changed, 59 insertions(+), 205 deletions(-) delete mode 100644 apps/web/app/api/auth/signup/route.ts delete mode 100644 apps/web/app/signup/SignupForm.tsx delete mode 100644 apps/web/app/signup/page.tsx diff --git a/apps/web/app/_lib/sidebar.tsx b/apps/web/app/_lib/sidebar.tsx index c941c00..16bc5de 100644 --- a/apps/web/app/_lib/sidebar.tsx +++ b/apps/web/app/_lib/sidebar.tsx @@ -22,7 +22,7 @@ const SUPER_ADMIN_LINKS = [ { href: '/admin/drafts', label: 'AI Drafts' }, ]; -const PUBLIC_PATHS = ['/login', '/signup', '/onboard', '/member-login']; +const PUBLIC_PATHS = ['/login', '/onboard', '/member-login']; const ADMIN_PATHS = ['/admin']; const MEMBER_PATHS = ['/my']; const ORG_PATHS = ['/org']; @@ -43,6 +43,7 @@ export function Sidebar() { useEffect(() => { if (loading) return; + if (pathname === '/') return; if (PUBLIC_PATHS.some((p) => pathname.startsWith(p))) return; if (ADMIN_PATHS.some((p) => pathname.startsWith(p))) return; if (MEMBER_PATHS.some((p) => pathname.startsWith(p))) return; @@ -52,7 +53,7 @@ export function Sidebar() { } }, [loading, admin, pathname, router]); - if (PUBLIC_PATHS.some((p) => pathname.startsWith(p))) { + if (pathname === '/' || PUBLIC_PATHS.some((p) => pathname.startsWith(p))) { return (