Skip to content
Merged
2 changes: 1 addition & 1 deletion apps/web/app/page.tsx → apps/web/app/(app)/app/page.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/layout.tsx → apps/web/app/(app)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 (
<html lang="en" className={`${sans.variable} ${mono.variable}`}>
<body className="min-h-screen">
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/new/page.tsx → apps/web/app/(app)/new/page.tsx
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -11,7 +11,7 @@ export default function NewOrgPage() {
<div className="mx-auto max-w-xl">
<nav className="mb-6">
<Link
href="/"
href="/app"
className="inline-flex items-center gap-1.5 text-sm text-ink-muted transition-colors duration-150 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent rounded"
>
<svg viewBox="0 0 16 16" className="h-3.5 w-3.5" fill="none" aria-hidden>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TreasuryDashboard } from '../../../components/treasury-dashboard';
import { TreasuryDashboard } from '@/components/treasury-dashboard';

/**
* Treasury dashboard route: /org/{treasuryAddress}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RequestDetail } from '../../../../../components/request-detail';
import { RequestDetail } from '@/components/request-detail';

/**
* Request detail route: /org/{treasuryAddress}/requests/{requestId}.
Expand Down
55 changes: 55 additions & 0 deletions apps/web/app/(marketing)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import type { Metadata } from 'next';
import type { ReactNode } from 'react';
import { IBM_Plex_Mono, Inter, Space_Grotesk } from 'next/font/google';

import '../globals.css';

// Display headlines, body copy, and mono figures for the landing page. Each
// exposes a CSS variable that the Tailwind config reads (font-display / -body /
// -mono). --font-mono is deliberately reused: the marketing tree repoints it at
// IBM Plex Mono, while the dashboard root keeps JetBrains Mono under the same
// token.
const display = Space_Grotesk({
subsets: ['latin'],
weight: ['700'],
variable: '--font-display',
display: 'swap',
});

const body = Inter({
subsets: ['latin'],
weight: ['400', '500'],
variable: '--font-body',
display: 'swap',
});

const mono = IBM_Plex_Mono({
subsets: ['latin'],
weight: ['500'],
variable: '--font-mono',
display: 'swap',
});

export const metadata: Metadata = {
title: 'Charter — On-chain treasury policy for Stellar organizations',
description:
'Charter holds organization funds under a Soroban policy contract: budget categories, spend caps, and threshold approvals enforced on-chain at the moment money moves.',
};

// Root layout for the public marketing group. Deliberately independent of the
// dashboard shell in (app)/ — its own <html>/<body>, its own light theme and
// fonts, and no wallet Providers. The marketing-root class (see globals.css)
// carries the light neo-brutalist theme; bg-paper on the body overrides the
// shared dark canvas default.
export default function MarketingLayout({ children }: { children: ReactNode }) {
return (
<html
lang="en"
className={`marketing-root ${display.variable} ${body.variable} ${mono.variable}`}
>
<body className="min-h-screen bg-paper font-body text-ink antialiased">
{children}
</body>
</html>
);
}
43 changes: 43 additions & 0 deletions apps/web/app/(marketing)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* Public marketing landing page at "/".
*
* Composes the landing sections in reading order. Each section is a
* self-contained component under components/marketing/. The dashboard lives at
* "/app" (see the (app) route group); this group owns "/" and its own light
* neo-brutalist theme.
*/
import { Contributors } from '../../components/marketing/contributors';
import { Hero } from '../../components/marketing/hero';
import { HowItWorks } from '../../components/marketing/how-it-works';
import { Problem } from '../../components/marketing/problem';
import { Proof } from '../../components/marketing/proof';
import { SiteFooter } from '../../components/marketing/site-footer';
import { SiteNav } from '../../components/marketing/site-nav';

export default function LandingPage() {
return (
<>
{/*
* Skip link — the first focusable element, hidden until focused. Lets
* keyboard users jump past the sticky nav straight to the content. It
* reveals as a gold pill top-left; z-modal clears the sticky header
* (z-sticky) since it renders earlier in the DOM.
*/}
<a
href="#main-content"
className="sr-only rounded-card border-2 border-ink bg-ledger-gold px-4 py-2 text-[15px] font-medium text-ink shadow-brutal focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-modal"
>
Skip to content
</a>
<SiteNav />
<main id="main-content">
<Hero />
<Problem />
<HowItWorks />
<Proof />
<Contributors />
</main>
<SiteFooter />
</>
);
}
12 changes: 12 additions & 0 deletions apps/web/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ body {
@apply bg-canvas text-ink antialiased;
}

/* The marketing (landing) group opts into the light neo-brutalist theme. It
owns its own <html>/<body> via the (marketing) route group, so scoping the
override to this class leaves the dashboard's dark defaults untouched.
--color-ink repoints the ink token to #14171F (dark-on-paper); color-scheme
flips UA controls and scrollbars to light. The --font-* variables are set on
the same element by next/font in the marketing layout. The bg-paper utility
on the marketing <body> overrides the bg-canvas above (class beats element). */
.marketing-root {
color-scheme: light;
--color-ink: 20 23 31;
}

/* Mono carries addresses, hashes, and amounts. Tabular figures keep columns of
numbers vertically aligned; the slashed zero disambiguates 0 from O in the
on-chain data these fonts render. */
Expand Down
83 changes: 83 additions & 0 deletions apps/web/components/marketing/contributors.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* For-contributors section — sits directly above the footer.
*
* Charter's application layer and its Soroban contracts live in separate repos
* (Ch-rter/app and Ch-rter/contract, both verified against the README and
* SECURITY.md). The cards link to each repo, to open issues filtered to the
* real `good first issue` label, and to the README's Contributing section.
* Every destination is off-site, so each card carries the ↗ convention.
*/
import { CONTRIBUTING_URL, GOOD_FIRST_ISSUES_URL, MAINTAINER_HANDLE, MAINTAINER_URL, REPO_APP_URL, REPO_CONTRACT_URL } from './links';

const CARDS = [
{
title: 'Application layer',
meta: 'github.com/Ch-rter/app',
body: 'SDK, web dashboard, and event indexer — this repository.',
href: REPO_APP_URL,
},
{
title: 'Soroban contracts',
meta: 'github.com/Ch-rter/contract',
body: 'The on-chain policy contracts every treasury runs on.',
href: REPO_CONTRACT_URL,
},
{
title: 'Good first issues',
meta: 'Issues · good first issue',
body: 'Start here — open issues scoped for a first contribution.',
href: GOOD_FIRST_ISSUES_URL,
},
{
title: 'Contributing guide',
meta: 'README · Contributing',
body: 'Conventions for the two data paths, branch names, and PRs.',
href: CONTRIBUTING_URL,
},
] as const;

export function Contributors() {
return (
<section className="mx-auto max-w-6xl px-6 py-16 sm:py-20">
<h2 className="max-w-3xl font-display text-[28px] font-bold leading-tight tracking-[-0.01em]">
Built in the open
</h2>
<p className="mt-4 max-w-2xl text-[20px] leading-snug text-ink/70">
Charter is developed in the open, maintained by{' '}
<a
href={MAINTAINER_URL}
target="_blank"
rel="noopener noreferrer"
className="rounded-sm font-medium text-ink underline underline-offset-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink focus-visible:ring-offset-2 focus-visible:ring-offset-paper"
>
@{MAINTAINER_HANDLE}
</a>
. The application layer and the Soroban contracts live in separate repos.
</p>

<div className="mt-8 grid gap-4 sm:grid-cols-2">
{CARDS.map((card) => (
<a
key={card.title}
href={card.href}
target="_blank"
rel="noopener noreferrer"
className="group rounded-card border-2 border-ink bg-paper-raised p-5 shadow-brutal transition-[transform,box-shadow] duration-150 hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-brutal-pressed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink focus-visible:ring-offset-2 focus-visible:ring-offset-paper motion-reduce:transition-none"
>
<div className="flex items-center justify-between gap-3">
<h3 className="font-display text-[20px] font-bold leading-snug tracking-[-0.01em]">
{card.title}
</h3>
<span aria-hidden className="text-[18px] text-ink/70">
↗
</span>
</div>
<p className="mt-1 font-mono text-[13px] text-ink/50">{card.meta}</p>
<p className="mt-3 text-[16px] leading-snug text-ink/70">{card.body}</p>
<span className="sr-only"> (opens in a new tab)</span>
</a>
))}
</div>
</section>
);
}
89 changes: 89 additions & 0 deletions apps/web/components/marketing/cta.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/**
* Shared link primitives for the landing page's neo-brutalist surface.
*
* CtaButton renders the bordered, offset-shadow button in two fills (primary =
* ledger-gold, secondary = paper-raised) and two sizes; hover collapses the 4px
* shadow toward the surface. Internal targets use next/link; external ones open
* in a new tab with a trailing ↗ and a screen-reader hint. ExternalLink is the
* text-link counterpart: underline-on-hover with the same ↗ convention.
*
* No client state here — these render on the server.
*/
import Link from 'next/link';
import type { ReactNode } from 'react';

import { cn } from '../../lib/format';

const BASE =
'inline-flex items-center justify-center gap-2 rounded-card border-2 border-ink font-medium leading-none shadow-brutal transition-[transform,box-shadow] duration-150 hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-brutal-pressed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink focus-visible:ring-offset-2 focus-visible:ring-offset-paper motion-reduce:transition-none';

const VARIANT = {
primary: 'bg-ledger-gold text-ink',
secondary: 'bg-paper-raised text-ink',
} as const;

const SIZE = {
md: 'px-5 py-3 text-[16px]',
sm: 'px-4 py-2.5 text-[15px]',
} as const;

export function CtaButton({
href,
variant = 'primary',
size = 'md',
external = false,
className,
children,
}: {
href: string;
variant?: keyof typeof VARIANT;
size?: keyof typeof SIZE;
/** Open in a new tab with a ↗ affordance. Use for off-site destinations. */
external?: boolean;
className?: string;
children: ReactNode;
}) {
const classes = cn(BASE, VARIANT[variant], SIZE[size], className);

if (external) {
return (
<a href={href} target="_blank" rel="noopener noreferrer" className={classes}>
{children}
<span aria-hidden>↗</span>
<span className="sr-only"> (opens in a new tab)</span>
</a>
);
}

return (
<Link href={href} className={classes}>
{children}
</Link>
);
}

export function ExternalLink({
href,
className,
children,
}: {
href: string;
className?: string;
children: ReactNode;
}) {
return (
<a
href={href}
target="_blank"
rel="noopener noreferrer"
className={cn(
'inline-flex items-center gap-0.5 rounded-sm underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink focus-visible:ring-offset-2 focus-visible:ring-offset-paper',
className,
)}
>
{children}
<span aria-hidden>↗</span>
<span className="sr-only"> (opens in a new tab)</span>
</a>
);
}
Loading
Loading