Skip to content

Scaffold M0 monorepo: Next BFF + Nest + shared Zod - #1

Merged
TimGoldbach merged 2 commits into
mainfrom
chore/scaffold-m0
Jun 14, 2026
Merged

Scaffold M0 monorepo: Next BFF + Nest + shared Zod#1
TimGoldbach merged 2 commits into
mainfrom
chore/scaffold-m0

Conversation

@TimGoldbach

@TimGoldbach TimGoldbach commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Was

M0-Gerüst für Tournamentify gemäß docs/PLAN.md — die runnable Foundation, in der die geplante Architektur verdrahtet ist (noch keine Features).

  • apps/web (Next.js, App Router): next-intl DE/EN, Tailwind + Design-Tokens, Auth.js-Stub und ein SSE-tauglicher BFF-Proxy (/api/bff/[...path]) — der Browser spricht nur mit Next, Nest bleibt privat.
  • apps/api (NestJS): Skeleton (Health, pino, PrismaService) + das voll normalisierte Prisma-Schema (User · Series · Tournament · Stage · Group · Round · Match · MatchGame · Participant · CapabilityLink · SavedTheme).
  • packages/shared: versioniertes, setup-only Turnier-Zod-Schema als Single Source of Truth für FE, BE und JSON-Import/Export — inkl. Round-Trip-Test.
  • infra/: docker-compose (db/api/web/caddy, nur Caddy exponiert), Caddyfile, Dockerfiles für Single-VPS-Deploy.

Keine CI — bewusst weggelassen; Checks laufen lokal vor dem Commit, Deploy + Betrieb passieren infra-seitig auf dem VPS.

Warum

Die im Grilling getroffenen Entscheidungen als lauffähiges Skelett festnageln, bevor M1 startet (Auth.js-Wiring, Tournament-CRUD über brackets-manager, Dashboard). Architektur-Kerne sind schon im Code verankert: privates Netz in Compose, SSE-Passthrough im BFF, normalisiertes Modell, geteilte Schemas.

Für Reviewer

  • Offline gescaffoldet → kein pnpm-lock.yaml. Entsteht beim ersten pnpm install; vor Docker-Builds (--frozen-lockfile) committen.
  • Versionen sind Richtwerte (Next 15 / Nest 11 / Prisma 6 / Zod 3 / next-intl 3) — pnpm install löst exakt auf.
  • .env-Dateien sind gitignored; nur .env.example ist eingecheckt. Secrets vor Prod ersetzen.
  • Setup-Anleitung im aktualisierten README.md.

🤖 Generated with Claude Code

TimGoldbach and others added 2 commits June 14, 2026 13:42
Initial foundation for Tournamentify per docs/PLAN.md. Establishes the
pnpm + Turborepo monorepo and wires the architecture decided in planning:

- apps/web: Next.js (App Router), next-intl DE/EN, Tailwind + design tokens,
  Auth.js stub, and an SSE-capable BFF proxy (browser only talks to Next;
  Nest stays private).
- apps/api: NestJS skeleton (health, pino logging, PrismaService) plus the
  full normalized Prisma schema (User/Series/Tournament/Stage/Group/Round/
  Match/MatchGame/Participant/CapabilityLink/SavedTheme).
- packages/shared: versioned, setup-only tournament Zod schema — single
  source of truth for FE, BE and JSON import/export — with a round-trip test.
- infra: docker-compose (db/api/web/caddy) with only Caddy exposed, Caddyfile,
  Dockerfiles for a single-VPS deploy.
- CI: GitHub Actions (build, typecheck, lint, test) with a Postgres service.

Why: lock in the planned stack/architecture as a runnable skeleton before M1
(Auth.js wiring, tournament CRUD via brackets-manager, dashboard).

Note: no pnpm-lock.yaml yet (scaffolded offline) — generated on first install;
commit it before building Docker images that use --frozen-lockfile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop .github/workflows/ci.yml. CI is intentionally omitted — checks run
locally before commit and deployment/operations are handled infra-side on
the VPS. Update docs/PLAN.md to reflect this.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant