An analytics platform for optimizing dark store placement across urban areas. Uses machine learning (KMeans clustering, XGBoost) and geospatial analysis to identify optimal locations for new dark stores, predict delivery times, and generate business insights powered by the Gemini API.
city-wide-dark-store-network-projection/
├── api/ # Python ML microservice
│ ├── main.py # FastAPI cluster & delivery prediction
│ ├── locator.py # Store location suggestion engine
│ ├── mistral.py # Gemini-powered impact analysis
│ ├── requirements.txt # Python dependencies
│ ├── kmeans_model.pkl # Trained KMeans model
│ ├── xgboost_model.pkl # Trained XGBoost model
│ ├── scaler.pkl # Feature scaler
│ ├── clustered_orders.csv # Processed order data
│ └── synthetic_orders.csv # Synthetic training data
├── Back/ # Node.js backend
│ ├── server.js # Express server with MySQL
│ ├── locatermodel.js # Location analysis with LLM
│ └── package.json
├── front/ # React frontend
│ ├── public/
│ ├── src/
│ │ ├── App.js # Main routing
│ │ ├── components/
│ │ │ ├── MapComponent.js # Leaflet map with store markers
│ │ │ ├── Navbar.js
│ │ │ ├── Sidebar.js
│ │ │ └── Footer.js
│ │ ├── pages/
│ │ │ ├── LandingPage.js # Public landing page
│ │ │ ├── Login.js # OTP-based authentication
│ │ │ ├── Dashboard.js # Analytics dashboard
│ │ │ ├── MapView.js # Interactive map view
│ │ │ ├── Reports.js # Report generation
│ │ │ ├── StoreAnalytics.js # Per-store analytics
│ │ │ ├── ManageStores.js # Store CRUD operations
│ │ │ └── AdminProfile.js # Admin settings
│ │ ├── styles/ # CSS modules
│ │ └── assets/ # Static images
│ └── package.json
└── README.md
cd api
pip install -r requirements.txt
uvicorn main:app --reload --port 8000
cd Back
npm install
node server.js
The Express server runs on port 3000 (or 5000 depending on configuration).
cd front
npm install
npm start
The React app runs on http://localhost:3000.
Create a MySQL database named hackron (or avishkar_hackron) and set up the required tables for stores, users, and potential store locations.
POST /predict-cluster - Predict order cluster assignmentPOST /predict-delivery-time - Estimate delivery timePOST /suggest-new-stores - Suggest optimal store locationsPOST /analyze-impact - Full impact analysis with business insightsGET /api/stores - Fetch all storesGET /api/stores/count - Get total store countGET /api/possible-stores - Get ML-suggested store locationsPOST /api/login - Login with email/password (triggers OTP)POST /api/verify-otp - Verify email OTPThis project is for educational and research purposes.
Copy .env.example to .env and fill in your configuration:
cp .env.example .env
69 commits
JavaScript
65.4%
CSS
23.5%
Python
9.1%
HTML
2.0%
An analytics platform for optimizing dark store placement across urban areas. Uses machine learning (KMeans clustering, XGBoost) and geospatial analysis to identify optimal locations for new dark stores, predict delivery times, and generate business insights powered by the Gemini API.
city-wide-dark-store-network-projection/
├── api/ # Python ML microservice
│ ├── main.py # FastAPI cluster & delivery prediction
│ ├── locator.py # Store location suggestion engine
│ ├── mistral.py # Gemini-powered impact analysis
│ ├── requirements.txt # Python dependencies
│ ├── kmeans_model.pkl # Trained KMeans model
│ ├── xgboost_model.pkl # Trained XGBoost model
│ ├── scaler.pkl # Feature scaler
│ ├── clustered_orders.csv # Processed order data
│ └── synthetic_orders.csv # Synthetic training data
├── Back/ # Node.js backend
│ ├── server.js # Express server with MySQL
│ ├── locatermodel.js # Location analysis with LLM
│ └── package.json
├── front/ # React frontend
│ ├── public/
│ ├── src/
│ │ ├── App.js # Main routing
│ │ ├── components/
│ │ │ ├── MapComponent.js # Leaflet map with store markers
│ │ │ ├── Navbar.js
│ │ │ ├── Sidebar.js
│ │ │ └── Footer.js
│ │ ├── pages/
│ │ │ ├── LandingPage.js # Public landing page
│ │ │ ├── Login.js # OTP-based authentication
│ │ │ ├── Dashboard.js # Analytics dashboard
│ │ │ ├── MapView.js # Interactive map view
│ │ │ ├── Reports.js # Report generation
│ │ │ ├── StoreAnalytics.js # Per-store analytics
│ │ │ ├── ManageStores.js # Store CRUD operations
│ │ │ └── AdminProfile.js # Admin settings
│ │ ├── styles/ # CSS modules
│ │ └── assets/ # Static images
│ └── package.json
└── README.md
cd api
pip install -r requirements.txt
uvicorn main:app --reload --port 8000
cd Back
npm install
node server.js
The Express server runs on port 3000 (or 5000 depending on configuration).
cd front
npm install
npm start
The React app runs on http://localhost:3000.
Create a MySQL database named hackron (or avishkar_hackron) and set up the required tables for stores, users, and potential store locations.
POST /predict-cluster - Predict order cluster assignmentPOST /predict-delivery-time - Estimate delivery timePOST /suggest-new-stores - Suggest optimal store locationsPOST /analyze-impact - Full impact analysis with business insightsGET /api/stores - Fetch all storesGET /api/stores/count - Get total store countGET /api/possible-stores - Get ML-suggested store locationsPOST /api/login - Login with email/password (triggers OTP)POST /api/verify-otp - Verify email OTPThis project is for educational and research purposes.
Copy .env.example to .env and fill in your configuration:
cp .env.example .env
69 commits
JavaScript
65.4%
CSS
23.5%
Python
9.1%
HTML
2.0%