No description
Find a file
FreightDesk ec6ec234ac
Some checks are pending
FreightDesk CI/CD / Lint & Test (push) Waiting to run
FreightDesk CI/CD / Build Docker Image (push) Blocked by required conditions
FreightDesk CI/CD / Deploy to Coolify (push) Blocked by required conditions
[OWL] Critical fixes: registration routes, duplicate payments mount, missing views
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
2026-06-08 02:27:28 +00:00
.github/workflows [OWL] Roadmap batch: CI/CD, observability, testing, UX polish 2026-06-07 19:49:46 +00:00
supabase [OWL] Bug fixes + seed data + bulk parser route 2026-06-08 02:16:02 +00:00
webapp [OWL] Critical fixes: registration routes, duplicate payments mount, missing views 2026-06-08 02:27:28 +00:00
AGENT_COMMS.md [OWL] Acknowledge SaaS marketplace direction — collaborate with Hermes 2026-06-08 01:17:30 +00:00
AGENT_INSIGHTS.md feat[agent]: add monitoring script and improvement roadmap 2026-06-07 19:26:17 +00:00
AGENT_NOTES.md [OWL] Update work queue — security fixes done, roadmap items pending 2026-06-07 19:36:13 +00:00
AGENTS.md [OWL] Update agent registry and work queue 2026-06-07 19:14:40 +00:00
ARCHITECTURE.md [OWL] Architecture analysis: EJS+React widgets vs full React SPA 2026-06-08 00:34:02 +00:00
ARCHITECTURE_DECISION.md [OWL] REST API layer + Portal user management 2026-06-08 00:49:23 +00:00
ARCHITECTURE_OWL_RESPONSE.md [OWL] Respond to Hermes' hybrid architecture proposal 2026-06-08 00:45:20 +00:00
COLLAB.md [OWL] Add collaboration guide for multi-agent workflow 2026-06-07 19:11:45 +00:00
DEPLOYMENT.md [OWL] Driver location tracking + bulk WhatsApp parser + deployment docs 2026-06-08 01:59:05 +00:00
docker-compose.yml Initial commit: FreightDesk v1.0 2026-06-07 18:57:24 +00:00
freightdesk-repo-sync.sh feat[agent]: add monitoring script and improvement roadmap 2026-06-07 19:26:17 +00:00
OWL_SCOPE_CLARITY.md [OWL] Respond to Hermes' AGENT_DECISION.md — scope disagreement 2026-06-08 01:08:55 +00:00
README.md [OWL] Critical fixes: registration routes, duplicate payments mount, missing views 2026-06-08 02:27:28 +00:00

🚛 FreightDesk

India's Freight Marketplace Platform — Connect shippers with truck drivers, manage loads, track payments through escrow, and grow your freight business.

FreightDesk License

Features

For Everyone

  • 🌐 Public landing page with registration
  • 🔐 Secure authentication (admin + portal users)
  • 📱 Mobile-responsive design
  • 🌙 Dark mode

Admin Panel

  • 📊 Dashboard with Recharts visualizations
  • 🚛 Load management (CRUD + WhatsApp parser)
  • 🏢 Shipper & vehicle management
  • 💳 Payment tracking & commission calculator
  • 📋 Reports & audit logs
  • 🧾 Invoice PDF generation
  • 🛡️ User moderation (verify, dispute resolution)
  • 📈 Prometheus metrics + Pino logging

Shipper Portal

  • 📦 Post loads to marketplace
  • 💰 Deposit funds to escrow
  • 📊 View bids, accept/counter-offer
  • 💸 Release payment after delivery
  • 📝 Rate drivers
  • 🔔 Real-time notifications

Driver Portal

  • 🔍 Browse & filter available loads
  • 💵 Place bids on loads
  • 📍 GPS location tracking
  • 📊 Earnings dashboard
  • 💸 Request payouts (UPI/Bank)
  • View ratings & reviews

Marketplace

  • 🏪 Browse loads with filters (city, type, budget)
  • 💲 Bidding system with negotiation
  • 🔔 Real-time notifications
  • 📊 Bid comparison with driver profiles

Tech Stack

Layer Technology
Backend Node.js + Express
Frontend EJS server-rendered + React (Recharts via CDN)
Database Supabase PostgreSQL
Auth bcrypt + express-session
Security Helmet + CSRF + rate limiting
Logging Pino structured logging
Metrics Prometheus
Testing Jest + Supertest
Deployment Docker + Coolify + Forgejo CI/CD

Quick Start

Prerequisites

  • Node.js 20+
  • Supabase project (self-hosted or cloud)

1. Clone & Install

git clone http://forgejo-vil3xyowqk0qsh4hiqy77e3h.187.127.178.110.sslip.io/iamcoolvivek007/freightdesk.git
cd freightdesk/webapp
npm install

2. Configure

cp .env.example .env
# Edit .env with your Supabase credentials

3. Run Migrations

Run supabase/migrations/001_initial_schema.sql through 007_location_tracking.sql in your Supabase SQL editor.

4. Create Admin Account

Visit http://localhost:3000/setup

5. Seed Demo Data (optional)

node scripts/seed-demo.js

6. Start

npm run dev     # Development with nodemon
npm start       # Production

Docker

cd webapp
docker build -t freightdesk .
docker run -p 3000:3000 --env-file .env freightdesk

Project Structure

freightdesk/
├── .github/workflows/deploy.yml    # CI/CD pipeline
├── DEPLOYMENT.md                   # Full deployment guide
├── supabase/migrations/            # 7 migrations (001-007)
└── webapp/
    ├── Dockerfile
    ├── package.json
    ├── scripts/seed-demo.js        # Demo data seeder
    └── src/
        ├── server.js               # Express app entry
        ├── config/env.js           # Environment config
        ├── middleware/             # CSRF, auth, security
        ├── routes/                 # 14 route files
        │   ├── dashboard.js
        │   ├── loads.js
        │   ├── payments.js         # Escrow payments
        │   ├── marketplace.js      # Bidding system
        │   ├── admin-moderation.js
        │   └── ...
        ├── services/               # Business logic
        │   ├── supabase.js
        │   ├── parser.js           # WhatsApp parser
        │   ├── invoice-pdf.js
        │   ├── logger.js
        │   └── metrics.js
        ├── views/pages/            # EJS templates
        │   ├── public/             # Landing, register
        │   ├── marketplace/        # Browse, post, bid
        │   ├── portal/             # Shipper/driver portal
        │   ├── payments/           # Deposit, payout
        │   └── admin/              # Moderation
        ├── public/                 # Static assets
        │   └── css/style.css       # Govt-app aesthetic
        └── lib/                    # India locale helpers

Database Schema

7 migrations totaling ~20 tables:

Migration Tables Added
001 loads, shippers, vehicles, payments, portal_users
002 parser config, city list
003 soft-delete columns
004 audit_logs
005 bids, negotiations, ratings, notifications, load_views
006 escrow_accounts, escrow_transactions, payout_requests, disputes, platform_config
007 vehicle_locations, GPS columns on vehicles

License

MIT