A comprehensive B2B supply chain management platform that connects suppliers and vendors, enabling efficient surplus exchange, product management, and delivery tracking.
- Overview
- Features
- Technology Stack
- Project Structure
- Installation & Setup
- API Documentation
- User Roles & Permissions
- Key Features Breakdown
- Screenshots
- Contributing
- License
Supply Setu is a modern web application designed to streamline supply chain operations between suppliers and vendors. The platform facilitates surplus material exchange, product cataloging, real-time delivery tracking, and comprehensive transaction management.
- Connect Suppliers & Vendors: Seamless marketplace for B2B transactions
- Reduce Waste: Efficient surplus material exchange system
- Optimize Logistics: Real-time delivery tracking and management
- Streamline Operations: Comprehensive dashboard for all stakeholders
- Multi-role Authentication: Supplier and Vendor role-based access
- Secure Login/Register: JWT-based authentication with bcrypt password hashing
- Profile Management: Comprehensive user profiles with business information
- Role-based Navigation: Dynamic navigation based on user permissions
- Product Catalog Management: Create, edit, and manage product listings
- Inventory Tracking: Real-time stock quantity monitoring
- Order Management: Track and manage incoming orders
- Delivery Creation: Create and manage delivery schedules
- Analytics Dashboard: Sales performance and order analytics
- Surplus Exchange: Post and browse surplus materials
- Supplier Marketplace: Browse and order from supplier catalogs
- Transaction History: Complete transaction tracking
- Analytics: Business performance insights
- Real-time Notifications: Order status and surplus booking alerts
- Real-time Tracking: Live delivery status updates
- Delivery Logs: Comprehensive delivery history
- Status Management: Update delivery statuses
- Route Optimization: Efficient delivery planning
- Razorpay Integration: Secure payment processing
- Transaction Management: Complete payment history
- Booking System: Reserve surplus materials and products
- Real-time Alerts: Order status, surplus bookings, delivery updates
- Email Notifications: Automated email alerts
- Push Notifications: In-app notification system
- Dashboard Analytics: Performance metrics and insights
- Transaction Reports: Detailed transaction history
- Business Intelligence: Data-driven insights for decision making
- React 19.1.0: Modern React with hooks and functional components
- Vite: Fast build tool and development server
- Tailwind CSS: Utility-first CSS framework
- React Router DOM: Client-side routing
- Redux Toolkit: State management
- GSAP: Advanced animations and transitions
- Axios: HTTP client for API communication
- Node.js: JavaScript runtime
- Express.js: Web application framework
- MongoDB: NoSQL database
- Mongoose: MongoDB object modeling
- JWT: JSON Web Token authentication
- bcryptjs: Password hashing
- Multer: File upload handling
- Nodemailer: Email service
- Razorpay: Payment gateway integration
- Node-cron: Scheduled tasks
- ESLint: Code linting
- PostCSS: CSS processing
- Autoprefixer: CSS vendor prefixing
hackathon/
βββ backend/ # Backend API server
β βββ config/ # Configuration files
β β βββ db.js # Database configuration
β β βββ razorpay.js # Payment gateway config
β βββ controllers/ # Route controllers
β β βββ authController.js # Authentication logic
β β βββ productController.js # Product management
β β βββ vendorController.js # Vendor operations
β β βββ supplierController.js # Supplier operations
β β βββ deliveryController.js # Delivery management
β β βββ surplusController.js # Surplus exchange
β β βββ transactionController.js # Transaction handling
β β βββ paymentController.js # Payment processing
β β βββ bookingController.js # Booking system
β β βββ dashboardController.js # Analytics
β β βββ profileController.js # User profiles
β β βββ deliveryLogController.js # Delivery logs
β βββ middleware/ # Custom middleware
β β βββ authMiddleware.js # JWT authentication
β βββ models/ # Database models
β β βββ User.js # User schema
β β βββ Product.js # Product schema
β β βββ SurplusPost.js # Surplus post schema
β β βββ Transaction.js # Transaction schema
β β βββ Delivery.js # Delivery schema
β β βββ Booking.js # Booking schema
β β βββ ... # Other models
β βββ routes/ # API routes
β β βββ authRoutes.js # Authentication routes
β β βββ productRoutes.js # Product routes
β β βββ vendorRoutes.js # Vendor routes
β β βββ supplierRoutes.js # Supplier routes
β β βββ deliveryRoutes.js # Delivery routes
β β βββ surplusRoutes.js # Surplus routes
β β βββ transactionRoutes.js # Transaction routes
β β βββ paymentRoutes.js # Payment routes
β β βββ ... # Other route files
β βββ utils/ # Utility functions
β β βββ emailService.js # Email functionality
β β βββ expiryScheduler.js # Expiry notifications
β β βββ dailyBroadcast.js # Daily notifications
β βββ scheduler/ # Scheduled tasks
β β βββ expiryReminder.js # Expiry reminders
β βββ index.js # Main server file
βββ frontend/ # React frontend application
β βββ public/ # Static assets
β β βββ logo.png # Application logo
β β βββ poster.png # Marketing materials
β β βββ ... # Other assets
β βββ src/ # Source code
β β βββ Components/ # Reusable components
β β β βββ Navbar.jsx # Navigation component
β β β βββ Footer.jsx # Footer component
β β β βββ ProtectedRoute.jsx # Route protection
β β β βββ NotificationSystem.jsx # Notifications
β β βββ context/ # React context
β β β βββ AuthContext.jsx # Authentication context
β β β βββ useAuth.js # Auth hook
β β βββ pages/ # Page components
β β β βββ Home.jsx # Landing page
β β β βββ AuthPage.jsx # Authentication page
β β β βββ Dashboard.jsx # Main dashboard
β β β βββ Products.jsx # Product catalog
β β β βββ CreateProduct.jsx # Product creation
β β β βββ Profile.jsx # User profile
β β β βββ vendor/ # Vendor-specific pages
β β β β βββ Analytics.jsx # Vendor analytics
β β β β βββ AddSurplus.jsx # Surplus posting
β β β β βββ SurplusExchange.jsx # Surplus marketplace
β β β β βββ SupplierMarketplace.jsx # Supplier catalog
β β β β βββ TransactionHistory.jsx # Transaction history
β β β βββ Supplier/ # Supplier-specific pages
β β β βββ Dashboard.jsx # Supplier dashboard
β β β βββ CreateDelivery.jsx # Delivery creation
β β β βββ Profile.jsx # Supplier profile
β β βββ api.js # API configuration
β β βββ store.js # Redux store
β β βββ main.jsx # Application entry point
β βββ package.json # Frontend dependencies
β βββ vite.config.ts # Vite configuration
βββ README.md # Project documentation
- Node.js (v16 or higher)
- MongoDB (v4.4 or higher)
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd hackathon
-
Install backend dependencies
cd backend npm install -
Environment Configuration Create a
.envfile in the backend directory:PORT=5001 MONGO_URI=mongodb://localhost:27017/surplushub JWT_SECRET=your_jwt_secret_key RAZORPAY_KEY_ID=your_razorpay_key_id RAZORPAY_KEY_SECRET=your_razorpay_secret EMAIL_USER=[email protected] EMAIL_PASS=your_email_password
-
Start the backend server
npm run dev
-
Install frontend dependencies
cd frontend npm install -
Environment Configuration Create a
.envfile in the frontend directory:VITE_BACKEND_BASE_URL=http://localhost:5001
-
Start the frontend development server
npm run dev
-
Start MongoDB
mongod
-
Create database The application will automatically create the database and collections on first run.
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update user profile
GET /api/products- Get all productsPOST /api/products- Create new productGET /api/products/:id- Get product by IDPUT /api/products/:id- Update productDELETE /api/products/:id- Delete product
GET /api/surplus- Get all surplus postsPOST /api/surplus- Create surplus postGET /api/surplus/:id- Get surplus post by IDPUT /api/surplus/:id- Update surplus postDELETE /api/surplus/:id- Delete surplus post
GET /api/transactions- Get all transactionsPOST /api/transactions- Create transactionGET /api/transactions/:id- Get transaction by IDPUT /api/transactions/:id- Update transaction status
GET /api/delivery- Get all deliveriesPOST /api/delivery- Create deliveryGET /api/delivery/:id- Get delivery by IDPUT /api/delivery/:id/status- Update delivery status
POST /api/payment/create-order- Create payment orderPOST /api/payment/verify- Verify paymentGET /api/payment/history- Get payment history
- Product Management: Create, edit, and manage product listings
- Inventory Control: Monitor stock levels and update quantities
- Order Processing: View and process incoming orders
- Delivery Management: Create and track deliveries
- Analytics: View sales performance and order analytics
- Surplus Exchange: Post and browse surplus materials
- Marketplace Access: Browse supplier catalogs and place orders
- Transaction History: View complete transaction records
- Analytics: Access business performance insights
- Booking System: Reserve surplus materials and products
- JWT-based authentication with secure token management
- Role-based access control for suppliers and vendors
- Password hashing using bcrypt for security
- Session management with automatic token refresh
- Comprehensive product catalog with categories and specifications
- Image upload support for product photos
- Inventory tracking with real-time stock updates
- Pricing management with flexible pricing models
- Product status management (active/inactive)
- Material posting with expiry dates and pricing
- Booking system for surplus materials
- Real-time availability tracking
- Location-based surplus discovery
- Automatic expiry notifications
- Real-time tracking with status updates
- Delivery logs for complete history
- Route optimization suggestions
- Status notifications to all parties
- Proof of delivery documentation
- Razorpay integration for secure payments
- Multiple payment methods support
- Transaction history with detailed records
- Payment verification and confirmation
- Refund processing capabilities
- Real-time alerts for order updates
- Email notifications for important events
- Push notifications for mobile users
- Customizable notification preferences
- Scheduled reminders for expiring items
- Sales performance metrics
- Order analytics and trends
- Inventory insights and recommendations
- Customer behavior analysis
- Revenue tracking and reporting
- Responsive design that works on all devices
- Clean and professional interface
- Intuitive navigation with role-based menus
- Consistent branding throughout the application
- GSAP animations for smooth transitions
- Interactive elements with hover effects
- Loading states for better user experience
- Smooth scrolling and page transitions
- Role-based dashboards tailored to user needs
- Quick actions for common tasks
- Search and filtering capabilities
- Bulk operations for efficient management
- JWT authentication with secure token storage
- Password hashing using bcrypt
- Input validation and sanitization
- CORS configuration for API security
- Rate limiting to prevent abuse
- Secure file uploads with validation
The application is fully responsive and optimized for:
- Desktop computers (1920px and above)
- Laptops (1366px - 1919px)
- Tablets (768px - 1365px)
- Mobile phones (320px - 767px)
- Set up environment variables for production
- Configure MongoDB Atlas or production database
- Set up SSL certificates
- Deploy to platforms like Heroku, AWS, or DigitalOcean
- Build the production version:
npm run build - Deploy to platforms like Vercel, Netlify, or AWS S3
- Configure environment variables for production
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and commit:
git commit -m 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Tech Hustlers