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

@@ -0,0 +1,18 @@
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { CreatePostForm } from '@kit/site-builder/components';
import { CmsPageShell } from '~/components/cms-page-shell';
interface Props { params: Promise<{ account: string }> }
export default async function NewPostPage({ 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>;
return (
<CmsPageShell account={account} title="Neuer Beitrag" description="Beitrag erstellen">
<CreatePostForm accountId={acct.id} account={account} />
</CmsPageShell>
);
}

View File

@@ -0,0 +1,53 @@
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { createSiteBuilderApi } from '@kit/site-builder/api';
import { Card, CardContent } from '@kit/ui/card';
import { Badge } from '@kit/ui/badge';
import { Button } from '@kit/ui/button';
import { Plus } from 'lucide-react';
import Link from 'next/link';
import { CmsPageShell } from '~/components/cms-page-shell';
import { EmptyState } from '~/components/empty-state';
interface Props { params: Promise<{ account: string }> }
export default async function PostsManagerPage({ 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 = createSiteBuilderApi(client);
const posts = await api.listPosts(acct.id);
return (
<CmsPageShell account={account} title="Beiträge" description="Neuigkeiten und Artikel verwalten">
<div className="space-y-6">
<div className="flex justify-end">
<Button><Plus className="mr-2 h-4 w-4" />Neuer Beitrag</Button>
</div>
{posts.length === 0 ? (
<EmptyState title="Keine Beiträge" description="Erstellen Sie Ihren ersten Beitrag." actionLabel="Beitrag erstellen" />
) : (
<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">Titel</th>
<th className="p-3 text-left">Status</th>
<th className="p-3 text-left">Erstellt</th>
</tr></thead>
<tbody>
{posts.map((post: Record<string, unknown>) => (
<tr key={String(post.id)} className="border-b hover:bg-muted/30">
<td className="p-3 font-medium">{String(post.title)}</td>
<td className="p-3"><Badge variant={post.status === 'published' ? 'default' : 'secondary'}>{String(post.status)}</Badge></td>
<td className="p-3 text-xs text-muted-foreground">{post.created_at ? new Date(String(post.created_at)).toLocaleDateString('de-DE') : '—'}</td>
</tr>
))}
</tbody>
</table>
</div>
)}
</div>
</CmsPageShell>
);
}