The Pot Hole Detector is a web application built using Node.js that enables users to:
- Capture and report potholes with precise location tagging.
- Automatically share pothole information on Twitter to raise awareness.
- Keep track of reported potholes in a user-friendly dashboard.
"Drive change by reporting potholes to ensure safer roads for everyone!"
- ✨ Features
- 🦾 Tech Stack
- 📸 Screenshots
- 🧩 Try the App
- 👨🔧 Setup Instructions
- 📍 API Endpoints
- 🚨 Resource Warning
- 🎯 Target Audience
- 🤝 Contributing
- 🌟 Awesome Contributors
- 📜 License
- 📬 Feedback & Suggestions
- Capture clear images of potholes through user uploads.
- Image Clarity Verification: Prompt users for a re-upload if the image is blurry or unclear.
- GPS Auto-Tagging: Automatically fetch and tag the pothole's GPS coordinates.
- Address Conversion: Convert coordinates into readable addresses using a geolocation API (e.g., Google Maps).
- Manual Location Input: Allow users to input location manually if permissions are denied.
- Automatically create a Twitter post with:
- The pothole image.
- The location (GPS coordinates or address).
- A warning message to alert authorities.
- Users can customize warning messages.
- View the history of reported potholes.
- Track the status of each report (e.g., pending, acknowledged, resolved).
- Backend Framework: Node.js with Express.js
- Database: MongoDB
- Image Storage: Cloudinary or Amazon S3
- Geolocation: Google Maps API for GPS and address lookup
- Social Media Integration: Twitter API for posting
- React Native with expo
Head over to the Releases tab on our GitHub repository to download and install the APK for Android devices. Experience firsthand how the Pot Hole Detector empowers you to report potholes effortlessly!
Or click the download button below:
- Prerequisites
- Node.js (v16.10.0 or higher)
- Expo CLI: Install globally using
npm install -g expo-cli
- Git: For version control
- API Keys:
- Google Maps API: For geolocation and address lookup
- Twitter API: For posting reports
- Cloudinary/Amazon S3: For image storage
-
Clone the Repository
git clone https://github.com/alienx5499/Pot-Hole-Detector.git
-
Navigate to the Project Directory
cd Pot-Hole-Detector
-
Install Dependencies
npm install
-
Set Up APIs
- Obtain API keys for:
- Google Maps API (geolocation and address lookup).
- Twitter API (posting reports).
- Add these keys to a
.env
file:GOOGLE_MAPS_API_KEY=your_google_maps_api_key TWITTER_API_KEY=your_twitter_api_key TWITTER_API_SECRET=your_twitter_api_secret
- Obtain API keys for:
-
Configure Expo Ensure that your app.json or app.config.js is set up correctly with necessary permissions for location and camera access.
-
Run the Application
expo start
- For iOS: Press i to open in the iOS simulator.
- For Android: Press a to open in the Android emulator.
- On Physical Devices: Use the Expo Go app to scan the QR code.
-
Build for Production Use Expo’s build service to create standalone builds:
expo build:android expo build:ios
-
Deployment Deploy the backend server using platforms like Heroku, AWS, or DigitalOcean. For the mobile app, publish to Google Play Store and Apple App Store.
- Prerequisites
- Node.js v16.10.0 or higher
- MongoDB v4.4 or higher
- NPM or Yarn package manager
- At least 1GB of free disk space
- Active internet connection for API integrations
-
Navigate to Backend Directory
cd Pot-Hole-Detector-Backend
-
Install Dependencies
npm install
-
Environment Configuration
- Create a
.env
file in the backend root directory - Copy contents from
.env.example
and fill in your values:MONGO_URL=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key
- Create a
-
Database Setup
- Ensure MongoDB is installed and running
- Create a new MongoDB database
- Add the connection string to your
.env
file
-
Create Upload Directory
mkdir uploads
-
Start Development Server
npm run dev
-
Verify Installation
- The server should be running on
http://localhost:3000
- Test the endpoints:
- Auth:
POST http://localhost:3000/api/v1/auth/signup
- Pothole:
POST http://localhost:3000/api/v1/pothole/upload
- Auth:
- The server should be running on
-
Authentication
- Register new user
POST /api/v1/auth/signup
- Login existing user
POST /api/v1/auth/signin
- Login as guest
POST /api/v1/auth/guest-signin
- Convert guest to regular user
POST /api/v1/auth/convert-guest
- Register new user
-
Pothole Reports
- Upload new pothole report
POST /api/v1/pothole/upload
- Get user dashboard data
GET /api/v1/pothole/dashboard
- Get recent reports
GET /api/v1/pothole/recent-reports
- Get specific report details
GET /api/v1/pothole/report/:id
- Upload new pothole report
This project involves API calls and real-time geolocation processing, which may consume significant server resources. If your server has limited capabilities, ensure:
- Efficient caching mechanisms for frequently used API responses.
- Testing with smaller datasets during the development phase.
Alternatively, use mock data during initial development to simulate production behavior.
- Commuters: Easily report road hazards and improve safety.
- Local Authorities: Gain better insights into road conditions.
- Activists and Environmentalists: Leverage social media to raise awareness about infrastructure issues.
- Developers: Expand the repository with new features or APIs.
We ❤️ open source! Contributions are welcome to make this project even better.
- Fork the repository.
- Create your feature branch.
git checkout -b feature/new-feature
- Commit your changes.
git commit -m "Add a new feature"
- Push to the branch and open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
We value your input! Share your thoughts through GitHub Issues.
💡 Let's work together to improve road safety and awareness!