feat(api): 搭建 API 与 Worker 骨架及契约基线

NestJS 11 + Fastify 统一错误体与 trace_id,/health 真实探活 DB/Redis,OpenAPI 3.1 契约含 20 个错误码;shared 包提供错误码、权限点、ULID、分页与通用 schema;worker 完成队列进程骨架。
This commit is contained in:
Stev_Wang committed 2026-11-02 17:20:46 +08:00
1 parent 09dbb27b66
commit 23067edb8f
70 files changed
+2445

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
{
"name": "@lingxi/api",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "tsx watch src/main.ts",
"build": "tsc -p tsconfig.build.json",
"start": "node dist/main.js",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "vitest run --coverage",
"test:int": "vitest run --config vitest.int.config.ts"
},
"dependencies": {
"@fastify/cors": "11.3.1",
"@fastify/helmet": "13.2.0",
"@fastify/static": "10.1.8",
"@lingxi/shared": "workspace:*",
"@nestjs/common": "11.2.8",
"@nestjs/core": "11.2.8",
"@nestjs/platform-fastify": "11.2.8",
"@nestjs/swagger": "11.4.7",
"@prisma/client": "6.19.3",
"dotenv": "18.0.9",
"fastify": "5.12.7",
"ioredis": "5.11.1",
"nestjs-pino": "5.3.1",
"pino": "10.4.0",
"pino-http": "11.0.0",
"reflect-metadata": "0.2.2",
"rxjs": "7.8.2",
"zod": "3.25.76"
},
"devDependencies": {
"@nestjs/testing": "11.2.8",
"@types/node": "24.19.2",
"@vitest/coverage-v8": "3.2.7",
"pino-pretty": "13.2.0",
"tsx": "4.23.15",
"typescript": "5.9.3",
"vitest": "3.2.7"
}
}