Skip to content

Next.js migration - #30

Draft
nimobeeren wants to merge 58 commits into
mainfrom
nextjs-migration
Draft

Next.js migration#30
nimobeeren wants to merge 58 commits into
mainfrom
nextjs-migration

Conversation

@nimobeeren

@nimobeeren nimobeeren commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Migrates the app from Vite + FastAPI to Next.js.

TODO

  • Use idiomatic test file naming
  • Correctness review
  • Code style review (remove comments only describing changes)
  • Security review

Later

  • Use T3 Env

- Pages: Next.js App Router with thin 'use client' wrappers + withAuthenticationRequired
- Views: ported from react-router to next/link + useRouter
- Auth: @auth0/auth0-react via providers.tsx (SSR-safe with mounted state)
- API: 7 route handlers (healthz, users/me, images/*, wearables, outfits)
- DB: Drizzle ORM + pg Pool (max 5), schema matching SQLModel tables
- Auth: jose JWT verification with JWKS
- Storage: @aws-sdk/client-s3 for R2/MinIO
- Images: sharp ↔ PIL parity (safeOpenImage, compressToJpeg, combining)
- Generation: Gemini avatar, Replicate VTON + SAM mask, Gemini classify
- Services: DI layer with setServices/getServices + waitUntil (@vercel/functions)
- Tests: 20 browser (vitest-browser) + 23 server (PGlite + vitest node)
- Upload: 4MB client-side zod validation + sequential per-file POST
- Seed: scripts/seed.ts (tsx, same AUTH0_SEED_USER_ID flow)
- CI: .github/workflows/ci.yml (typecheck, lint, vitest, build)
- Eval: tests/eval/classification.eval.test.ts (vitest project, GEMINI_API_KEY)
- Vercel: deployed at dressme-eight.vercel.app with prod Neon + R2

Removed: src/app.tsx, src/api/, vite.config.ts, index.html, src/main.tsx,
openapi-ts.config.ts, .env.production, tsconfig.app.json, tsconfig.node.json
Renamed: VITE_* → NEXT_PUBLIC_*, src/pages/ → src/views/
Added: next.config.ts, drizzle.config.ts, vitest.workspace.ts
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dressme Ready Ready Preview Aug 8, 2026 9:21pm

- generate pnpm-lock.yaml (CI/Vercel install failed without it)
- pass new Uint8Array() to NextResponse in outfit image route (Buffer is not BodyInit)
- make WearableAddCard generic over FieldValues for typed form control
- ignore .next build output in ESLint
- tests/server/test_image_utils.test.ts -> image-utils.test.ts
- tests/server/test_main.test.ts -> api.test.ts
- tests/eval/classification.eval.test.ts -> wearable-classification.eval.test.ts
- update top-level describe to match source file name (image-utils, api,
  wearable-classification, add, home, schemas, authenticated-image)
@nimobeeren

Copy link
Copy Markdown
Owner Author

Generated a correspondance table for old -> new files for this migration.

This was generated against commit b226990.

MIGRATION-CORRESPONDENCE.md

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