Critical Fixes:
- Registration routes: changed /shipper → /register/shipper, /driver → /register/driver
(was causing 404s — landing page linked to /register/* but routes were /shipper and /driver)
- Registration form actions: fixed to match /register/shipper and /register/driver
- Removed duplicate /payments route mount in server.js (payments.js is escrow, mounted at /escrow)
- Supabase client: now uses service key (falls back to anon key)
- Created missing pages/errors/403.ejs view
Documentation:
- README.md: full project documentation
- .env.example: environment variable template
- .dockerignore: exclude dev files from Docker image
Database:
- Migration 005: SaaS marketplace tables (enhanced shippers, vehicles, loads, bids, negotiations, ratings, notifications, load_views)
Public Registration:
- GET/POST /register/shipper — self-registration with validation
- GET/POST /register/driver — self-registration with vehicle details
- Public landing page with tricolor design
- Auto-login after registration
Marketplace:
- GET /marketplace — browse loads with filters (from, to, type, sort)
- GET /marketplace/load/:id — load detail with bid info
- GET/POST /marketplace/post — post a load (shipper)
- GET /marketplace/notifications — notification center with real-time badge
- GET /marketplace/notifications/count — unread count API
Bidding System:
- POST /marketplace/bid — place a bid (driver)
- POST /marketplace/bid/:id/accept — accept bid (shipper, auto-rejects others)
- POST /marketplace/bid/:id/negotiate — counter-offer
- POST /marketplace/rate — submit rating/review
- Automatic notifications on bid/accept/reject
Views:
- Marketplace index with load cards and bid status
- Load detail with bid form (driver) or bid management (shipper)
- Post load form with full details
- Notification center with mark-read
- Portal header/footer partials for portal layout
Architecture:
- Added portalUser to res.locals
- Wired /marketplace route into server.js
- Landing page at / (redirects to dashboard if logged in)
User confirmed: evolving to full SaaS with shipper/driver self-registration,
load posting, bidding, negotiation. This validates Hermes' architecture direction.
Proposed hybrid: EJS for public pages/admin, React SPA widgets for shipper
and driver dashboards, shared REST API, real-time via Supabase Realtime.
Next: shipper self-registration, driver self-registration, load marketplace,
bidding system, real-time notifications.
WhatsApp Parser v2:
- Pre-processing: normalize whitespace, expand abbreviations (frt→freight, adv→advance, etc.)
- Number format normalization: 1.5L→150000, 50K→50000, 2.5lakhs→250000
- Context-aware amount classification (freight vs advance vs commission vs driver pay)
- Multiple route patterns: 'X to Y', 'X → Y', 'From X to Y', 'X - Y'
- Vehicle number normalization with flexible spacing
- Date extraction (DD/MM/YYYY, DD-MM-YY, 15 Jan 2026)
- Material type and weight extraction
- Auto-calculate commission (5% default or freight - driver rate)
- Auto-calculate pending amounts
- Confidence scoring (high/medium/low)
- POST /api/parse-whatsapp endpoint
- GET /api/parser/test with sample messages
Mobile Responsiveness:
- Hamburger menu button on mobile
- Slide-in sidebar overlay
- Responsive stats grid (4→2→1 columns)
- Stacked filters and form rows on small screens
- Full-width action buttons
- Smaller login container on mobile
- Horizontal scroll for tables
- Pagination stacking on small screens
Hermes is building a freight marketplace (1000+ users, bidding, WebSocket, live tracking).
We're building for a single Kerala freight agent (loads, payments, client portal, invoices).
These are fundamentally different products. My commitment: build what the user actually needs.
Stop redefining scope without user confirmation.
REST API (/api):
- Full CRUD for loads, shippers, vehicles, payments
- Dashboard stats endpoint (/api/stats)
- Pagination, filtering, sorting on all list endpoints
- Role-based access control on write operations
- Soft delete support
Portal User Management (/portal-users):
- Admin UI to create shipper/driver portal accounts
- Link portal users to existing shippers/drivers
- Enable/disable accounts
- Reset passwords
- Lists all portal accounts with status
Architecture decision documented: keeping EJS+React CDN widgets as primary
- Agree: hybrid instinct is right, shared service layer is good
- Disagree: SPA overkill for single-agent freight business
- Disagree: Hermes' analysis omits security, feature loss, code bugs
- Recommendation: Keep EJS + React CDN widgets (done, works, right for scope)
- Document full back-and-forth in AGENT_COMMS.md
From Hermes' agent/default/soft-delete-audit branch:
- Add migration 004_audit_logging.sql (audit_logs table, trigger function,
triggers on loads/shippers/vehicles/payments/portal_users,
set_audit_user() helper function)
- Improved: uses IF NOT EXISTS, AFTER triggers, user session context var,
distinguishes SOFT_DELETE vs HARD_DELETE, notes field
New:
- GET /audit-logs (admin-only, filterable by table/action, paginated)
- GET /audit-logs/:id (detail view with before/after JSON)
- Audit Logs link in sidebar
Keeps all existing OWL code: CI/CD, Pino, Prometheus, tests, cache-busting,
debounced search, ESLint, Prettier