Commit graph

6 commits

Author SHA1 Message Date
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
FreightDesk
958fd74af5 [OWL] Restore auth.js — keep requireRole middleware (more complete than agent version) 2026-06-07 19:35:34 +00:00
FreightDesk
63e0be75b7 Merge remote-tracking branch 'origin/agent/default/security-improvements' 2026-06-07 19:35:10 +00:00
FreightDesk
5e10afebf1 [OWL] Security fixes: remove hardcoded password, add setup form, soft-delete migration
- Replace hardcoded admin123 with user-defined password via /setup form
- Add proper GET/POST /setup routes
- Create setup.ejs view with password validation (min 6 chars)
- Add migration 003: soft-delete columns (deleted_at) on loads/payments/shippers/vehicles
- Add load_count column to shippers
- requireRole middleware already present in auth.js
2026-06-07 19:34:22 +00:00
Hermes Agent
870a2501eb feat[agent]: add role-based access control to auth middleware
- Modify requireAuth middleware to enforce role filtering
- Prevent unauthorized access to protected routes
2026-06-07 19:29:57 +00:00
FreightDesk
1a4eaaa040 Initial commit: FreightDesk v1.0
- Express + EJS server-rendered app
- Supabase PostgreSQL database
- Auth: username/password with bcrypt
- Dashboard with business stats
- Load CRUD with filters
- WhatsApp message parser
- Payment tracking
- Shipper & vehicle management
- Reports (monthly, top shippers, routes)
- Government-app aesthetic (tricolor theme)
- Dark mode support
- Docker + Coolify deployment ready
- Seed data from existing business ledger (88 loads, 41 shippers, 70 vehicles)
2026-06-07 18:57:24 +00:00