- tsconfig.json strict mode (noImplicitAny, strictNullChecks, noUnused*) - Replace nodemon with tsx (watch + run TS directly) - Build script (tsc -> dist/) and typecheck script - Fastify decorator types in types/fastify.d.ts (prisma, openai, stripe, googleClient, auth helpers, ai helpers, request.user) - Typed route handlers with generic Body/Params - Strict null checks on Prisma results and env vars - Stripe plugin now optional (no-op if STRIPE_SECRET_KEY missing) - Delete dead utils/errors.js (empty) and utils/resend.js (contained a hardcoded Resend API key, unused) - Add @types/bcrypt, @types/nodemailer, typescript-eslint - ESLint upgraded to typescript-eslint flat config - deploy.sh: run prisma generate, migrate deploy, backend build Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
48 lines
1.2 KiB
JSON
48 lines
1.2 KiB
JSON
{
|
|
"name": "recipe-app-backend",
|
|
"version": "1.0.0",
|
|
"description": "Backend Freedge (TypeScript)",
|
|
"main": "dist/server.js",
|
|
"scripts": {
|
|
"start": "node dist/server.js",
|
|
"dev": "tsx watch src/server.ts",
|
|
"build": "tsc",
|
|
"typecheck": "tsc --noEmit",
|
|
"migrate": "prisma migrate dev",
|
|
"studio": "prisma studio",
|
|
"lint": "eslint src",
|
|
"format": "prettier --write \"src/**/*.{ts,json}\""
|
|
},
|
|
"dependencies": {
|
|
"@fastify/cors": "^8.5.0",
|
|
"@fastify/helmet": "^11.1.1",
|
|
"@fastify/jwt": "^7.0.0",
|
|
"@fastify/multipart": "^8.0.0",
|
|
"@fastify/rate-limit": "^9.1.0",
|
|
"@prisma/client": "^5.0.0",
|
|
"bcrypt": "^5.1.1",
|
|
"dotenv": "^16.3.1",
|
|
"fastify": "^4.19.0",
|
|
"fastify-plugin": "^4.5.0",
|
|
"google-auth-library": "^9.15.1",
|
|
"minio": "^8.0.5",
|
|
"nodemailer": "^6.10.0",
|
|
"openai": "^4.0.0",
|
|
"resend": "^4.1.2",
|
|
"stripe": "^12.12.0"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.21.0",
|
|
"@types/bcrypt": "^5.0.2",
|
|
"@types/node": "^22.13.9",
|
|
"@types/nodemailer": "^6.4.17",
|
|
"eslint": "^9.21.0",
|
|
"globals": "^15.15.0",
|
|
"prettier": "^3.3.0",
|
|
"prisma": "^5.0.0",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.7.2",
|
|
"typescript-eslint": "^8.24.1"
|
|
}
|
|
}
|