OpenPothole (A project under Open India Initiative) is a minimalist, community-driven pothole reporting platform for Bangalore, inspired by the Open311 API standard. It enables anyone to report potholes without login, see them on a public map, and verify fixes through community participation. The goal is radical transparency, mobile-first UX, and GenβZ friendly design. [ Project Demo ]
Built with Next.js + TypeScript, Tailwind, Leaflet/OpenStreetMap, and Firestore.
- Frictionless Reporting: No login. Snap a photo, auto-capture GPS, submit.
- Interactive Map: Real-time markers with clustering, filters, and photo/details view.
- Community Verification: Crowd validation of fixes; disputes revert status.
- Transparency by Default: All reports public; shareable report pages.
- MobileβFirst PWA: Installable, offline-friendly, background sync, push-ready.
- Open311βReady APIs: Service discovery and request endpoints for future gov integration.
- AntiβSpam: Device fingerprinting, rateβlimiting, required photo evidence.
NOTE: The backend is not built yet. Only the frontend is productionβready. API endpoints such as
/reports/stats(realβtime data) and/potholes/[id](individual pothole details) are not ready and may return mock or placeholder data.
.
βββ public/ # Static assets (manifest, icons, robots, sitemap)
βββ src/
β βββ app/ # Next.js App Router
β β βββ api/reports/ # API routes
β β βββ map/ # Map page
β β βββ potholes/[id]/ # Individual report page
β β βββ report/ # Report creation page
β βββ components/ # UI components
β β βββ ui/ # Reusable UI components
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utilities
βββ .github/workflows/ # CI (build + Vercel deploy)
βββ .devcontainer/ # Dev container config
βββ Dockerfile # Node container for production
βββ package.json # Scripts & dependencies
βββ next.config.mjs # Next.js configuration
- Environment variables (create
.env)
NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1- Install dependencies
npm ci- Run the dev server
npm run dev- Dev Container (optional)
- Open in VS Code and "Reopen in Container" using
.devcontainer/devcontainer.json(Node 22).
// GET /api/services.json
interface Service {
service_code: string;
service_name: string;
description: string;
metadata: boolean;
type: "realtime" | "batch" | "blackbox";
keywords: string[];
group: string;
}
// POST /api/requests.json
interface ServiceRequest {
service_code: string;
lat: number;
long: number;
address_string?: string;
description?: string;
media_url?: string;
}
// GET /api/requests.json
interface ServiceRequestResponse {
service_request_id: string;
status: "open" | "closed";
service_name: string;
service_code: string;
description: string;
requested_datetime: string;
updated_datetime: string;
lat: number;
long: number;
media_url: string;
}- No login required; anonymous reporting
- Strip EXIF from photos; coarse location grid for privacy
- Input validation, rate limiting, and secure file uploads
This project is licensed under the MIT License.