feat: isolate all four portals with route groups + polished design system

Fix blank /org/login (and /admin/login): the guarded portal layout was
wrapping its own login route, rendering null when unauthenticated. Move
each portal's authed pages into a (authed)/(chapter) route group so login
pages live outside the guard.

Structure:
- app/(chapter)/* — chapter admin pages + guarded layout (was root-level)
- app/org/(authed)/* — org pages + guarded layout; /org/login now free
- app/admin/(authed)/* — admin pages + guarded layout; /admin/login free
- Root layout slimmed to providers only (no shared sidebar)
- Convert moved files' relative imports to @/app alias

Design system:
- PortalShell: shared sidebar shell (brand mark, themed active nav with
  accent bar, avatar dropdown user menu, loading skeletons)
- portal-theme.ts: per-portal theme tokens (violet/slate/blue/emerald)
- PortalLoginShell redesigned: two-column with gradient branding panel,
  dotted pattern, value-prop highlights, built-in back link
- New shadcn components: Avatar, DropdownMenu, Skeleton
- Move shared DraftCard to _components/draft-card.tsx (used by 2 portals)
- Portal selector: remove Super Admin card, icon tiles, hover lift
- All 4 login pages use react-hook-form + Zod + themed shell
- Member nav restored to full 11-section list with icons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 18:20:06 +05:30
parent d7b5988858
commit 205418fc4e
50 changed files with 619 additions and 360 deletions
+2 -6
View File
@@ -4,7 +4,6 @@ import { ReactQueryProvider } from './_lib/query-client';
import { AuthProvider } from './_lib/auth-context';
import { SuperAdminProvider } from './_lib/super-admin-context';
import { OrgAdminProvider } from './_lib/org-admin-context';
import { Sidebar } from './_lib/sidebar';
export const metadata: Metadata = {
title: 'TOWER',
@@ -14,14 +13,11 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body className="flex min-h-screen bg-background text-foreground antialiased">
<body className="min-h-screen bg-background text-foreground antialiased">
<ReactQueryProvider>
<AuthProvider>
<SuperAdminProvider>
<OrgAdminProvider>
<Sidebar />
<main className="flex-1 overflow-auto p-6">{children}</main>
</OrgAdminProvider>
<OrgAdminProvider>{children}</OrgAdminProvider>
</SuperAdminProvider>
</AuthProvider>
</ReactQueryProvider>