{
  "name": "sso-vietprodev-backend",
  "version": "1.0.0",
  "description": "SSO Backend built with TypeScript, Express, and Sequelize — supports OIDC/OAuth2, bcryptjs, PostgreSQL multi-pool, and MongoDB audit logging.",
  "main": "dist/index.js",
  "engines": {
    "node": ">=20.1.0",
    "npm": ">=10.7.0"
  },
  "scripts": {
    "-----------------DEVELOPMENT------------------": "",
    "dev": "cross-env NODE_ENV=development nodemon",
    "start:dev": "npx kill-port 3001 && cross-env NODE_ENV=development nodemon",
    "-----------------BUILDING------------------": "",
    "build": "node lib/build/index.cjs",
    "build:dev": "cross-env NODE_ENV=development npm run build",
    "build:staging": "cross-env NODE_ENV=staging npm run build",
    "build:prod": "cross-env NODE_ENV=production npm run build",
    "clean": "rimraf dist && rimraf storage\\logs\\*.log",
    "clean-install": "rimraf node_modules pnpm-lock.yaml && npm install",
    "-----------------DATABASE------------------": "",
    "migrate": "node sql/scripts/migrate.js migrate",
    "seed": "node sql/scripts/migrate.js seed",
    "db:setup": "node sql/scripts/migrate.js all",
    "check-db": "node sql/scripts/check-db.js",
    "-----------------GENERATOR------------------": "",
    "gen-api": "node lib/generator/api --crud",
    "gen-api-bulk": "node lib/generator/api --bulk",
    "gen-providers": "node lib/generator/sequelize-auto/index.js mode=providers-from-template",
    "gen-providers:force": "node lib/generator/sequelize-auto/index.js mode=providers-from-template --force",
    "gen-db": "node lib/generator/sequelize-auto/index.js mode=full",
    "gen-db:force": "node lib/generator/sequelize-auto/index.js mode=full --force",
    "gen-db:clean": "rimraf src/models src/providers && npm run gen-db",
    "gen-routes": "node lib/generator/routes",
    "-----------------WORKERS------------------": "",
    "worker:audit": "tsx src/workers/auditWorker.ts",
    "-----------------PRODUCTION------------------": "",
    "start": "cross-env NODE_ENV=production node dist/index.js",
    "-----------------SWAGGER / OPENAPI------------------": "",
    "swagger:generate": "tsx lib/generator/openapi/generate-openapi.ts",
    "swagger:diff": "oasdiff breaking storage/swagger/openapi.baseline.json storage/swagger/openapi.json || (echo 'oasdiff not found — install: https://github.com/Tufin/oasdiff#install' && exit 1)",
    "swagger:check": "node scripts/check-openapi.js",
    "swagger:validate": "pnpm swagger:generate && pnpm swagger:check",
    "swagger:ci": "pnpm swagger:validate && pnpm swagger:diff",
    "-----------------CODE QUALITY------------------": "",
    "lint": "eslint src/**/*.ts --config .eslintrc.js",
    "lint:fix": "eslint src/**/*.ts --fix",
    "format": "prettier . --write",
    "prettier:fix": "prettier . --write",
    "type-check": "tsc --noEmit",
    "lint-staged": "lint-staged -c ./config/lint-staged.config.js -v",
    "quality:check": "npm run lint && npm run type-check && npm run swagger:check && npm run test:coverage",
    "quality:fix": "npm run lint:fix && npm run format",
    "-----------------STRUCTURE QUALITY------------------": "",
    "check:naming": "node scripts/check-naming-convention.js",
    "check:size": "node scripts/check-file-size.js",
    "check:placeholder": "node scripts/check-placeholder.js",
    "check:empty-folders": "node scripts/check-empty-folders.js",
    "check:structure": "npm run check:naming && npm run check:size && npm run check:placeholder && npm run check:empty-folders",
    "check:all": "npm run lint && npm run type-check && npm run check:structure",
    "-----------------SECURITY------------------": "",
    "security:audit": "npm audit --audit-level=moderate --registry https://registry.npmjs.org",
    "security:fix": "npm audit fix",
    "security:check": "npm run security:audit && npm run lint",
    "security:full": "npm run security:audit && npm run lint && npm run type-check && npm run check:structure",
    "security:deps": "npm audit --audit-level=high --registry https://registry.npmjs.org",
    "security:outdated": "npm outdated",
    "type-check:tests": "tsc --noEmit --project tsconfig.test.json",
    "-----------------CI/CD------------------": "",
    "ci:check": "npm run type-check && npm run lint && npm run check:structure && npm run security:audit && npm run test:coverage",
    "ci:quality": "npm run type-check && npm run lint && npm run check:structure && npm run swagger:check",
    "ci:security": "npm run security:full",
    "ci:test": "npm run type-check:tests && npm run test:ci",
    "-----------------TESTING------------------": "",
    "test": "cross-env NODE_ENV=test jest",
    "test:watch": "cross-env NODE_ENV=test jest --watch",
    "test:coverage": "cross-env NODE_ENV=test jest --coverage",
    "test:ci": "cross-env NODE_ENV=test jest --ci --coverage --reporters=default --reporters=jest-junit",
    "test:unit": "cross-env NODE_ENV=test jest tests/unit",
    "test:integration": "cross-env NODE_ENV=test jest tests/integration",
    "test:critical": "cross-env NODE_ENV=test jest --testPathPattern=\"(auth|virusScan)\" --no-coverage",
    "-----------------DOCKER------------------": "",
    "docker:build": "docker build -t sso-vietprodev-backend .",
    "docker:build:dev": "docker build --target development -t sso-vietprodev-backend:dev .",
    "docker:build:prod": "docker build --target production -t sso-vietprodev-backend:prod .",
    "docker:infra": "docker compose up redis minio -d",
    "docker:infra:down": "docker compose down redis minio",
    "docker:dev": "docker compose --profile dev up --build",
    "docker:dev:detach": "docker compose --profile dev up --build -d",
    "docker:staging": "docker compose --profile staging up --build -d",
    "docker:prod": "docker compose --profile prod up --build -d",
    "docker:stop": "docker compose down",
    "docker:logs:dev": "docker compose logs -f app-dev",
    "docker:logs:staging": "docker compose logs -f app-staging",
    "docker:logs:prod": "docker compose logs -f app-prod",
    "docker:clean": "docker compose down -v --remove-orphans && docker system prune -f",
    "-----------------DOCUMENTATION------------------": "",
    "docs:serve": "swagger-ui-express -f storage/swagger/openapi.json -p 3002",
    "-----------------UTILITIES------------------": "",
    "copyEnv": "node -e \"require('fs').copyFileSync('.env', 'dist/.env')\""
  },
  "keywords": [
    "typescript",
    "nodejs",
    "express",
    "api",
    "template",
    "backend",
    "rest"
  ],
  "author": "VietProDev Team",
  "license": "ISC",
  "dependencies": {
    "@asteasolutions/zod-to-openapi": "^8.5.0",
    "@google-analytics/data": "^5.2.1",
    "bcryptjs": "^3.0.3",
    "bullmq": "^5.76.5",
    "cli-color": "^2.0.4",
    "compression": "^1.8.1",
    "cookie-parser": "^1.4.7",
    "cors": "^2.8.5",
    "dayjs": "^1.11.19",
    "dotenv": "^17.2.3",
    "express": "^4.22.1",
    "express-automatic-routes": "^1.1.0",
    "express-handlebars": "^8.0.1",
    "express-validator": "^7.3.1",
    "file-type": "^19.6.0",
    "handlebars": "^4.7.9",
    "helmet": "^8.1.0",
    "ioredis": "^5.4.1",
    "jsonwebtoken": "^9.0.3",
    "mongodb": "^6.16.0",
    "module-alias": "^2.2.3",
    "multer": "^2.0.2",
    "oidc-provider": "^9.8.4",
    "mustache": "^4.2.0",
    "mv": "^2.1.1",
    "node-schedule": "^2.1.1",
    "nodemailer": "^8.0.7",
    "p-limit": "^7.3.0",
    "pg": "^8.16.3",
    "pnpm": "^10.33.2",
    "prom-client": "^15.1.3",
    "secure-json-parse": "^2.7.0",
    "sequelize": "^6.37.7",
    "sharp": "^0.34.5",
    "sqlite3": "5.1.7",
    "swagger-ui-express": "^5.0.1",
    "ts-import": "5.0.0-beta.1",
    "web-push": "^3.6.7",
    "zod": "^4.4.2",
    "xlsx": "^0.18.5"
  },
  "optionalDependencies": {
    "sequelize-auto": "^0.8.8"
  },
  "devDependencies": {
    "@apidevtools/swagger-parser": "^12.1.0",
    "@commitlint/cli": "^20.2.0",
    "@commitlint/config-conventional": "^20.2.0",
    "@faker-js/faker": "^9.7.0",
    "@types/bcrypt": "^6.0.0",
    "@types/bcryptjs": "^2.4.6",
    "@types/cli-color": "^2.0.6",
    "@types/compression": "^1.8.1",
    "@types/cookie-parser": "^1.4.10",
    "@types/cors": "^2.8.19",
    "@types/express": "^5.0.6",
    "@types/express-handlebars": "^3.1.0",
    "@types/ioredis": "^5.0.0",
    "@types/jest": "^29.5.12",
    "@types/jsonwebtoken": "^9.0.10",
    "@types/module-alias": "^2.0.4",
    "@types/multer": "^2.0.0",
    "@types/mustache": "^4.2.6",
    "@types/mv": "^2.1.4",
    "@types/node": "^24.10.1",
    "@types/node-schedule": "^2.1.8",
    "@types/nodemailer": "^7.0.4",
    "@types/pg": "^8.20.0",
    "@types/sharp": "^0.32.0",
    "@types/supertest": "^6.0.2",
    "@types/swagger-ui-express": "^4.1.8",
    "@types/web-push": "^3.6.4",
    "@typescript-eslint/eslint-plugin": "^8.48.1",
    "@typescript-eslint/parser": "^8.48.1",
    "chalk": "^5.6.2",
    "cross-env": "^10.1.0",
    "esbuild": "^0.27.1",
    "eslint": "^8.57.1",
    "eslint-config-prettier": "^10.1.8",
    "husky": "^9.1.7",
    "jest": "^29.7.0",
    "jest-mock-extended": "^3.0.7",
    "jsonminify": "^0.4.2",
    "lint-staged": "^16.2.7",
    "nconf": "^0.13.0",
    "node-mocks-http": "^1.14.1",
    "nodemon": "^3.1.11",
    "prettier": "^3.7.4",
    "rimraf": "^6.1.2",
    "supertest": "^6.3.4",
    "ts-jest": "^29.1.2",
    "ts-node": "^10.9.2",
    "tsc-alias": "^1.8.17",
    "tsx": "^4.21.0",
    "typescript": "^5.9.3"
  },
  "pnpm": {
    "onlyBuiltDependencies": [
      "protobufjs",
      "sharp",
      "sqlite3",
      "@mapbox/node-pre-gyp"
    ],
    "overrides": {
      "multer": "^2.0.0",
      "glob": "^10.0.0",
      "inflight": "^1.0.6",
      "lodash.get": "^4.4.2",
      "lodash.isequal": "^4.5.0"
    }
  }
}
