Multi-Tenant Payload CMS for complex care solutions gmbh et al.
Find a file
Martin Porwoll ab4ee4bb70 fix(access): allow tenant resolution from query parameter in tenantScopedPublicRead
Previously, tenantScopedPublicRead only resolved the tenant from the Host
header, which fails when frontend API clients call cms.c2sgmbh.de (the CMS
hostname doesn't match any tenant domain). Now falls back to extracting the
tenant ID from the where[tenant][equals] query parameter. The returned access
filter still enforces tenant isolation.

Also adds seed script for zweitmeinung (tenant 12) with all content:
site settings, 2 service categories, 6 services, 24 FAQs, navigation,
4 social links, and contact form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 00:44:42 +00:00
.claude chore: add Claude Code config, prompts, and tenant setup scripts 2026-01-18 10:18:05 +00:00
.github/workflows fix(ci): update production deploy workflow for new heap limit and CRON_SECRET 2026-02-17 12:54:08 +00:00
.vscode Initial commit 2025-11-26 21:18:31 +00:00
backups chore: add jobs, backups, and migration history 2025-12-01 08:24:26 +00:00
docs docs: update documentation for contact form multi-tenant refactoring 2026-02-17 21:06:27 +00:00
prompts chore: add Claude Code config, prompts, and tenant setup scripts 2026-01-18 10:18:05 +00:00
scripts fix(access): allow tenant resolution from query parameter in tenantScopedPublicRead 2026-02-21 00:44:42 +00:00
src fix(access): allow tenant resolution from query parameter in tenantScopedPublicRead 2026-02-21 00:44:42 +00:00
temp-seed-media chore: add Claude Code config, prompts, and tenant setup scripts 2026-01-18 10:18:05 +00:00
tests fix: stabilize guard responses and validation typing 2026-02-17 11:47:55 +00:00
.env.example feat: security hardening, monitoring improvements, and API guards 2026-02-17 11:42:56 +00:00
.gitignore chore: add blogwoman seed script, ignore playwright-mcp 2026-02-13 21:07:02 +00:00
.gitleaks.toml feat: implement security hardening module 2025-12-07 23:04:14 +00:00
.npmrc Initial commit 2025-11-26 21:18:31 +00:00
.prettierrc chore: update core configuration and dependencies 2025-12-01 08:18:41 +00:00
.prettierrc.json Initial commit 2025-11-26 21:18:31 +00:00
.yarnrc Initial commit 2025-11-26 21:18:31 +00:00
CLAUDE.md docs: add tenant SMTP admin-save troubleshooting notes 2026-02-17 09:48:39 +00:00
docker-compose.yml Initial commit 2025-11-26 21:18:31 +00:00
Dockerfile Initial commit 2025-11-26 21:18:31 +00:00
drizzle.ci.config.ts fix(ci): use drizzle-kit push instead of migrations 2025-12-16 15:36:03 +00:00
drizzle.production.config.ts feat: add automatic schema sync to deployment workflow 2025-12-27 20:17:47 +00:00
ecosystem.config.cjs feat(monitoring): add snapshot collector to queue worker 2026-02-15 00:34:28 +00:00
eslint.config.mjs fix: resolve all ESLint errors for clean CI pipeline 2026-02-13 22:24:12 +00:00
next.config.mjs security: harden payload endpoints and access controls 2026-02-17 10:41:51 +00:00
package.json fix(ci): increase build heap limit from 2GB to 4GB 2026-02-17 12:03:48 +00:00
playwright.config.ts test: add E2E tests for critical flows 2025-12-12 22:32:55 +00:00
pnpm-lock.yaml chore: add FullCalendar dependencies 2026-02-14 13:49:32 +00:00
README.md docs: consolidate and update documentation for Payload 3.76.1 / Next.js 16 2026-02-13 21:29:50 +00:00
test.env Initial commit 2025-11-26 21:18:31 +00:00
tsconfig.json fix: resolve ESLint circular structure crash and tsc OOM 2026-02-13 22:13:45 +00:00
vercel.json feat(youtube): add metrics sync cron endpoints 2026-02-14 13:27:05 +00:00
vitest.config.mts fix(ci): add timeouts to prevent 6-hour hangs 2025-12-16 21:48:58 +00:00
vitest.setup.ts Initial commit 2025-11-26 21:18:31 +00:00

Payload CMS Multi-Tenant

Multi-Tenant Headless CMS for 3 active websites under a single Payload CMS instance.

Tech Stack

  • CMS: Payload CMS 3.76.1
  • Framework: Next.js 16.2.0-canary.41
  • Runtime: Node.js 22.x
  • Database: PostgreSQL 17.6 (via PgBouncer)
  • Cache: Redis 7.x (optional, with in-memory fallback)
  • Package Manager: pnpm

Tenants

Tenant Slug Domain
porwoll.de porwoll porwoll.de
Complex Care Solutions GmbH c2s complexcaresolutions.de
Gunshin gunshin gunshin.de

Quick Start

Prerequisites

  • Node.js 22.x
  • pnpm
  • PostgreSQL 17 (or PgBouncer connection)
  • Redis (optional)

Setup

# Install dependencies
pnpm install

# Copy environment variables
cp .env.example .env
# Edit .env with your database credentials

# Run development server
pnpm dev

Open http://localhost:3000/admin to access the admin panel.

Commands

pnpm dev                    # Development server
pnpm build                  # Production build
pnpm payload migrate        # Run migrations
pnpm payload migrate:create # Create migration
pnpm test                   # Run tests
pnpm lint                   # ESLint
pnpm typecheck              # TypeScript check

Documentation

  • CLAUDE.md - Full project documentation (collections, blocks, APIs, architecture)
  • docs/ - Additional documentation (infrastructure, deployment, security)

Email Testing

Set EMAIL_DELIVERY_DISABLED=true to bypass SMTP calls during testing. This flag is automatically honored in NODE_ENV=test.