How samshersingh1/logistics-supply-tracking works
Project type and purpose
• This is a full-stack web application for a logistics supply chain management system.
• Frontend: React.js + Tailwind CSS; Backend: Node.js + Express; Database: MongoDB; File storage: Pinata/IPFS (and Cloudinary in config).
• Core feature: secure OTP-based product handoffs between seller, multiple middlemen, and buyer, with role-based access and real-time status tracking.
File structure
• Top-level directories:
• Backend/ – Express monolith with MVC-style organization:
– config/ (DB, Cloudinary)
– controllers/ (authController, orderController, productController)
– routes/ (AuthRoutes, orderRoutes, productRoutes)
– middleware/ (authMiddleware, errorHandling, fileUpload)
– models/ (User, Order, Product)
– utils/ (AsyncHandling, CloudinaryConfig, ResponseHandling, logger)
– index.js, route.js as the main entry and router aggregator
• fronted/ – React app (note the typo) with:
– public/ (static HTML, manifest)
– src/ (App.js, components, pages, context, styles, assets)
• Notice: separate context for authentication, protected routes, and domain pages (AddProduct, Orders, Transactions, etc.)
README for additional insights
• Flow: seller → generateTransferOTP → send OTP → middleman → verifyOtp → confirmTransfer → next node, etc.
• Roles: Seller, Middleman(s), Delivery Admin, Buyer
• External services: Pinata for file storage; MongoDB as persistence; JWT + cookies for auth; OTP logic internal REST endpoints.