Your Smartest EV Travel Companion β Anytime, Anywhere
- Overview
- Features
- Tech Stack
- Architecture
- Installation
- Configuration
- API Documentation
- Usage
- Deployment
- Contributing
- License
EV-PATH is a comprehensive electric vehicle (EV) navigation and planning platform designed to revolutionize the EV driving experience. Built with modern web technologies, it provides real-time charging station data, intelligent route planning, cost analysis, and AI-powered assistance to make EV ownership seamless and efficient.
- Real-time Charging Station Data: Access to 100,000+ charging stations worldwide via OpenChargeMap API
- Smart Route Planning: AI-powered route optimization with charging stop recommendations
- Cost Analysis: Detailed cost comparison between EVs and traditional vehicles
- AI Chatbot: 24/7 EV expert assistance powered by Google Gemini AI
- Multi-platform Support: Responsive web application with mobile-first design
- Real-time Updates: Live data on charging station availability and pricing
- Real-time location-based charging station discovery
- Advanced filtering by connector type, power rating, and availability
- Distance-based sorting and clustering
- Detailed station information including pricing and operator details
- Intelligent route optimization considering EV range and charging needs
- Automatic charging stop recommendations
- Real-time traffic integration
- Multiple route options with cost analysis
- Comprehensive cost comparison between EVs and ICE vehicles
- Fuel cost analysis (Petrol/Diesel vs Electricity)
- Annual savings projections
- Environmental impact calculations
- 24/7 EV expert assistance
- Context-aware responses using Google Gemini AI
- Fallback responses for common EV questions
- Multi-language support
- Personal EV fleet management
- Battery health monitoring
- Range optimization tips
- Maintenance scheduling
- Dark/Light Theme: Automatic theme switching with user preference
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Real-time Updates: Live data synchronization
- Offline Support: Basic functionality available offline
- Progressive Web App: Install as native app on mobile devices
- React 18.3.1: Modern UI framework with hooks and context
- Vite: Fast build tool and development server
- Tailwind CSS: Utility-first CSS framework
- React Router DOM: Client-side routing
- Leaflet: Interactive maps with clustering
- Material-UI: Component library for enhanced UI
- Lucide React: Beautiful icon library
- Node.js: JavaScript runtime
- Express.js: Web application framework
- MongoDB: NoSQL database with Mongoose ODM
- JWT: Authentication and authorization
- bcrypt: Password hashing
- Joi: Data validation
- CORS: Cross-origin resource sharing
- Google Gemini AI: Advanced AI chatbot capabilities
- OpenChargeMap API: Global charging station data
- OSRM: Open-source routing machine for route optimization
- Nominatim: Geocoding services
- ESLint: Code linting and formatting
- PostCSS: CSS processing
- Autoprefixer: CSS vendor prefixing
- Nodemon: Development server with auto-restart
EV-PATH/
βββ frontend/ # React application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ contexts/ # React contexts (Auth, Theme, EV)
β β βββ pages/ # Page components
β β βββ main.jsx # Application entry point
β βββ package.json
βββ backend/ # Node.js/Express API
β βββ Controllers/ # Request handlers
β βββ Models/ # Database models
β βββ Routes/ # API route definitions
β βββ Middlewares/ # Authentication & validation
β βββ index.js # Server entry point
βββ evproxy/ # Django proxy for external APIs
βββ ocm/ # OpenChargeMap integration
βββ manage.py # Django management
- Frontend β Backend API β MongoDB (User data, EV profiles)
- Frontend β Django Proxy β External APIs (Charging stations, routing)
- Frontend β Gemini AI β Chatbot responses
- Node.js 18+ and npm
- Python 3.8+ and pip
- MongoDB 5.0+
- Git
git clone https://github.com/yourusername/EV-PATH.git
cd EV-PATHcd backend
npm installCreate a .env file in the backend directory:
PORT=8080
MONGODB_URI=mongodb://localhost:27017/evpath
JWT_SECRET=your_jwt_secret_key_here
NODE_ENV=developmentcd ../frontend
npm installcd ../evproxy
pip install -r requirements.txt
python manage.py migrateCreate a .env file in the evproxy directory:
OCM_API_KEY=your_openchargemap_api_key
GEMINI_API_KEY=your_gemini_api_key
DEBUG=True
SECRET_KEY=your_django_secret_key# Terminal 1: Backend
cd backend
npm run dev
# Terminal 2: Frontend
cd frontend
npm run dev
# Terminal 3: Django Proxy
cd evproxy
python manage.py runserver 8000PORT=8080 # Server port
MONGODB_URI=mongodb://... # MongoDB connection string
JWT_SECRET=your_secret # JWT signing secret
NODE_ENV=development # Environment modeOCM_API_KEY=your_key # OpenChargeMap API key
GEMINI_API_KEY=your_key # Google Gemini AI API key
DEBUG=True # Django debug mode
SECRET_KEY=your_secret # Django secret key- OpenChargeMap API: Get API Key
- Google Gemini AI: Get API Key
Register a new user account.
{
"name": "John Doe",
"email": "john@example.com",
"password": "securepassword123",
"phone": "+1234567890",
"location": "Mumbai, India"
}Authenticate user and get JWT token.
{
"email": "john@example.com",
"password": "securepassword123"
}Get all EVs for a user.
Add a new EV to user's fleet.
{
"type": "4W",
"brand": "Tesla",
"model": "Model 3",
"batteryCapacity": 75,
"currentCharge": 60,
"fullRange": 350,
"isDefault": true
}Find charging stations near a location.
Parameters:
lat: Latitudelon: Longitudedistance: Search radius in km (default: 10)connectors: Comma-separated connector typesmin_kw: Minimum power ratingmax_kw: Maximum power rating
Plan a complete EV trip with charging stops.
Parameters:
from: Starting cityto: Destination cityvehicle_range: EV range in km (default: 300)current_battery: Current battery percentage (default: 80)
Response:
{
"trip_summary": {
"distance_km": 150.5,
"duration_hours": 2.5,
"ev_cost": 301.0,
"petrol_cost": 1003.3,
"savings": 702.3
},
"charging_stops": [...],
"charging_stations": [...],
"environmental_impact": {
"co2_saved_kg": 230.1,
"equivalent_trees": 10.5
}
}Get AI-powered EV assistance.
{
"message": "What's the range of a Tesla Model 3?",
"conversation_history": []
}- Register/Login: Create an account or sign in
- Add Your EV: Configure your electric vehicle details
- Find Charging Stations: Use the map to locate nearby chargers
- Plan Routes: Get optimized routes with charging stops
- Get AI Help: Chat with our EV expert for any questions
- Use the interactive map to find charging stations
- Filter by connector type, power rating, and availability
- Get real-time pricing and operator information
- Save favorite stations for quick access
- Enter your start and destination
- Specify your EV's range and current battery level
- Get optimized routes with charging stop recommendations
- View detailed cost analysis and environmental impact
- Compare EV costs with petrol/diesel vehicles
- Calculate annual savings and break-even points
- Track environmental impact in CO2 savings
- Monitor charging costs and efficiency
cd backend
npm run buildVercel Configuration (vercel.json):
{
"version": 2,
"builds": [
{
"src": "index.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "/index.js"
}
]
}cd frontend
npm run build- Use MongoDB Atlas for cloud database
- Configure connection string in environment variables
- Set up database indexes for optimal performance
Set production environment variables:
NODE_ENV=productionMONGODB_URI=your_production_mongodb_uriJWT_SECRET=your_production_jwt_secretOCM_API_KEY=your_ocm_api_keyGEMINI_API_KEY=your_gemini_api_key
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 8080
CMD ["npm", "start"]version: '3.8'
services:
backend:
build: ./backend
ports:
- "8080:8080"
environment:
- MONGODB_URI=mongodb://mongo:27017/evpath
depends_on:
- mongo
frontend:
build: ./frontend
ports:
- "3000:3000"
depends_on:
- backend
mongo:
image: mongo:5.0
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
volumes:
mongo_data:We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style and conventions
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting
- JavaScript: Use ES6+ features, follow Airbnb style guide
- React: Use functional components with hooks
- CSS: Use Tailwind CSS utility classes
- Python: Follow PEP 8 style guide
- Code splitting with React.lazy()
- Image optimization and lazy loading
- Service worker for offline functionality
- Bundle size optimization with Vite
- Database indexing for frequent queries
- API response caching
- Rate limiting for external API calls
- Connection pooling for MongoDB
- Application performance monitoring
- Error tracking and logging
- Real-time user analytics
- API usage metrics
- JWT-based authentication
- Password hashing with bcrypt
- Role-based access control
- Session management
- Input validation and sanitization
- CORS configuration
- Rate limiting
- HTTPS enforcement
- Request validation with Joi
- SQL injection prevention
- XSS protection
- CSRF protection
- β Core charging station finder
- β Basic route planning
- β User authentication
- β EV management
- Documentation: Check this README and inline code comments
- Issues: Report bugs and feature requests on GitHub
- Discussions: Join our community discussions
- Email: Contact us at ishanrshah087@gmail.com
This project is licensed under the ISC License - see the LICENSE file for details.
- OpenChargeMap: For providing comprehensive charging station data
- Google Gemini AI: For powering our intelligent chatbot
- OSRM: For open-source routing capabilities
- React & Node.js Communities: For excellent documentation and support
- Our Contributors: For making EV-PATH better every day
Made with β€οΈ for the EV community
EV-PATH - Empowering Electric Vehicle Drivers Worldwide