feat: stabilize API startup and lifecycle management
- Refactor server initialization to separate concerns and improve error handling. - Implement centralized environment validation using Zod. - Introduce database, Redis, and queue lifecycle management. - Add health check endpoints for liveness and readiness. - Enhance error handling middleware for better response structure. - Implement rate limiting for API endpoints. - Add request ID middleware for traceability. - Create Sequelize CLI configuration and baseline migration for schema management. - Establish CI workflow with Gitea for testing and syntax checks. - Document foundational changes and migration strategy in PHASE_0_FOUNDATION_STABILIZATION.md. - Add Docker Compose configuration for local development and testing. - Implement unit and integration tests for critical functionality.
This commit is contained in:
+28
-8
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "backend",
|
||||
"name": "zumri-backend",
|
||||
"version": "1.0.0",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
@@ -7,15 +7,30 @@
|
||||
"start": "node server.js",
|
||||
"worker": "node app/workers/index.js",
|
||||
"seed": "node app/seeders/index.js",
|
||||
"test": "jest"
|
||||
"test": "jest",
|
||||
"test:unit": "jest tests/unit --runInBand",
|
||||
"test:integration": "jest tests/integration --runInBand",
|
||||
"check:syntax": "node scripts/check-syntax.js",
|
||||
"db:migrate": "sequelize-cli db:migrate",
|
||||
"db:migrate:status": "sequelize-cli db:migrate:status",
|
||||
"db:migrate:undo": "sequelize-cli db:migrate:undo"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22 <23"
|
||||
},
|
||||
"keywords": [
|
||||
"Oceanic Titan",
|
||||
"Oceanic Titan Backend"
|
||||
"ZUMRI",
|
||||
"ZUMRI Backend"
|
||||
],
|
||||
"author": "Niolla PVT (LTD)",
|
||||
"license": "ISC",
|
||||
"description": "Oceanic Titan Backend",
|
||||
"description": "ZUMRI Backend",
|
||||
"jest": {
|
||||
"testEnvironment": "node",
|
||||
"setupFiles": [
|
||||
"<rootDir>/tests/setupEnv.js"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.1021.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.1021.0",
|
||||
@@ -30,6 +45,8 @@
|
||||
"ejs": "^3.1.10",
|
||||
"exceljs": "^4.4.0",
|
||||
"express": "^5.2.1",
|
||||
"express-rate-limit": "^8.7.0",
|
||||
"helmet": "^8.3.0",
|
||||
"ioredis": "^5.10.1",
|
||||
"jsonwebtoken": "^9.0.3",
|
||||
"morgan": "^1.10.1",
|
||||
@@ -38,13 +55,16 @@
|
||||
"node-cron": "^4.5.0",
|
||||
"nodemailer": "^8.0.1",
|
||||
"nodeman": "^1.1.2",
|
||||
"nodemon": "^3.1.11",
|
||||
"pdfmake": "^0.2.7",
|
||||
"puppeteer": "^24.43.1",
|
||||
"sequelize": "^6.37.7",
|
||||
"uuid": "^13.0.0"
|
||||
"uuid": "^11.1.1",
|
||||
"zod": "^4.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jest": "^30.4.2"
|
||||
"jest": "^30.4.2",
|
||||
"nodemon": "^3.1.14",
|
||||
"sequelize-cli": "^6.6.5",
|
||||
"supertest": "^7.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user