feat: MyEasyCMS v2 — Full SaaS rebuild
Some checks failed
Workflow / ⚫️ Test (push) Has been cancelled
Workflow / ʦ TypeScript (push) Has been cancelled

Complete rebuild of 22-year-old PHP CMS as modern SaaS:

Database (15 migrations, 42+ tables):
- Foundation: account_settings, audit_log, GDPR register, cms_files
- Module Engine: modules, fields, records, permissions, relations + RPC
- Members: 45+ field member profiles, departments, roles, honors, SEPA mandates
- Courses: courses, sessions, categories, instructors, locations, attendance
- Bookings: rooms, guests, bookings with availability
- Events: events, registrations, holiday passes
- Finance: SEPA batches/items (pain.008/001 XML), invoices
- Newsletter: campaigns, templates, recipients, subscriptions
- Site Builder: site_pages (Puck JSON), site_settings, cms_posts
- Portal Auth: member_portal_invitations, user linking

Feature Packages (9):
- @kit/module-builder — dynamic low-code CRUD engine
- @kit/member-management — 31 API methods, 21 actions, 8 components
- @kit/course-management, @kit/booking-management, @kit/event-management
- @kit/finance — SEPA XML generator + IBAN validator
- @kit/newsletter — campaigns + dispatch
- @kit/document-generator — PDF/Excel/Word
- @kit/site-builder — Puck visual editor, 15 blocks, public rendering

Pages (60+):
- Dashboard with real stats from all APIs
- Full CRUD for all 8 domains with react-hook-form + Zod
- Recharts statistics
- German i18n throughout
- Member portal with auth + invitation system
- Public club websites via Puck at /club/[slug]

Infrastructure:
- Dockerfile (multi-stage, standalone output)
- docker-compose.yml (Supabase self-hosted + Next.js)
- Kong API gateway config
- .env.production.example
This commit is contained in:
Zaid Marzguioui
2026-03-29 23:17:38 +02:00
parent 61ff48cb73
commit 1294caa7fa
120 changed files with 11013 additions and 1858 deletions

View File

