How prakashjhax/loadconnectx78 works
Project type and purpose
• LoadConnect is a full-stack web application (capstone logistics platform) that connects vehicle owners, rural producers, and buyers for efficient load bookings and return-trip optimization.
File structure
• Top-level “loadconnect-frontend” contains static HTML, CSS, JS assets plus map integration files.
• “loadconnect-backend” is a modular Express.js service with subfolders:
• controllers (business logic per resource)
• routes (Express route definitions)
• middlewares (authentication, file uploads)
• utils (validation)
• gps, public, uploads (static assets & HTML endpoints)
• db.js (DB connection) and server.js (app entry point)
• Presence of JWT, Multer, Twilio, dotenv in package.json indicates authentication, file-upload, SMS OTP, environment config.
README for additional insights
• Frontend uses HTML/CSS/JS, Google Maps API, Leaflet.js + OSRM.
• Backend uses Node.js/Express, JWT, bcrypt, Twilio, MySQL (dev) → PostgreSQL (prod).
• Key modules: authentication, load posting, quoting, booking, tracking, document uploads.
Main components & interactions
a. Frontend (Web UI)
• HTML pages, JS controllers call REST endpoints
• /UI components (Google Maps, Leaflet/OSRM)
b. Backend API server
• Authentication module (JWT + Twilio OTP)
• Load & vehicle posting module
• Quotation & booking module
• Tracking & distance calculation (calls OSRM)
• File‐upload & validation middleware
• Database access (db.js → MySQL/PostgreSQL) via SQL queries
c. Database
• Relational schema (users, loads, vehicles, bookings, quotations, documents)
d. External services
• Twilio (OTP SMS)
• Google Maps API / Leaflet + OSRM (route & distance)
Architectural patterns & design principles
• Modular Express structure: separate route definitions, controllers, and middleware
• MVC-style separation: Controllers handle business logic; routes map HTTP to controllers
• Stateless RESTful API with JWT for session management
• Layered architecture: Presentation (frontend) → API layer → Data layer