Plan Indian intercity EV road trips: pick your EV, enter start and destination, and get 3–5 distinct charging plans (fastest / cheapest / fewest stops / highest rated / balanced family) with per-stop battery levels, charge times, and estimated costs.
Zero paid APIs. Everything runs on genuinely free services — no credit card anywhere: OSRM demo server (routing), Open Charge Map (chargers), Open-Elevation (terrain), Nominatim (search), OpenStreetMap tiles (map).
| Plan a trip | Compare plans |
|---|---|
![]() |
![]() |
| Vehicle picker, location autocomplete, battery slider | Plan cards, stop-by-stop itinerary, route map |
api/ Express + TypeScript API (decoupled for future mobile use)
src/core/ Pure logic: range engine, charging curve, geo, coverage scorer, plan generator (unit-tested)
src/providers/ OSRM / OCM / Open-Elevation / Nominatim behind swap-friendly interfaces
src/services/ Route → corridor → stations → elevation → plans pipeline
src/data/ Curated EV specs + EV-hub cities for charger-aware routing
src/models/ Mongoose schemas (Vehicle, Trip, Station w/ 2dsphere index)
web/ Next.js (App Router) + Tailwind + react-leaflet frontend
npm install
# optional but recommended — MongoDB + Redis via Docker:
docker compose up -d
npm run seed # load the 15-vehicle Indian EV dataset into Mongo
cp api/.env.example api/.env # add your free OCM key here (optional)
npm run dev # api on :4000 + web on :3000No Docker? It still works: vehicles are served from bundled seed data, the cache falls back to in-process memory, and trips just aren't persisted.
npm test # vitest — range engine, charging curve, geo, plan generatorThe shortest road isn't always drivable in an EV — India's free routing/charger data has real gaps. So the planner doesn't just take OSRM's fastest route:
- It asks OSRM for a few route alternatives, and also builds candidate
routes via major EV-hub cities (
src/data/hubs.ts) that stay on well-charged national highways. - For each candidate it discovers chargers along the corridor and runs a pure
coverage scorer (
src/core/coverage.ts) that checks whether the vehicle can complete the route without any charging gap exceeding its range. - It plans on the best-covered route, and tells the user when it picked a
charger-friendlier road over the fastest one (
routeNotein the response).
Impact example: Chennai→Mumbai discovery jumps from ~37 to ~210 compatible chargers once hub routing keeps the trip on charged highways. Some cross-country routes through the sparsely-charged Deccan interior remain genuinely infeasible for short-range EVs on current free data — the app says so honestly rather than inventing chargers, and suggests a longer-range EV.
- Rate limits respected: Nominatim is throttled to 1 req/sec behind a
7-day cache; OSRM and OCM responses are cached (6 h TTL); elevations are
cached per point for 30 days. The OSRM public server is for evaluation
only — set
OSRM_BASE_URLto a self-hosted instance when usage grows. - Charger availability is best-effort: Open Charge Map is
community-maintained; the app surfaces a 0–5 "community score"
(operational status, verification recency) instead of pretending to have
live data. Tariffs are operator-level estimates (configurable via
RATE_INR_PER_KWH). - Safety buffer: plans never schedule arrival anywhere below 15%
battery (
RESERVE_BATTERY_PERCENT). - Out of scope for MVP (by design): live slot booking, multi-vehicle trips, offline mode, in-trip rerouting. Socket.IO is anticipated for a future "live trip" mode but not included.
Charging data © Open Charge Map contributors · Routing © OSRM · Geocoding & map tiles © OpenStreetMap contributors.
© 2026 Mohith Balakumar. All rights reserved.
This source is published for portfolio and evaluation purposes only. It is not open source. No permission is granted to use, copy, modify, merge, publish, distribute, sublicense, or sell any part of this software, in whole or in part, without prior written permission from the copyright holder.
Viewing and forking via GitHub's interface is permitted under GitHub's Terms of Service; that does not grant any licence to the code itself.
Third-party data and services used by this project (OpenStreetMap, Open Charge Map, OSRM, Open-Elevation) remain under their own licences — see Attribution above.

