- Add Express.js server with TypeScript - Configure Prisma ORM with PostgreSQL schema - Implement JWT authentication (register, login, logout, refresh) - Add rate limiting for auth endpoints (10 attempts/15min) - Password strength validation (8+ chars, uppercase, lowercase, number) - Events CRUD API (anniversaries and reminders) - Notes API (single note per user) - AI parse endpoint with DeepSeek integration - Security: Helmet, rate limiting, input validation, error handling - Fix: JWT_SECRET environment variable validation Code review: Architect approved Tests: Build verified
39 lines
1005 B
JSON
39 lines
1005 B
JSON
{
|
|
"name": "qia-server",
|
|
"version": "0.1.0",
|
|
"description": "Backend API for 掐日子(qia) app",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"dev": "tsx watch src/index.ts",
|
|
"build": "tsc",
|
|
"start": "node dist/index.js",
|
|
"prisma:generate": "prisma generate",
|
|
"prisma:migrate": "prisma migrate dev",
|
|
"prisma:studio": "prisma studio"
|
|
},
|
|
"dependencies": {
|
|
"@prisma/client": "^5.22.0",
|
|
"bcrypt": "^5.1.1",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^16.4.5",
|
|
"express": "^4.21.0",
|
|
"express-rate-limit": "^7.4.0",
|
|
"express-validator": "^7.1.0",
|
|
"helmet": "^8.0.0",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"zod": "^3.23.8"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bcrypt": "^5.0.2",
|
|
"@types/cors": "^2.8.17",
|
|
"@types/express": "^4.17.21",
|
|
"@types/express-rate-limit": "^6.0.0",
|
|
"@types/helmet": "^4.0.0",
|
|
"@types/jsonwebtoken": "^9.0.7",
|
|
"@types/node": "^22.5.5",
|
|
"prisma": "^5.22.0",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.6.2"
|
|
}
|
|
}
|