SmartEV is a comprehensive electric vehicle ecosystem platform that combines blockchain technology, AI/ML analytics, IoT telemetry, and multi-platform applications to provide end-to-end EV management solutions. The platform serves manufacturers, dealers, fleet operators, and individual EV owners with a complete suite of tools for battery lifecycle tracking, charging station management, predictive analytics, and smart contract-based transactions.
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend Web β β Mobile App β β Admin Panel β
β (React/Vite) β β (React Native) β β (React/Vite) β
βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ
β β β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β API Gateway & Load Balancer β
βββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β β β
βββββββββββΌββββββββ βββββββββββΌββββββββ βββββββββββΌββββββββ
β Backend API β β Chat Service β β ML/AI Engine β
β (Node.js/TS) β β (Node.js) β β (Python) β
βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ
β β β
βββββββββββΌββββββββ βββββββββββΌββββββββ βββββββββββΌββββββββ
β MongoDB β β Vector Store β β Battery Twin β
β Database β β (RAG Data) β β (Telemetry) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βββββββββββΌββββββββ
β Blockchain β
β (Hardhat/ETH) β
βββββββββββββββββββ
- Digital Battery Passports: Blockchain-based immutable battery records
- Real-time Health Monitoring: AI-powered battery degradation analysis
- Predictive Maintenance: ML models for optimal battery performance
- Recycling Tracking: Complete end-of-life battery management
- Battery Analytics: Comprehensive performance metrics and trends
- Health Score Tracking: Real-time battery condition monitoring
- Web Dashboard: React-based admin and user interfaces
- Mobile App: Cross-platform React Native application with Expo
- Progressive Web App: Responsive web application for mobile devices
- Admin Panel: Comprehensive management interface
- Super Admin Dashboard: Advanced system-wide management tools
- Fleet Management Interface: Multi-vehicle oversight capabilities
- Battery Twin Technology: Digital twins for real-time battery simulation
- Predictive Analytics: Usage pattern analysis and optimization
- Smart Recommendations: AI-driven charging and maintenance suggestions
- Anomaly Detection: ML-based fault detection and alerting
- Performance Optimization: AI-driven efficiency improvements
- Usage Pattern Recognition: Machine learning-based behavior analysis
- Open Charge Map: Real-time charging station data from global community
- Route Planning: Smart charging route optimization
- Station Management: Admin tools for charging infrastructure
- Real-time Availability: Live charging station status updates
- Multi-brand Support: Integration with various charging networks
- Session Management: Complete charging session tracking
- RAG-based AI: Context-aware EV assistance and support
- Multi-language Support: Support for Indian regional languages
- Voice Integration: Speech-to-text and text-to-speech capabilities
- Knowledge Base: Comprehensive EV information and troubleshooting
- Groq AI Integration: Advanced language model capabilities
- File Upload Support: Document and image analysis capabilities
- Smart Contracts: Automated transactions and agreements
- Ownership Tracking: Immutable ownership and transfer records
- Supply Chain Transparency: Complete EV component traceability
- Decentralized Identity: Secure user and device identity management
- Battery Passport Registry: Blockchain-based battery lifecycle tracking
- Transaction History: Complete audit trail of all operations
- Framework: Node.js with Express.js and TypeScript
- Database: MongoDB with Mongoose ODM
- Authentication: JWT with bcrypt password hashing
- API: RESTful APIs with comprehensive validation
- Blockchain: Hardhat framework with Ethereum-compatible smart contracts
- ML Integration: Python Flask APIs for model serving
- Web: React 18 with TypeScript and Vite build system
- Mobile: React Native with Expo for cross-platform development
- UI Framework: Tailwind CSS with Radix UI components
- State Management: React Context API and custom hooks
- Maps Integration: Leaflet.js with OpenStreetMap tiles
- Framework: Python with scikit-learn, PyTorch
- Dashboard: Dash and Plotly for interactive visualizations
- Data Processing: Pandas and NumPy for data manipulation
- Model Serving: Flask with CORS for API endpoints
- Battery Modeling: Custom ML models for battery performance prediction
- Containerization: Docker for microservices deployment
- CI/CD: GitHub Actions for automated testing and deployment
- Monitoring: Winston logging with structured logging
- Security: Helmet.js, CORS, rate limiting, and input validation
- Node.js 18+
- Python 3.8+
- MongoDB (local or Atlas)
- Git
- Clone the repository
git clone https://github.com/Raghavendransahana/smartev.git
cd smartev- Backend API Setup
cd backend/api
npm install
cp .env.example .env
# Configure your environment variables
npm run dev- Frontend Web Setup
cd frontend/web
npm install
npm run dev- Mobile App Setup
cd frontend/app
npm install
npm run start- ML/AI Engine Setup
cd "model & ai/ml"
python -m venv mobility
source mobility/bin/activate # On Windows: mobility\Scripts\activate
pip install -r requirements.txt
python battery_api_server.py- Blockchain Setup
cd backend/blockchain
npm install
npx hardhat compile
npx hardhat deploy --network localhost- Chat Service Setup
cd chat
npm install
cp .env.example .env
# Configure your AI API keys (Groq/OpenAI)
npm startCreate .env files in respective directories:
Backend API (backend/api/.env):
NODE_ENV=development
PORT=4000
MONGODB_URI=mongodb://localhost:27017/smartev
JWT_SECRET=your_jwt_secret_key_here
JWT_EXPIRE=7d
# Blockchain
BLOCKCHAIN_NETWORK_URL=http://localhost:8545
PRIVATE_KEY=your_private_key_here
# External APIs
OCM_API_URL=https://api.openchargemap.io/v3Frontend Web (frontend/web/.env.local):
VITE_API_URL=http://localhost:4000/api
VITE_OCM_API_URL=https://api.openchargemap.io/v3Chat Service (chat/.env):
GROQ_API_KEY=your_groq_api_key
PORT=3001
CORS_ORIGIN=http://localhost:5173Mobile App (frontend/app/.env):
API_BASE_URL=http://localhost:4000/api
CHAT_API_URL=http://localhost:3001The React Native mobile application includes comprehensive EV management capabilities:
- Dashboard Screen: Overview of vehicle status and key metrics
- Vehicle Management: Add, edit, and manage multiple vehicles
- Battery Management: Real-time battery monitoring and analytics
- Analytics Screen: Detailed vehicle performance insights
- Fleet Management: Multi-vehicle oversight for fleet operators
- Charging Sessions: Track and manage charging activities
- Blockchain Explorer: View blockchain transactions and battery passports
- Settings: App configuration and user preferences
- System Info: Application and system information
- Integration Status: Monitor external service connections
- Chat Integration: AI-powered EV assistant with context awareness
- Real-time Telemetry: Live vehicle data monitoring
- Offline Capabilities: Core functionality works without internet
- Multi-theme Support: Dark/light theme options
- Authentication: Secure login with JWT tokens
- Push Notifications: Real-time alerts and updates
- Cross-platform: Single codebase for iOS and Android
- Expo Framework: Streamlined development and deployment
- TypeScript: Full type safety throughout the application
- Context API: Efficient state management
- RESTful Integration: Seamless API communication
POST /api/auth/register- User registrationPOST /api/auth/login- User authenticationGET /api/user/profile- Get user profilePUT /api/user/profile- Update user profileGET /api/system/health- System health checkGET /api/system/info- System information
GET /api/vehicles- List user vehiclesPOST /api/vehicles- Register new vehicleGET /api/vehicles/:id- Get vehicle detailsPUT /api/vehicles/:id- Update vehicle informationDELETE /api/vehicles/:id- Remove vehicle
POST /api/battery/log- Log battery dataGET /api/battery/:vehicleId/history- Get battery historyGET /api/battery/:vehicleId/analytics- Get battery analyticsPOST /api/battery/passport- Create battery passportGET /api/battery/:vehicleId/health- Get battery health score
POST /api/charging/start- Start charging sessionPOST /api/charging/end- End charging sessionGET /api/charging/sessions- Get charging historyGET /api/charging/stations- Get nearby charging stationsGET /api/charging/:sessionId- Get specific charging session details
GET /api/analytics/vehicle/:id- Vehicle analyticsGET /api/analytics/summary- Usage summaryGET /api/analytics/fleet- Fleet-wide analyticsGET /api/analytics/battery-trends- Battery performance trends
GET /api/alerts- Get user alertsPUT /api/alerts/:id/read- Mark alert as readPOST /api/alerts- Create new alertDELETE /api/alerts/:id- Delete alert
POST /api/ownership/transfer- Transfer vehicle ownershipGET /api/ownership/history/:vehicleId- Get ownership historyPUT /api/ownership/approve/:transferId- Approve ownership transfer
GET /api/blockchain/transactions- Get blockchain transactionsPOST /api/blockchain/verify- Verify blockchain dataGET /api/blockchain/passport/:id- Get battery passport from blockchainPOST /api/blockchain/register-passport- Register new battery passport
{
"success": true,
"message": "Operation completed successfully",
"data": {
// Response data
},
"meta": {
"timestamp": "2025-09-29T00:00:00.000Z",
"version": "1.0.0"
}
}smartev/
βββ backend/
β βββ api/ # REST API server (Node.js/TypeScript)
β β βββ src/
β β β βββ controllers/ # Request handlers
β β β βββ models/ # MongoDB models
β β β βββ routes/ # API routes
β β β βββ services/ # Business logic
β β β βββ middlewares/ # Custom middleware
β β β βββ config/ # Configuration files
β β β βββ types/ # TypeScript type definitions
β β β βββ utils/ # Utility functions
β β β βββ scripts/ # Utility scripts
β β βββ tests/ # API tests
β β βββ postman/ # Postman collections
β β βββ logs/ # Application logs
β βββ blockchain/ # Smart contracts (Hardhat)
β β βββ contracts/ # Solidity contracts
β β βββ scripts/ # Deployment scripts
β β βββ artifacts/ # Compiled contracts
β β βββ deployments/ # Contract addresses
β β βββ cache/ # Build cache
β βββ deployments/ # Deployment configurations
βββ frontend/
β βββ web/ # React web application
β β βββ src/
β β β βββ components/ # React components
β β β βββ pages/ # Page components
β β β βββ hooks/ # Custom React hooks
β β β βββ services/ # API integration
β β β βββ contexts/ # React contexts
β β β βββ lib/ # Utility libraries
β β β βββ assets/ # Static assets
β β βββ public/ # Public assets
β βββ app/ # React Native mobile app
β βββ src/
β β βββ components/ # Mobile components
β β βββ screens/ # Screen components
β β βββ navigation/ # Navigation setup
β β βββ api/ # API services
β β βββ contexts/ # React contexts
β β βββ hooks/ # Custom hooks
β β βββ config/ # Configuration
β β βββ theme/ # UI themes
β β βββ types/ # TypeScript types
β β βββ utils/ # Utility functions
β βββ assets/ # Mobile assets
β βββ .expo/ # Expo configuration
βββ chat/ # AI chat service
β βββ src/
β β βββ routes/ # Chat routes
β β βββ services/ # AI integration
β βββ uploads/ # File uploads
βββ model & ai/ # ML/AI engine
β βββ ml/
β β βββ models/ # Trained ML models
β β βββ notebooks/ # Jupyter notebooks
β β βββ data/ # Training data
β β βββ mobility/ # Python virtual environment
β βββ chatbot/ # AI chatbot models
βββ telementry/ # IoT telemetry service
β βββ src/ # Telemetry processing
βββ docs/ # Documentation
βββ api/ # API documentation
βββ integrations/ # Integration guides
βββ DEPLOYMENT.md # Deployment guide
βββ README.md # Documentation overview
# Backend API tests
cd backend/api
npm test
# Frontend tests
cd frontend/web
npm test
# Integration tests
cd telementry
npm test# Linting
npm run lint
# Type checking
npm run typecheck
# Format code
npm run format- Environment Variables: Configure production environment variables
- Database: Set up MongoDB Atlas or production MongoDB instance
- Blockchain: Deploy smart contracts to mainnet or testnet
- API Deployment: Deploy backend API to cloud platform (AWS, Azure, GCP)
- Frontend Deployment: Deploy web app to CDN (Vercel, Netlify, CloudFront)
- Mobile App: Build and deploy to app stores
# Build all services
docker-compose build
# Start all services
docker-compose up -d
# View logs
docker-compose logs -fThe project includes GitHub Actions workflows for:
- Automated testing on pull requests
- Code quality checks and linting
- Security vulnerability scanning
- Automated deployment to staging/production
- Authentication: JWT-based secure authentication
- Input Validation: Comprehensive request validation with Zod
- Rate Limiting: API rate limiting to prevent abuse
- CORS: Configured CORS policies for secure cross-origin requests
- Helmet: Security headers for HTTP responses
- Environment Variables: Secure configuration management
- Database Security: MongoDB connection security and data validation
- Regular dependency updates and vulnerability scanning
- Secure API key management
- Input sanitization and validation
- Proper error handling without information disclosure
- Secure blockchain private key management
- Logging: Structured logging with Winston
- Error Tracking: Comprehensive error logging and monitoring
- Performance Monitoring: API response time tracking
- Database Monitoring: MongoDB query performance analysis
- Battery Performance: Real-time battery health analytics
- Charging Patterns: User charging behavior analysis
- Network Utilization: Charging station usage statistics
- User Engagement: Application usage metrics
This project is licensed under the MIT License - see the LICENSE file for details.
- API Documentation:
/docs/api/ - Integration Guides:
/docs/integrations/ - Developer Guides:
/docs/development/
- Issues: Report bugs and feature requests on GitHub Issues
- Discussions: Join community discussions on GitHub Discussions
- Discord: Join our Discord server for real-time support
For enterprise support, custom integrations, or commercial licensing, please contact us at support@smartev.com.
Empowering the future of electric mobility through technology innovation.