@@ -1,183 +1,28 @@
import { UserPlus } from 'lucide-react';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { Button } from '@kit/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@kit/ui/card';
import { Input } from '@kit/ui/input';
import { Label } from '@kit/ui/label';
import { createMemberManagementApi } from '@kit/member-management/api';
import { CreateMemberForm } from '@kit/member-management/components';
import { CmsPageShell } from '~/components/cms-page-shell';
interface PageProps {
params: Promise<{ account: string }>;
}
interface Props { params: Promise<{ account: string }> }
export default async function NewMemberPage({ params }: PageProps) {
export default async function NewMemberPage({ params }: Props) {
const { account } = await params;
const client = getSupabaseServerClient();
const { data: acct } = await client.from('accounts').select('id').eq('slug', account).single();
if (!acct) return <div>Konto nicht gefunden</div>;
const api = createMemberManagementApi(client);
const duesCategories = await api.listDuesCategories(acct.id);
return (
<CmsPageShell account={account} title="Neues Mitglied">
<div className="flex w-full flex-col gap-6">
<div>
<h1 className="text-2xl font-bold">Neues Mitglied</h1>
<p className="text-muted-foreground">Mitglied manuell anlegen</p>
</div>
<form className="flex flex-col gap-6">
{/* Persönliche Daten */}
<Card>
<CardHeader>
<CardTitle>Persönliche Daten</CardTitle>
</CardHeader>
<CardContent className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div className="space-y-2">
<Label htmlFor="firstName">Vorname</Label>
<Input id="firstName" name="firstName" required />
</div>
<div className="space-y-2">
<Label htmlFor="lastName">Nachname</Label>
<Input id="lastName" name="lastName" required />
</div>
<div className="space-y-2">
<Label htmlFor="dateOfBirth">Geburtsdatum</Label>
<Input id="dateOfBirth" name="dateOfBirth" type="date" />
</div>
<div className="space-y-2">
<Label htmlFor="gender">Geschlecht</Label>
<select
id="gender"
name="gender"
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
>
<option value=""> Bitte wählen </option>
<option value="male">Männlich</option>
<option value="female">Weiblich</option>
<option value="diverse">Divers</option>
</select>
</div>
</CardContent>
</Card>
{/* Kontakt */}
<Card>
<CardHeader>
<CardTitle>Kontakt</CardTitle>
</CardHeader>
<CardContent className="grid grid-cols-1 gap-4 sm:grid-cols-3">
<div className="space-y-2">
<Label htmlFor="email">E-Mail</Label>
<Input id="email" name="email" type="email" />
</div>
<div className="space-y-2">
<Label htmlFor="phone">Telefon</Label>
<Input id="phone" name="phone" type="tel" />
</div>
<div className="space-y-2">
<Label htmlFor="mobile">Mobil</Label>
<Input id="mobile" name="mobile" type="tel" />
</div>
</CardContent>
</Card>
{/* Adresse */}
<Card>
<CardHeader>
<CardTitle>Adresse</CardTitle>
</CardHeader>
<CardContent className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div className="space-y-2 sm:col-span-1">
<Label htmlFor="street">Straße</Label>
<Input id="street" name="street" />
</div>
<div className="space-y-2">
<Label htmlFor="houseNumber">Hausnummer</Label>
<Input id="houseNumber" name="houseNumber" />
</div>
<div className="space-y-2">
<Label htmlFor="postalCode">PLZ</Label>
<Input id="postalCode" name="postalCode" />
</div>
<div className="space-y-2">
<Label htmlFor="city">Ort</Label>
<Input id="city" name="city" />
</div>
</CardContent>
</Card>
{/* Mitgliedschaft */}
<Card>
<CardHeader>
<CardTitle>Mitgliedschaft</CardTitle>
</CardHeader>
<CardContent className="grid grid-cols-1 gap-4 sm:grid-cols-3">
<div className="space-y-2">
<Label htmlFor="memberNumber">Mitgliedsnr.</Label>
<Input id="memberNumber" name="memberNumber" />
</div>
<div className="space-y-2">
<Label htmlFor="status">Status</Label>
<select
id="status"
name="status"
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
>
<option value="active">Aktiv</option>
<option value="inactive">Inaktiv</option>
<option value="pending">Ausstehend</option>
</select>
</div>
<div className="space-y-2">
<Label htmlFor="entryDate">Eintrittsdatum</Label>
<Input id="entryDate" name="entryDate" type="date" />
</div>
</CardContent>
</Card>
{/* SEPA */}
<Card>
<CardHeader>
<CardTitle>SEPA-Bankverbindung</CardTitle>
</CardHeader>
<CardContent className="grid grid-cols-1 gap-4 sm:grid-cols-3">
<div className="space-y-2">
<Label htmlFor="iban">IBAN</Label>
<Input id="iban" name="iban" placeholder="DE89 3704 0044 0532 0130 00" />
</div>
<div className="space-y-2">
<Label htmlFor="bic">BIC</Label>
<Input id="bic" name="bic" />
</div>
<div className="space-y-2">
<Label htmlFor="accountHolder">Kontoinhaber</Label>
<Input id="accountHolder" name="accountHolder" />
</div>
</CardContent>
</Card>
{/* Notizen */}
<Card>
<CardHeader>
<CardTitle>Notizen</CardTitle>
</CardHeader>
<CardContent>
<textarea
name="notes"
rows={4}
className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
placeholder="Zusätzliche Anmerkungen…"
/>
</CardContent>
</Card>
{/* Submit */}
<div className="flex justify-end">
<Button type="submit" size="lg">
<UserPlus className="mr-2 h-4 w-4" />
Mitglied erstellen
</Button>
</div>
</form>
</div>
<CmsPageShell account={account} title="Neues Mitglied" description="Mitglied manuell anlegen">
<CreateMemberForm
accountId={acct.id}
account={account}
duesCategories={(duesCategories ?? []).map((c: Record<string, unknown>) => ({
id: String(c.id), name: String(c.name), amount: Number(c.amount ?? 0)
}))}
/>
</CmsPageShell>
);
}