TypeScript backend and /api/v2 foundations (1.51.0)

- tsconfig (allowJs, strict .ts), npm run build -> dist/, typecheck, dev via tsx, ts-jest.
- src/index.js is now a launcher (dist build when it matches, else tsx); server moved to app.js.
- /api/v2: defineRoute with zod -> request validation, response stripping, OpenAPI 3.1 at
  /docs/v2; one error shape and one paged-list shape. First endpoints: events, event, me,
  my registrations.
- deploy.sh/install.sh build the backend; rollback to older releases skips the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls1vMdg2GYqbnKZmPaX1ot
This commit is contained in:
2026-10-29 08:48:54 +02:00
co-authored by Claude Opus 5.5
parent 7e736d8d41
commit 6b3c55902e
32 changed files with 3964 additions and 1840 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ chown "$APP_USER:$APP_USER" "$DIR/backend/.env" "$DIR/frontend/.env.production"
chmod 600 "$DIR/backend/.env"
step "Install, migrate, build"
as_app "cd '$DIR/backend' && npm ci --no-audit --no-fund && npx prisma migrate deploy && npx prisma generate"
as_app "cd '$DIR/backend' && npm ci --include=dev --no-audit --no-fund && npx prisma migrate deploy && npx prisma generate && npm run build"
as_app "cd '$DIR/frontend' && npm ci --no-audit --no-fund && npm run build"
step "Start with PM2"