feat: Wabenhain Honig-Shop Anwendung

Vollstaendige Next.js/Prisma-E-Commerce-Anwendung fuer eine Imkerei:
Shop, Warenkorb, Stripe-Checkout, Kundenkonto mit 2FA, Admin-Bereich
(Produkte, Ernten, Chargen, Bestellungen, Gutscheine, admin-editierbare
Website-Inhalte), i18n (DE/EN), Rate-Limiting/CSP/Audit-Log-Haertung,
PostgreSQL- und MySQL-Unterstuetzung ueber austauschbare Prisma-
Treiber-Adapter, Unit-/Komponenten-/E2E-Tests.
This commit is contained in:
Nick Szaunig committed 2026-08-17 14:30:28 +02:00
1 parent 5c76fcc266
commit c7927f2883
240 files changed
+26096 -137

No files matched your search

@@ -0,0 +1,47 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { Container, SectionHeading, Button } from "@/components/ui";
import { getCurrentCustomer, getTwoFactorBackupCodesDisplay } from "@/lib/auth";
import { dismissBackupCodesAction } from "../../actions";
import { getLocale } from "@/i18n/locale";
import { getDictionary } from "@/i18n/get-dictionary";
export const metadata: Metadata = { title: "Backup-Codes" };
export const dynamic = "force-dynamic";
export default async function ZweiFaktorBackupCodesPage() {
const t = getDictionary(await getLocale());
const customer = await getCurrentCustomer();
if (!customer) redirect("/konto");
const codes = await getTwoFactorBackupCodesDisplay();
if (!codes) redirect("/konto/zwei-faktor");
return (
<div className="py-20">
<Container className="max-w-md">
<SectionHeading
eyebrow={t.twoFactorBackupCodesPage.eyebrow}
title={t.twoFactorBackupCodesPage.title}
subtitle={t.twoFactorBackupCodesPage.subtitle}
/>
<ul className="mt-8 border border-ink/10 divide-y divide-ink/10 font-mono text-sm">
{codes.map((code) => (
<li key={code} className="px-4 py-3">
{code}
</li>
))}
</ul>
<p className="mt-6 text-sm text-red-700 bg-red-50 border border-red-200 px-4 py-3">
{t.twoFactorBackupCodesPage.warning}
</p>
<form action={dismissBackupCodesAction} className="mt-8">
<Button type="submit">{t.twoFactorBackupCodesPage.done}</Button>
</form>
</Container>
</div>
);
}