Retail supply chains often suffer from limited visibility, reactive inventory management, and inefficiencies in last-mile delivery. Stockouts or overstock situations lead to revenue loss and customer dissatisfaction. Additionally, traditional logistics models lack predictive capabilities, which hinders timely decision-making and resource optimization.
We propose Smart Retail Supply Chain Orchestrator (SRSCO) – an intelligent platform that provides real-time inventory tracking, predictive replenishment, and last-mile delivery optimization using emerging technologies like IoT, AI, and cloud dashboards. The system monitors product movement from warehouse to store shelf, forecasts demand using machine learning, and generates the most efficient delivery routes. Retail managers get a unified dashboard with live alerts and actionable insights, enabling proactive and cost-effective supply chain decisions.
- Inventory Management: Track stock levels, set reorder thresholds, and view smart status indicators (e.g., low stock alerts).
- Analytics Dashboard: Real-time visualizations of inventory trends, movement, and bottlenecks.
- Simulated IoT Feed: Push sample sensor data (e.g., stock movement, temperature) into Firebase Realtime Database to mimic real-world tracking.
- Last-Mile Delivery Optimizer: Add and manage delivery requests with location inputs and get optimized drop routes (mock logic initially).
- Gemini AI Chatbot Assistant: Conversational interface that allows users to ask questions like “What products are low in stock?” or “Show me the delivery status today.”
- Firebase Powered: Uses Firebase Auth, Firestore, Realtime Database, and Firebase Hosting for a complete full-stack experience.
- Scalable Architecture: Built to be easily extended with real IoT sensors, maps API, or ML forecasting engines.
- Increases supply chain visibility and responsiveness.
- Reduces stockouts and overstocking with predictive insights.
- Improves efficiency in last-mile delivery planning.
- Empowers non-technical staff to interact with the system through AI.
- Frontend Framework: Next.js (with the App Router) and React
- Language: TypeScript
- Styling: Tailwind CSS with shadcn/ui for components
- Data Visualization: Recharts
- AI Integration: Google's Genkit and the Gemini API
- Backend & Database: Firebase (Authentication, Realtime Database)
- Node.js (v18 or later)
- npm
- A Firebase project
- A Gemini API Key
-
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name -
Install dependencies:
npm install
-
Set up your environment variables:
- Create a file named
.env.localin the root of the project. - Add your Firebase and Gemini API keys to this file. You can get your Firebase config from your Firebase project settings.
# Firebase Configuration NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-auth-domain NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-storage-bucket NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id NEXT_PUBLIC_FIREBASE_APP_ID=your-app-id # Gemini API Key GEMINI_API_KEY=YOUR_GEMINI_API_KEY
- Create a file named
You will need to run two processes in separate terminals.
-
Start the Next.js development server:
npm run dev
The application will be available at
http://localhost:3000. -
Start the Genkit development server:
npm run genkit:dev
This will start the Genkit development UI, where you can inspect and run your AI flows.
.
├── docs/
│ └── images/ # Screenshots and other images
├── public/ # Static assets
├── src/
│ ├── ai/ # Genkit AI flows and configuration
│ ├── app/ # Next.js App Router pages
│ ├── components/ # Reusable React components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility functions and Firebase config
│ └── ...
├── next.config.ts # Next.js configuration
├── package.json # Project dependencies and scripts
└── README.md # This file
This project is licensed under the MIT License - see the LICENSE file for details.
