Files
crosscode-platform/apps/website/frontend/src/app/page.tsx
T
joshuaandClaude Opus 5.5 36ceb358b8 feat(website): apps/website skeleton
Backend (Express + Prisma, ES modules, as Accounts): /api/health and
/api/v1/site/status (Coming soon until the first publish), the content
model and its first migration, and the confirmed section variants per
template (WEBSITE-1.0-PLAN §3, decision 16) with the template switch
rules, with tests. Frontend (Next.js 16): Coming soon page, admin
placeholder, robots.txt. env.template.json, PM2 example, CHANGELOG and
WHATS-NEW. Root workspaces and lint updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 08:41:11 +02:00

32 lines
1.3 KiB
TypeScript

import type { Metadata } from "next";
import { loadStatus } from "@/lib/site";
// Rendered per request from the backend's status; the published site is cached once it exists (§1).
export const dynamic = "force-dynamic";
export async function generateMetadata(): Promise<Metadata> {
const status = await loadStatus();
// Coming soon is a real page (HTTP 200) but never indexed (§5, decision 14).
return status.mode === "coming-soon" ? { title: "Coming soon", robots: { index: false, follow: true } } : { title: "Home" };
}
export default async function Home() {
const status = await loadStatus();
if (status.mode === "coming-soon") {
// The full Coming soon page (logo, service times, contact, links to Events) comes with the
// church profile (§5).
return (
<main className="mx-auto flex min-h-screen max-w-xl flex-col items-center justify-center gap-4 px-4 text-center">
<h1 className="text-3xl font-semibold text-brand">Coming soon</h1>
<p className="text-gray-600">Our new website is on its way.</p>
</main>
);
}
return (
<main className="mx-auto max-w-3xl px-4 py-16">
<h1 className="text-3xl font-semibold">Welcome</h1>
<p className="mt-2 text-gray-600">Published version {status.version}. The templates come next (§3).</p>
</main>
);
}