Greenfield-Next.js-15-App-Router-Gerüst (TS strict) mit: - Route-Groups (auth)/(app) inkl. loading/error/not-found je Group; Guard-Slot-Kommentar im (app)/layout.tsx (vom Auth-WS zu füllen). - "Amtlich"/Netzknoten-Designsystem: Tailwind-Tokens (Navy #1B3A5B, Signalrot #E2231A, Anthrazit, Nebelgrau, bereit/Wartung), tabular-nums, Serif-Display/Inter-Sans via CSS-Variablen, Inline-SVG-Logo. - Radix-Basiskomponenten (button/input/label/badge/tabs/dialog/select/ switch/slider); StatusBadge entspricht asset_status. - Kanonisches src/lib/env.ts (Zod, Fail-Fast) mit ALLEN DB-/Auth-/Geo-Slots inkl. AUTH_URL; isHttps-Ableitung. Zentrale i18n-Tabelle de.ts + t(). - Drizzle-Setup: client.ts (Pool-Singleton), leeres schema/index.ts-Barrel (KEIN Migrations-Eigentümer), drizzle.config.ts, .env.example. - next.config.ts: output:standalone, experimental.authInterrupts, Security-Header. Vitest + Fail-Fast-Env-Test (TDD, 5/5 grün). Bewusst KEINE Auth-Logik und KEINE fachlichen Tabellen. Verifikation: typecheck/lint/test grün; npm run build erzeugt .next/standalone/server.js; curl /anmelden -> lang="de" + FlorianNetz. next/font/google durch CSS-Variablen ersetzt (air-gapped-Build). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
22 lines
692 B
TypeScript
22 lines
692 B
TypeScript
import { AppShell } from "@/components/layout/app-shell";
|
|
|
|
// Gated App-Shell.
|
|
//
|
|
// GUARD-SLOT (Default-deny, dreifach — Querschnittsstandard 1):
|
|
// Der Auth-Workstream (Workstream 3) fügt hier als ALLERERSTE Anweisung den
|
|
// serverseitigen Session-Guard ein, z. B.:
|
|
//
|
|
// import { requireSession } from "@/lib/auth/guards";
|
|
// ...
|
|
// await requireSession(); // leitet anonyme Aufrufe auf /anmelden um
|
|
//
|
|
// Lese-Seiten dürfen sich NICHT allein auf die Middleware verlassen.
|
|
export default async function AppLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
// await requireSession(); // <- vom Auth-Workstream zu aktivieren
|
|
return <AppShell>{children}</AppShell>;
|
|
}
|