Pothole Spotter is an AI-powered web app that detects, classifies, and visualizes potholes on Kenyan roads. Users upload road images with geo-coordinates, and the system identifies potholes using Azure Custom Vision, displaying results on an interactive map.
- Upload road images with GPS data
- AI-based classification using Azure Custom Vision
- Visualize potholes on a Leaflet map with severity markers
- View details on marker click (image, status, timestamp)
- Define road stretches and analyze multiple images
- Frontend: React, Leaflet, TailwindCSS
- Backend: Node.js, Express.js
- AI/ML: Azure Custom Vision (image classification)
- Database: MySQL (smartroads > detections table)
- Storage: Static file server / cloud for image uploads
pothole-spotter/
├── client/ # React frontend
│ └── src/
├── server/ # Express backend
│ └── uploads/ # Uploaded image storage
├── database/ # SQL scripts / schema
├── .env # Environment variables
├── README.md # You’re here 😎-
Clone the repo
https://github.com/PotholePatrol/pothole-spotter.git From the branch called Vi_brants_fix
-
Create environment file
- Copy
.env.exampleto.envand fill in your details.
- Copy
-
Set up MySQL Database
- Make sure MySQL is running.
- Run this command to create the
smartroadsdatabase anddetectionstable:mysql -u root -p < smartroads_schema.sql
-
Install dependencies
npm install
-
Run the server
npm start
- Node.js
- MySQL
- Azure Custom Vision account
cd server
npm install
node index.jscd client
npm install
npm start- Duplicate
.env.exampleand rename it to.env - Fill in your actual keys and DB credentials
- Do NOT commit the real
.envfile
AZURE_ENDPOINT=https://<your-endpoint>.cognitiveservices.azure.com/
AZURE_PREDICTION_KEY=<your-key>
PORT=5000- Admin dashboard for stats and management
- Export detection data (CSV/PDF)
- User authentication (optional)
- Mobile-first UI revamp
PRs are welcome! If you're vibing with the vision, fork the repo, make changes, and drop that pull request 🔥
MIT License © 2025 Steven Muiruri

