Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ import './index.css'; // Tailwind build with brand colors for landing page
// Lazy-load pages so none blocks the others
const LandingPage = lazy(() => import('./pages/LandingPage'));
const SetupGuide = lazy(() => import('./pages/SetupGuide'));
const Privacy = lazy(() => import('./pages/Privacy'));
const Terms = lazy(() => import('./pages/Terms'));
const SecurityOverview = lazy(() => import('./pages/SecurityOverview'));
const DataProcessing = lazy(() => import('./pages/DataProcessing'));

// Policy pages. Longest-prefix-free: none of these is a prefix of another, and
// none collides with the landing page's #security anchor (that's a hash, not a
// path). Kept in one table so adding a page is a single line.
const LEGAL_ROUTES: Array<[string, React.LazyExoticComponent<() => JSX.Element>]> = [
['/privacy', Privacy],
['/terms', Terms],
['/security', SecurityOverview],
['/dpa', DataProcessing],
];
// Note: the file is named MainApp.tsx (not App.tsx) on purpose — on Windows
// the dev server resolved the URL /app to App.tsx case-insensitively and
// served raw source instead of the SPA.
Expand Down Expand Up @@ -37,6 +51,17 @@ export default function Router() {
);
}

// Policy pages
const legal = LEGAL_ROUTES.find(([prefix]) => path.startsWith(prefix));
if (legal) {
const Page = legal[1];
return (
<Suspense fallback={<LoadingScreen />}>
<Page />
</Suspense>
);
}

