freightdesk/webapp/package.json
FreightDesk 8ae3b403ab [OWL] Roadmap batch: CI/CD, observability, testing, UX polish
CI/CD:
- Add .github/workflows/deploy.yml (lint, test, build Docker, Coolify deploy)

Observability:
- Add Pino logger (services/logger.js) — structured JSON logging
- Add Prometheus metrics (services/metrics.js) — /metrics endpoint
- Replace console.error with pino in error handler
- Track http_request_duration, http_requests_total, active_loads, total_commission

Testing:
- Add Jest config to package.json
- Add integration tests (tests/integration/app.test.js) — health, metrics, auth, 404
- Add unit tests (tests/unit/utils.test.js) — formatINR, getStatusColor, calcCommission, WhatsApp parser
- Add devDeps: jest, supertest, eslint, prettier

UX:
- Debounced search (400ms) on Loads list page
- Cache-busting asset versioning (?v=timestamp) on CSS/JS includes
- ESLint + Prettier configs

Package updates:
- Add pino, pino-http, prom-client to dependencies
- Add jest, eslint, prettier, supertest, nodemon to devDependencies
2026-06-07 19:46:45 +00:00

48 lines
1.3 KiB
JSON

{
"name": "freightdesk",
"version": "1.0.0",
"description": "FreightDesk — Freight Forwarding Commission Agent Management",
"main": "src/server.js",
"scripts": {
"start": "node src/server.js",
"dev": "nodemon src/server.js",
"test": "jest --forceExit --detectOpenHandles",
"test:unit": "jest tests/unit --forceExit",
"test:integration": "jest tests/integration --forceExit --detectOpenHandles",
"lint": "eslint src/ --ext .js --max-warnings 0",
"format": "prettier --write 'src/**/*.js' 'src/**/*.ejs' 'src/**/*.css'"
},
"dependencies": {
"@supabase/supabase-js": "^2.39.0",
"bcryptjs": "^2.4.3",
"compression": "^1.7.4",
"cookie-parser": "^1.4.6",
"dotenv": "^16.3.1",
"ejs": "^3.1.9",
"express": "^4.18.2",
"express-rate-limit": "^7.1.5",
"express-session": "^1.17.3",
"helmet": "^7.1.0",
"pino": "^8.17.0",
"pino-http": "^9.0.0",
"prom-client": "^15.1.0"
},
"devDependencies": {
"eslint": "^8.56.0",
"jest": "^29.7.0",
"nodemon": "^3.0.2",
"prettier": "^3.1.1",
"supertest": "^6.3.3"
},
"jest": {
"testEnvironment": "node",
"coverageDirectory": "coverage",
"collectCoverageFrom": [
"src/**/*.js",
"!src/server.js"
],
"testMatch": [
"tests/**/*.test.js"
]
}
}