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,117 +1,24 @@
import { UserCheck, UserX, FileText } from 'lucide-react';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { Badge } from '@kit/ui/badge';
import { Button } from '@kit/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@kit/ui/card';
import { createMemberManagementApi } from '@kit/member-management/api';
import { ApplicationWorkflow } from '@kit/member-management/components';
import { CmsPageShell } from '~/components/cms-page-shell';
import { EmptyState } from '~/components/empty-state';
interface PageProps {
interface Props {
params: Promise<{ account: string }>;
}
const STATUS_VARIANT: Record<string, 'secondary' | 'default' | 'info' | 'destructive'> = {
pending: 'secondary',
approved: 'default',
rejected: 'destructive',
};
const STATUS_LABEL: Record<string, string> = {
pending: 'Ausstehend',
approved: 'Genehmigt',
rejected: 'Abgelehnt',
};
export default async function ApplicationsPage({ params }: PageProps) {
export default async function ApplicationsPage({ params }: Props) {
const { account } = await params;
const client = getSupabaseServerClient();
const { data: acct } = await client
.from('accounts')
.select('id')
.eq('slug', account)
.single();
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 applications = await api.listApplications(acct.id);
return (
<CmsPageShell account={account} title="Anträge">
<div className="flex w-full flex-col gap-6">
<div>
<h1 className="text-2xl font-bold">Mitgliedsanträge</h1>
<p className="text-muted-foreground">Eingehende Anträge prüfen und bearbeiten</p>
</div>
{applications.length === 0 ? (
<EmptyState
icon={<FileText className="h-8 w-8" />}
title="Keine Anträge"
description="Es liegen derzeit keine Mitgliedsanträge vor."
/>
) : (
<Card>
<CardHeader>
<CardTitle>Alle Anträge ({applications.length})</CardTitle>
</CardHeader>
<CardContent>
<div className="rounded-md border">
<table className="w-full text-sm">
<thead>
<tr className="border-b bg-muted/50">
<th className="p-3 text-left font-medium">Name</th>
<th className="p-3 text-left font-medium">E-Mail</th>
<th className="p-3 text-left font-medium">Datum</th>
<th className="p-3 text-left font-medium">Status</th>
<th className="p-3 text-right font-medium">Aktionen</th>
</tr>
</thead>
<tbody>
{applications.map((app: Record<string, unknown>) => (
<tr key={String(app.id)} className="border-b hover:bg-muted/30">
<td className="p-3 font-medium">
{String(app.last_name ?? '')}, {String(app.first_name ?? '')}
</td>
<td className="p-3">{String(app.email ?? '—')}</td>
<td className="p-3">
{app.created_at
? new Date(String(app.created_at)).toLocaleDateString('de-DE')
: '—'}
</td>
<td className="p-3">
<Badge variant={STATUS_VARIANT[String(app.status)] ?? 'secondary'}>
{STATUS_LABEL[String(app.status)] ?? String(app.status)}
</Badge>
</td>
<td className="p-3 text-right">
{String(app.status) === 'pending' && (
<div className="flex justify-end gap-2">
<Button size="sm" variant="default">
<UserCheck className="mr-1 h-3 w-3" />
Genehmigen
</Button>
<Button size="sm" variant="destructive">
<UserX className="mr-1 h-3 w-3" />
Ablehnen
</Button>
</div>
)}
</td>
</tr>
))}
</tbody>
</table>
</div>
</CardContent>
</Card>
)}
</div>
<CmsPageShell account={account} title="Aufnahmeanträge" description="Mitgliedsanträge bearbeiten">
<ApplicationWorkflow applications={applications} accountId={acct.id} account={account} />
</CmsPageShell>
);
}