// Everything else shows the landing page
return (
<Suspense fallback={<LoadingScreen />}>
Expand Down
60 changes: 41 additions & 19 deletions src/components/landing/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,45 @@
import { DEMO_BOOKING_URL, PRIVACY_CONTACT_EMAIL } from '../../siteConfig';

// Every link here goes somewhere real. The previous version had eleven
// href="#" stubs — including all four legal links — which is the worst place
// to disappoint an institutional buyer, since Privacy and Terms are the first
// things their procurement team clicks. Sections we genuinely do not have
// (blog, careers, status page) were removed rather than left as dead ends.
const columns = [
{
title: 'Product',
links: [
{ label: 'Features', href: '/#features' },
{ label: 'How It Works', href: '/#how-it-works' },
{ label: 'Pricing', href: '/#pricing' },
{ label: 'Security', href: '/#security' },
{ label: 'Setup Guide', href: '/setup' },
],
},
{
title: 'Solutions',
links: [
{ label: 'University Dining', href: '#features' },
{ label: 'Hotels', href: '#features' },
{ label: 'Restaurants', href: '#features' },
{ label: 'Hospitals', href: '#features' },
{ label: 'University Dining', href: '/#features' },
{ label: 'Hotels', href: '/#features' },
{ label: 'Restaurants', href: '/#features' },
{ label: 'Hospitals', href: '/#features' },
],
},
{
title: 'Company',
title: 'Get started',
links: [
{ label: 'About', href: '#' },
{ label: 'Blog', href: '#' },
{ label: 'Careers', href: '#' },
{ label: 'Contact', href: '#' },
{ label: 'Start free trial', href: '/app' },
{ label: 'Book a demo', href: DEMO_BOOKING_URL },
{ label: 'Setup guide', href: '/setup' },
{ label: 'Contact us', href: `mailto:${PRIVACY_CONTACT_EMAIL}` },
],
},
{
title: 'Legal',
links: [
{ label: 'Privacy Policy', href: '#' },
{ label: 'Terms of Service', href: '#' },
{ label: 'Security Overview', href: '#' },
{ label: 'Data Processing', href: '#' },
{ label: 'Privacy Policy', href: '/privacy' },
{ label: 'Terms of Service', href: '/terms' },
{ label: 'Security Overview', href: '/security' },
{ label: 'Data Processing', href: '/dpa' },
],
},
];
Expand All @@ -45,7 +51,7 @@ export default function Footer() {
<div className="grid grid-cols-2 md:grid-cols-5 gap-10 lg:gap-16">
{/* Brand column */}
<div className="col-span-2 md:col-span-1">
<a href="#" className="flex items-center gap-2 mb-4">
<a href="/" aria-label="ChefCode.ai home" className="flex items-center gap-2 mb-4 rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600">
<img src="/logo-mark.svg" alt="ChefCode" className="w-6 h-6" />
<span className="text-lg font-bold text-brand-900 tracking-tight">
ChefCode<span className="text-brand-600">.ai</span>
Expand All @@ -63,7 +69,13 @@ export default function Footer() {
<ul className="space-y-2.5">
{col.links.map((link, j) => (
<li key={j}>
<a href={link.href} className="text-sm text-brand-800/60 hover:text-brand-700 transition-colors">{link.label}</a>
<a
href={link.href}
{...(link.href.startsWith('http') ? { target: '_blank', rel: 'noopener noreferrer' } : {})}
className="text-sm text-brand-800/75 hover:text-brand-700 transition-colors rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600"
>
{link.label}
</a>
</li>
))}
</ul>
Expand All @@ -74,9 +86,19 @@ export default function Footer() {
<div className="mt-14 pt-8 border-t border-cream-200 flex flex-col sm:flex-row items-center justify-between gap-4">
<p className="text-xs text-brand-800/50">&copy; {new Date().getFullYear()} ChefCode.ai. All rights reserved.</p>
<div className="flex items-center gap-6">
<a href="#" className="text-xs text-brand-800/50 hover:text-brand-700 transition-colors">Privacy</a>
<a href="#" className="text-xs text-brand-800/50 hover:text-brand-700 transition-colors">Terms</a>
<a href="#" className="text-xs text-brand-800/50 hover:text-brand-700 transition-colors">Status</a>
{[
{ label: 'Privacy', href: '/privacy' },
{ label: 'Terms', href: '/terms' },
{ label: 'Security', href: '/security' },
].map((l) => (
<a
key={l.href}
href={l.href}
className="text-xs text-brand-800/70 hover:text-brand-700 transition-colors rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600"
>
{l.label}
</a>
))}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/landing/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Navbar() {
>
<div className="max-w-7xl mx-auto flex items-center justify-between px-5 sm:px-8 h-[72px]">
{/* ── Logo ── */}
<a href="#" className="flex items-center gap-2.5">
<a href="/" aria-label="ChefCode.ai home" className="flex items-center gap-2.5 rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600">
<img src="/logo-mark.svg" alt="ChefCode" className="w-7 h-7" />
<span className="text-xl font-bold tracking-tight text-brand-900">
ChefCode<span className="text-brand-600">.ai</span>
Expand Down
19 changes: 15 additions & 4 deletions src/components/landing/Security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ import { useReveal } from '../../hooks/useReveal';
const badges = [
{ icon: Lock, label: '256-bit encryption', desc: 'TLS 1.3 in transit, AES-256 at rest' },
{ icon: Eye, label: 'Row-level isolation', desc: 'Database enforced — not just application logic' },
{ icon: Server, label: 'SOC 2 infrastructure', desc: 'Hosted on AWS via Supabase, SOC 2 Type II' },
{ icon: FileCheck, label: 'Complete audit trail', desc: 'Every action logged with user, timestamp, old/new values' },
{ icon: Server, label: 'SOC 2 infrastructure', desc: 'Runs on Supabase/AWS, SOC 2 Type II certified' },
// Was "Complete audit trail — every action logged with user, timestamp,
// old/new values". The audit_logs table exists but nothing writes to it, so
// that claim would fail the first question of a security review. This states
// what the schema actually guarantees today: processed_by plus created_at /
// updated_at on every record.
{ icon: FileCheck, label: 'Traceable records', desc: 'Every invoice carries who processed it and when it changed' },
{ icon: KeyRound, label: 'Role-based access', desc: '4 permission levels — Owner, Manager, Chef, Viewer' },
{ icon: ShieldCheck, label: 'FERPA safe', desc: 'Zero student PII. Invoice data only.' },
];
Expand Down Expand Up @@ -52,9 +57,15 @@ export default function Security() {
</div>

<div className="mt-12 text-center">
<a href="#" className="inline-flex items-center gap-2 text-sm font-medium text-brand-300 hover:text-brand-200 transition-colors">
{/* Was href="#" promising a PDF that did not exist. It now opens the
real Security Overview, which carries a "Save as PDF" button for
reviewers who need a file to attach. */}
<a
href="/security"
className="inline-flex items-center gap-2 text-sm font-medium text-brand-300 hover:text-brand-200 transition-colors rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-300"
>
<FileCheck className="w-4 h-4" />
Download our Security Overview (PDF)
Read our Security Overview
</a>
</div>
</div>
Expand Down
169 changes: 169 additions & 0 deletions src/components/legal/LegalLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
import { ReactNode } from 'react';
import { Printer } from 'lucide-react';
import Navbar from '../landing/Navbar';
import Footer from '../landing/Footer';

// Shared chrome for the policy pages (/privacy, /terms, /security, /dpa).
// One place for the measure, the type scale and the "last updated" stamp, so
// the four documents stay visually identical and nobody has to remember the
// classes. Prose styling is hand-rolled — @tailwindcss/typography isn't a
// dependency here and these pages aren't worth adding one for.

interface Props {
eyebrow: string;
title: string;
updated: string;
summary: string;
children: ReactNode;
}

export default function LegalLayout({ eyebrow, title, updated, summary, children }: Props) {
return (
<>
<div className="print:hidden">
<Navbar />
</div>

<main className="bg-cream min-h-screen">
<article className="max-w-3xl mx-auto px-5 sm:px-8 pt-32 pb-24 print:pt-8">
<p className="text-sm font-semibold text-brand-600 uppercase tracking-widest mb-3">
{eyebrow}
</p>

{/* Tracking tightens as the type grows — see the display rule in the
type scale; body copy below stays at normal tracking. */}
<h1 className="text-4xl sm:text-5xl font-extrabold text-brand-900 tracking-tight leading-[1.05]">
{title}
</h1>

<p className="mt-5 text-lg text-brand-800/75 leading-relaxed">{summary}</p>

<div className="mt-6 flex flex-wrap items-center gap-4 pb-8 border-b border-cream-300">
<p className="text-sm text-brand-800/60">
Last updated <time dateTime={updated}>{formatDate(updated)}</time>
</p>
<button
onClick={() => window.print()}
className="print:hidden inline-flex items-center gap-1.5 text-sm font-medium text-brand-600 hover:text-brand-700 active:scale-[0.97] transition-all focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600 rounded"
>
<Printer className="w-4 h-4" />
Save as PDF
</button>
</div>

<div className="legal-prose mt-10">{children}</div>
</article>
</main>

<div className="print:hidden">
<Footer />
</div>
</>
);
}

function formatDate(iso: string) {
return new Date(iso + 'T00:00:00').toLocaleDateString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric',
});
}

/** Section heading — gives each clause a stable anchor to link people to. */
export function H2({ id, children }: { id: string; children: ReactNode }) {
return (
<h2
id={id}
className="scroll-mt-28 text-xl sm:text-2xl font-bold text-brand-900 tracking-tight mt-12 mb-3 first:mt-0"
>
{children}
</h2>
);
}

export function H3({ children }: { children: ReactNode }) {
return <h3 className="text-base font-bold text-brand-900 mt-7 mb-2">{children}</h3>;
}

export function P({ children }: { children: ReactNode }) {
return <p className="text-[15px] text-brand-800/80 leading-[1.75] mb-4">{children}</p>;
}

export function UL({ children }: { children: ReactNode }) {
return <ul className="mb-5 space-y-2">{children}</ul>;
}

export function LI({ children }: { children: ReactNode }) {
return (
<li className="relative pl-5 text-[15px] text-brand-800/80 leading-[1.75] before:absolute before:left-0 before:top-[0.7em] before:w-1.5 before:h-1.5 before:rounded-full before:bg-brand-400">
{children}
</li>
);
}

/** Pulled-out statement for the things a reviewer is actually scanning for. */
export function Callout({ children }: { children: ReactNode }) {
return (
<div className="my-6 rounded-xl border border-brand-200 bg-brand-50 px-5 py-4">
<p className="text-[15px] text-brand-900 leading-[1.7]">{children}</p>
</div>
);
}

export function Table({ head, rows }: { head: string[]; rows: ReactNode[][] }) {
return (
<div className="my-6 overflow-x-auto rounded-xl border border-cream-300">
<table className="w-full text-left border-collapse min-w-[520px]">
<thead>
<tr className="bg-cream-100">
{head.map((h) => (
<th
key={h}
className="px-4 py-3 text-xs font-bold uppercase tracking-wider text-brand-800/70 border-b border-cream-300"
>
{h}
</th>
))}
</tr>
</thead>
<tbody>
{rows.map((r, i) => (
<tr key={i} className="odd:bg-white even:bg-cream-50">
{r.map((cell, j) => (
<td
key={j}
className="px-4 py-3 text-sm text-brand-800/80 align-top border-b border-cream-200 last:border-r-0"
>
{cell}
</td>
))}
</tr>
))}
</tbody>
</table>
</div>
);
}

/**
* The contact block every policy page ends with. Shows the address in full
* rather than hiding it behind a button — a reviewer copying it into a vendor
* record needs to see it, and a mailto: that opens an empty tab helps nobody.
*/
export function ContactBlock({ email, subject }: { email: string; subject?: string }) {
const href = `mailto:${email}${subject ? `?subject=${encodeURIComponent(subject)}` : ''}`;
return (
<div className="mt-4 rounded-xl border border-cream-300 bg-white px-5 py-4">
<a
href={href}
className="text-base font-semibold text-brand-700 hover:text-brand-800 underline underline-offset-2 rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600"
>
{email}
</a>
<p className="mt-1 text-sm text-brand-800/70">
A person reads this, not a ticket queue. We aim to reply within two business days.
</p>
</div>
);
}
17 changes: 17 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,20 @@ body {
::-webkit-scrollbar-track { background: #ece4c9; }
::-webkit-scrollbar-thumb { background: #c7bb91; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #157559; }

/* ── Policy pages: printing / "Save as PDF" ──────── */
/* Reviewers attach these to a vendor file, so the printed copy drops the site
chrome, prints black-on-white, and shows link targets inline. */
@media print {
html { scroll-behavior: auto; }
body { background: #fff !important; }
.legal-prose, .legal-prose * { color: #000 !important; }
.legal-prose a[href^="http"]::after,
.legal-prose a[href^="/"]::after {
content: " (" attr(href) ")";
font-size: 0.85em;
color: #555 !important;
}
.legal-prose h2, .legal-prose h3 { break-after: avoid; }
.legal-prose table, .legal-prose li { break-inside: avoid; }
}
Loading
Loading