Skip to content

Conversation

@cto-new
Copy link

@cto-new cto-new bot commented Nov 21, 2025

Summary

Initialize a Prisma-backed Express API for user auth, profile management, search, and friendship workflows backed by MySQL. Includes migrations, JWT-based auth with bcrypt, validation, and integration tests.

Details

  • Add Prisma schema and migrations for User, FriendRequest, and Friendship with indexes, enums, and timestamps
  • Implement JWT-based authentication with bcrypt password hashing and refresh token rotation; secrets via env vars
  • Build controllers/services for register, login, /users/me, search, friend requests, accept/decline, delete, and list
  • Add Zod validations, error normalization, and consistent JSON responses with pagination support
  • Introduce integration tests (Supertest + Vitest) using Testcontainers MySQL
  • Update README/API docs with setup, migrations, and request/response contracts
  • Document migration commands (prisma migrate/deploy)

Warning: Task VM test is not passing, cto.new will perform much better if you fix the setup

… API

Set up Prisma-based backend for MySQL with JWT-based authentication and friendship workflows. This initial commit adds schema/migrations for User, FriendRequest, and Friendship, bcrypt password hashing, refreshable tokens, and auth middleware that injects req.user. It implements Phase 1–2 APIs (register, login, /users/me, /users/search, friend requests and responses, delete friendship, and list friends). Includes Zod validation, error normalization, and consistent JSON responses with pagination. Adds integration tests (Supertest + Vitest) using Testcontainers for MySQL, and updates README/API docs with setup, migrations, and contract formats. Documentation for migration commands is included.
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