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>
This commit is contained in:
2026-11-25 08:41:11 +02:00
co-authored by Claude Opus 5.5
parent a3a158faa8
commit 36ceb358b8
45 changed files with 1617 additions and 12 deletions
+16
View File
@@ -0,0 +1,16 @@
/** What the public site shows right now, from the backend (src/site/status.ts there). */
export type SiteStatus =
| { mode: "coming-soon" }
| { mode: "published"; version: number; publishedAt: string; template: string | null };
const api = (process.env.WEBSITE_API_URL || "http://127.0.0.1:5300").replace(/\/+$/, "");
export async function loadStatus(): Promise<SiteStatus> {
try {
const res = await fetch(`${api}/api/v1/site/status`, { next: { revalidate: 30 } });
if (res.ok) return (await res.json()) as SiteStatus;
} catch {
// The backend is starting or down: Coming soon is the safe thing to show.
}
return { mode: "coming-soon" };
}