- Use typeof window === undefined for standard Next.js server detection
- Use NEXT_PUBLIC_SITE_URL env var instead of hardcoded localhost:3000
- Use require() for server branch to prevent Elysia from entering client bundle
- Add type assertion on require() to preserve Eden Treaty types
- Move auth schema from auth-schema.ts to lib/db/schema/auth.ts
- Export auth tables (user, session, account, verification, passkey) via barrel
- Add FK from performanceEntries.userId to user.id
- Generate and apply migration for auth tables + user FK
- Remove unused echarts dependency
- Create performanceEntries table with FPS metrics, environment details,
feature flags (FSR, frame gen), load times, settings JSON, and moderation
- Create gamePlatformSupport table with Proton/anti-cheat status enums
and composite unique constraint on (gameId, hardwareSlug)
- Update schema barrel export to include both new tables
- Add drizzle.config.ts with PostgreSQL dialect configuration
- Create lib/db/index.ts with Drizzle ORM client and pg Pool
- Add db:generate, db:migrate, db:studio, db:push scripts to package.json
Part of Chunk 1: Drizzle Config & DB Client setup