Initial commit: ANOUMA website with Payload CMS, WebRTC meetings, and booking system

- Next.js 16 App Router site with the ANOUMA design system
- Payload CMS (PostgreSQL) for offers, events, posts and page content
- WebRTC video-call system with custom signaling server
- SMTP email reminders and booking-request notifications
- Customer accounts, calendar-based availability, and booking workflow
This commit is contained in:
maro
2026-08-25 16:40:51 +02:00
commit 45261a0461
138 changed files with 23263 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import type { Metadata } from "next";
import { getCurrentCustomer } from "@/lib/auth/customer";
import { getCustomerBookings } from "@/lib/booking/queries";
import { PersonalCalendar } from "@/components/booking/PersonalCalendar";
export const metadata: Metadata = { title: "Mein Kalender" };
export default async function KontoKalenderPage() {
const customer = await getCurrentCustomer();
if (!customer) return null;
const bookings = await getCustomerBookings(customer.id);
return (
<div>
<h2 className="font-serif text-xl font-medium text-anouma-plum">Mein Kalender</h2>
<div className="mt-6">
<PersonalCalendar bookings={bookings} />
</div>
</div>
);
}
+46
View File
@@ -0,0 +1,46 @@
import type { ReactNode } from "react";
import Link from "next/link";
import { redirect } from "next/navigation";
import { Container } from "@/components/Section";
import { LogoutButton } from "@/components/auth/LogoutButton";
import { getCurrentCustomer } from "@/lib/auth/customer";
export const dynamic = "force-dynamic";
const navItems = [
{ title: "Übersicht", href: "/konto" },
{ title: "Kalender", href: "/konto/kalender" },
{ title: "Meine Termine", href: "/konto/termine" },
{ title: "Profil", href: "/konto/profil" },
];
export default async function KontoLayout({ children }: { children: ReactNode }) {
const customer = await getCurrentCustomer();
if (!customer) redirect("/login?next=/konto");
return (
<section className="bg-anouma-cream-light py-16">
<Container>
<div className="mb-10">
<p className="text-xs font-medium uppercase tracking-[0.18em] text-anouma-plum/70">Mein Konto</p>
<h1 className="mt-2 font-serif text-3xl font-medium text-anouma-plum">Hallo, {customer.name}</h1>
</div>
<div className="grid gap-10 lg:grid-cols-[220px_1fr]">
<nav aria-label="Konto-Navigation" className="flex gap-2 overflow-x-auto lg:flex-col lg:gap-1">
{navItems.map((item) => (
<Link
key={item.href}
href={item.href}
className="whitespace-nowrap rounded-full px-4 py-2.5 text-sm font-medium text-anouma-plum transition-colors hover:bg-white lg:rounded-2xl"
>
{item.title}
</Link>
))}
<LogoutButton className="whitespace-nowrap rounded-full px-4 py-2.5 text-left text-sm font-medium text-anouma-plum/70 transition-colors hover:bg-white lg:rounded-2xl" />
</nav>
<div className="min-w-0">{children}</div>
</div>
</Container>
</section>
);
}
+71
View File
@@ -0,0 +1,71 @@
import type { Metadata } from "next";
import Link from "next/link";
import { getCurrentCustomer } from "@/lib/auth/customer";
import { getCustomerBookings } from "@/lib/booking/queries";
import { BookingCard } from "@/components/booking/BookingCard";
export const metadata: Metadata = { title: "Mein Konto" };
export default async function KontoOverviewPage() {
const customer = await getCurrentCustomer();
if (!customer) return null; // Layout already redirects; keeps TS happy.
const bookings = await getCustomerBookings(customer.id);
const pending = bookings.filter((b) => b.status === "pending");
const confirmed = bookings.filter((b) => b.status === "confirmed" && new Date(b.date) >= new Date());
const past = bookings.filter((b) => new Date(b.date) < new Date() || b.status === "rejected" || b.status === "cancelled");
return (
<div className="space-y-10">
<div className="rounded-3xl bg-white p-6">
<h2 className="font-serif text-xl font-medium text-anouma-plum">Deine Daten</h2>
<dl className="mt-4 grid gap-4 sm:grid-cols-2">
<div>
<dt className="text-xs font-medium uppercase tracking-wide text-anouma-plum/60">Name</dt>
<dd className="text-base text-anouma-plum">{customer.name}</dd>
</div>
<div>
<dt className="text-xs font-medium uppercase tracking-wide text-anouma-plum/60">E-Mail</dt>
<dd className="text-base text-anouma-plum">{customer.email}</dd>
</div>
</dl>
</div>
<div>
<div className="flex items-center justify-between">
<h2 className="font-serif text-xl font-medium text-anouma-plum">Offene Buchungsanfragen</h2>
</div>
{pending.length === 0 ? (
<p className="mt-3 text-sm text-anouma-plum/70">Keine offenen Anfragen.</p>
) : (
<div className="mt-4 grid gap-4 sm:grid-cols-2">
{pending.map((b) => (
<BookingCard key={b.id} booking={b} />
))}
</div>
)}
</div>
<div>
<h2 className="font-serif text-xl font-medium text-anouma-plum">Bestätigte Termine</h2>
{confirmed.length === 0 ? (
<p className="mt-3 text-sm text-anouma-plum/70">Noch keine bestätigten Termine.</p>
) : (
<div className="mt-4 grid gap-4 sm:grid-cols-2">
{confirmed.map((b) => (
<BookingCard key={b.id} booking={b} />
))}
</div>
)}
</div>
{past.length > 0 && (
<div>
<Link href="/konto/termine" className="text-sm font-medium text-anouma-mauve-dark underline underline-offset-4">
Alle Termine (inkl. vergangene) ansehen
</Link>
</div>
)}
</div>
);
}
+22
View File
@@ -0,0 +1,22 @@
import type { Metadata } from "next";
import { getCurrentCustomer } from "@/lib/auth/customer";
import { ProfileForm } from "@/components/auth/ProfileForm";
export const metadata: Metadata = { title: "Profil" };
export default async function KontoProfilPage() {
const customer = await getCurrentCustomer();
if (!customer) return null;
return (
<div className="max-w-md">
<h2 className="font-serif text-xl font-medium text-anouma-plum">Profil</h2>
<div className="mt-6 rounded-3xl bg-white p-6">
<ProfileForm id={customer.id} name={customer.name} phone={customer.phone ?? ""} />
<p className="mt-6 text-xs text-anouma-plum/60">
E-Mail: {customer.email} für eine Änderung der E-Mail-Adresse melde dich bitte direkt bei Anna.
</p>
</div>
</div>
);
}
+30
View File
@@ -0,0 +1,30 @@
import type { Metadata } from "next";
import { getCurrentCustomer } from "@/lib/auth/customer";
import { getCustomerBookings } from "@/lib/booking/queries";
import { BookingCard } from "@/components/booking/BookingCard";
export const metadata: Metadata = { title: "Meine Termine" };
export default async function KontoTerminePage() {
const customer = await getCurrentCustomer();
if (!customer) return null;
const bookings = await getCustomerBookings(customer.id);
return (
<div>
<h2 className="font-serif text-xl font-medium text-anouma-plum">Meine Termine</h2>
{bookings.length === 0 ? (
<p className="mt-3 text-sm text-anouma-plum/70">
Du hast noch keine Terminanfragen gestellt.
</p>
) : (
<div className="mt-4 grid gap-4 sm:grid-cols-2">
{bookings.map((b) => (
<BookingCard key={b.id} booking={b} />
))}
</div>
)}
</div>
);
}