From 35bef9a4e7dd461c82e3277c3e3d513165ef23da Mon Sep 17 00:00:00 2001 From: fadesany Date: Wed, 12 Aug 2026 20:57:26 +0100 Subject: [PATCH 01/10] refactor(web): restructure routing for a public landing page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a public marketing landing page at "/" in front of the wallet-connect treasury dashboard. This commit is the routing scaffold only — no landing content or design tokens yet; sections follow in later commits. Routing decision: multiple root layouts via route groups, not a single shared root layout. The landing page needs a fundamentally different shell from the dashboard — light neo-brutalist theme, its own display/mono fonts, its own nav, and no wallet Providers — while the dashboard keeps its dark theme, SiteHeader, and React Query + wallet Providers. Two route groups, each with its own root / layout, isolate the two shells cleanly; a single shared root layout would force conditional chrome and a shared theme. (The PRD left this open pending the actual repo layout.) - Delete the top-level app/layout.tsx root layout. - (app)/ group: the dashboard root layout (moved from the old root layout) plus every dashboard route. The org directory moves from "/" to "/app"; /new and /org/[treasury]/... keep their exact URLs so direct treasury links still resolve without detouring through the landing page. - (marketing)/ group: root layout + landing page owning "/". - Moved routes switch to the @/ import alias (depth-independent), and the in-app "home" links (header wordmark, "All organizations" back links) now point at /app. globals.css stays at app/globals.css, imported by both root layouts. No dashboard behavior or visual change — it simply lives at /app now. typecheck + next build pass; routes: / (static landing), /app, /new, /org/[treasury], /org/[treasury]/requests/[requestId]. --- apps/web/app/{ => (app)/app}/page.tsx | 2 +- apps/web/app/{ => (app)}/layout.tsx | 8 +++---- apps/web/app/{ => (app)}/new/page.tsx | 4 ++-- .../app/{ => (app)}/org/[treasury]/page.tsx | 2 +- .../[treasury]/requests/[requestId]/page.tsx | 2 +- apps/web/app/(marketing)/layout.tsx | 22 +++++++++++++++++++ apps/web/app/(marketing)/page.tsx | 15 +++++++++++++ apps/web/components/site-header.tsx | 2 +- apps/web/components/treasury-dashboard.tsx | 2 +- 9 files changed, 48 insertions(+), 11 deletions(-) rename apps/web/app/{ => (app)/app}/page.tsx (83%) rename apps/web/app/{ => (app)}/layout.tsx (84%) rename apps/web/app/{ => (app)}/new/page.tsx (93%) rename apps/web/app/{ => (app)}/org/[treasury]/page.tsx (87%) rename apps/web/app/{ => (app)}/org/[treasury]/requests/[requestId]/page.tsx (89%) create mode 100644 apps/web/app/(marketing)/layout.tsx create mode 100644 apps/web/app/(marketing)/page.tsx diff --git a/apps/web/app/page.tsx b/apps/web/app/(app)/app/page.tsx similarity index 83% rename from apps/web/app/page.tsx rename to apps/web/app/(app)/app/page.tsx index 608e1b1..aadd723 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/(app)/app/page.tsx @@ -1,4 +1,4 @@ -import { OrgDirectory } from '../components/org-directory'; +import { OrgDirectory } from '@/components/org-directory'; /** * Landing page: the organization directory. Charter is org-centric — the first diff --git a/apps/web/app/layout.tsx b/apps/web/app/(app)/layout.tsx similarity index 84% rename from apps/web/app/layout.tsx rename to apps/web/app/(app)/layout.tsx index caca1c5..8c86e4a 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/(app)/layout.tsx @@ -2,9 +2,9 @@ import type { Metadata } from 'next'; import { Inter, JetBrains_Mono } from 'next/font/google'; import type { ReactNode } from 'react'; -import { SiteHeader } from '../components/site-header'; -import { Providers } from '../components/providers'; -import './globals.css'; +import { SiteHeader } from '@/components/site-header'; +import { Providers } from '@/components/providers'; +import '../globals.css'; // One sans family, one mono. The mono carries addresses, hashes, and amounts — // anything where character alignment aids scanning; the sans carries everything @@ -27,7 +27,7 @@ export const metadata: Metadata = { 'Charter is a treasury operations layer for Stellar-based organizations: budget categories, threshold approvals, and on-chain disbursements.', }; -export default function RootLayout({ children }: { children: ReactNode }) { +export default function AppLayout({ children }: { children: ReactNode }) { return ( diff --git a/apps/web/app/new/page.tsx b/apps/web/app/(app)/new/page.tsx similarity index 93% rename from apps/web/app/new/page.tsx rename to apps/web/app/(app)/new/page.tsx index 4a18073..7dbf5df 100644 --- a/apps/web/app/new/page.tsx +++ b/apps/web/app/(app)/new/page.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; -import { NewOrgForm } from '../../components/new-org-form'; +import { NewOrgForm } from '@/components/new-org-form'; /** * New organization route. Deploys a per-org treasury via the factory contract. @@ -11,7 +11,7 @@ export default function NewOrgPage() {