How atharv290/greenxlogics works
GreenLogix connects shippers and transporters through role-based logistics management and AI-assisted freight matching. The principal workflow is creating a shipment or registering a truck, persisting it, requesting recommendations, and presenting match and fleet/shipment views; transporters can confirm assignments. The map also includes authentication and dashboard capabilities documented by the README. Relationships among sampled backend and matching modules are evidenced by excerpts; some frontend internals and integrations are unsampled, so their connections are intentionally limited.
Main entry points: routes.tsx Role routes · app.js Express application · aiTriggerService.js Matching orchestration · db.js PostgreSQL pool
Components 27
Web application
- Web app
Frontend/src/app/App.tsx - Role routes
Frontend/src/app/routes.tsx - Login and signup
Frontend/src/app/pages/LoginPage.tsx - Shipper dashboard
Frontend/src/app/pages/ShipperDashboard.tsx - Transporter dashboard
Frontend/src/app/pages/TransporterDashboard.tsx - Shipment views
Frontend/src/app/pages/AllShipments.tsx - Fleet views
Frontend/src/app/pages/AllFleets.tsx - AI matching view
Frontend/src/app/pages/AIMatchingView.tsx - New shipment form
Frontend/src/app/components/NewShipmentModal.tsx - New truck form
Frontend/src/app/components/NewTruckAdding.tsx - Truck assignments
Frontend/src/app/components/TruckShipmentsModal.tsx
Backend API
- Express application
Backend/src/app.js - Authentication routes
Backend/src/routes/auth.routes.js - Authentication
Backend/src/controllers/auth.controller.js - Token authorization
Backend/src/middleware/auth.middleware.js - Shipment routes
Backend/src/routes/shipments.routes.js - Shipment operations
Backend/src/controllers/shipment.controller.js - Transporter routes
Backend/src/routes/transporters.routes.js - Truck operations
Backend/src/controllers/addTruck.controller.js
Persistence
- User records
Backend/src/models/user.model.js - Shipment records
Backend/src/models/shipments.model.js - Truck and assignments
Backend/src/models/truck.model.js - PostgreSQL pool
Backend/src/config/db.js
AI matching
- Matching orchestration
Backend/src/services/aiTriggerService.js - Matching endpoint
AIServices/app.py - Recommendation engine
AIServices/engin.py
Other components
- Logistics user
Connections 29
- Logistics user → Web app: uses
README.md - Web app → Role routes: provides routes
Frontend/src/app/App.tsx - Role routes → Login and signup: routes to
Frontend/src/app/routes.tsx - Role routes → Shipper dashboard: routes to
Frontend/src/app/routes.tsx - Role routes → Transporter dashboard: routes to
Frontend/src/app/routes.tsx - Role routes → Shipment views: routes to
Frontend/src/app/routes.tsx - Role routes → Fleet views: routes to
Frontend/src/app/routes.tsx - Role routes → AI matching view: routes to
Frontend/src/app/routes.tsx - Shipper dashboard → New shipment form: renders
Frontend/src/app/pages/ShipperDashboard.tsx - Transporter dashboard → New truck form: renders
Frontend/src/app/pages/TransporterDashboard.tsx - Fleet views → Truck assignments: renders
Frontend/src/app/pages/AllFleets.tsx - Express application → Authentication routes: mounts
Backend/src/app.js - Express application → Shipment routes: mounts
Backend/src/app.js - Express application → Transporter routes: mounts
Backend/src/app.js - Express application → Token authorization: protects routes
Backend/src/app.js - Authentication routes → Authentication: dispatches
Backend/src/routes/auth.routes.js - Authentication → User records: reads and creates
Backend/src/controllers/auth.controller.js - Shipment routes → Shipment operations: dispatches
Backend/src/routes/shipments.routes.js - Shipment operations → Shipment records: creates and reads
Backend/src/controllers/shipment.controller.js - Shipment operations → Matching orchestration: triggers matching
Backend/src/controllers/shipment.controller.js - Transporter routes → Truck operations: dispatches
Backend/src/routes/transporters.routes.js - Truck operations → Truck and assignments: manages trucks
Backend/src/controllers/addTruck.controller.js - Truck operations → Matching orchestration: triggers matching
Backend/src/controllers/addTruck.controller.js - User records → PostgreSQL pool: uses pool
Backend/src/models/user.model.js - Shipment records → PostgreSQL pool: uses pool
Backend/src/models/shipments.model.js - Truck and assignments → PostgreSQL pool: uses pool
Backend/src/models/truck.model.js - Matching orchestration → PostgreSQL pool: queries and stores matches
Backend/src/services/aiTriggerService.js - Matching orchestration → Matching endpoint: posts match inputs
Backend/src/services/aiTriggerService.js - Matching endpoint → Recommendation engine: runs matching
AIServices/app.py