Adds @sentry/nextjs v10 with the Next.js 16 instrumentation pattern:
- instrumentation.ts — server + edge runtime init
- instrumentation-client.ts — browser init with Session Replay
(free tier, mask all text/inputs by
default since chat content is sensitive)
- app/global-error.tsx — catches root-layout crashes that escape
every other error boundary
- app/sentry-example-page — verification page; click both buttons
- next.config.ts — wrapped with withSentryConfig, source
maps upload to Sentry on every build,
client error events tunneled through
/monitoring to bypass ad-blockers
Runtime capture works as soon as NEXT_PUBLIC_SENTRY_DSN is in Coolify
env (already added). Full source-map de-minification of prod stack
traces requires SENTRY_AUTH_TOKEN in Coolify env — pending user.
Co-authored-by: Cursor <cursoragent@cursor.com>
Without this the bot PAT 403s on POST /orgs/{org}/repos, which is
the single most important operation — creating new project repos
inside the workspace's Gitea org.
Made-with: Cursor
Add Prisma support to Docker build:
- Run 'prisma generate' during Docker build
- Copy Prisma client and schema to production image
- Remove 'prisma db push' from build script (runs at startup)
- Enable Next.js standalone output mode
- Add db-setup.sh script for runtime migrations
This fixes the deployment failure where Prisma wasn't available.
Co-authored-by: Cursor <cursoragent@cursor.com>
BREAKING CHANGE: Replace SuperTokens with NextAuth.js
Why:
- SuperTokens had persistent Traefik routing issues
- SSL certificate not issuing correctly
- Complex infrastructure (separate container)
- NextAuth runs in Next.js app (simpler, no separate service)
Changes:
- Install next-auth, @auth/prisma-adapter, prisma
- Create NextAuth API route: app/api/auth/[...nextauth]/route.ts
- Add Prisma schema for NextAuth tables (users, sessions, accounts)
- Update auth page to use NextAuth signIn()
- Remove all SuperTokens code and dependencies
- Keep same Google OAuth (just simpler integration)
Benefits:
- No separate auth service needed
- No Traefik routing issues
- Sessions stored in Montreal PostgreSQL
- Simpler configuration
- Battle-tested, widely used
All authentication data stays in Montreal!
Co-authored-by: Cursor <cursoragent@cursor.com>