Skip to content

NandiniDhanrale/EVision-Fleet-Console

Repository files navigation

# EV Fleet Operations Console

A comprehensive full-stack application for managing electric vehicle fleets, built with Spring Boot 3.5.x and React 19.x.

πŸš— Features

Core Functionality

  • EV Management: CRUD operations for electric vehicles with battery monitoring
  • Charger Management: Track charging station status and availability
  • Driver Management: Manage driver profiles and assignments
  • Real-time Telemetry: IoT data ingestion for vehicle status updates
  • Fleet Dashboard: Live monitoring with status cards and analytics

Dashboard Features

  • Fleet Health Overview: Real-time status of all vehicles and chargers
  • At-Risk Vehicle Alerts: Low battery vehicles with upcoming trips
  • Today's Trip Schedule: Current day trip planning and status
  • Battery Monitoring: Visual battery level indicators with color coding
  • Location Tracking: GPS coordinates for vehicle positioning

πŸ—οΈ Architecture

Backend (Spring Boot 3.5.x)

  • Java 21 with modern Spring features
  • PostgreSQL database with JPA/Hibernate
  • REST APIs for all CRUD operations
  • Telemetry ingestion endpoint for IoT data
  • MapStruct for entity-DTO mapping
  • Comprehensive testing with JUnit 5 and MockMVC

Frontend (React 19.x + TypeScript 5.7.x)

  • Modern React with hooks and functional components
  • TypeScript for type safety
  • Tailwind CSS for styling
  • React Router for navigation
  • Axios for API communication
  • Lucide React for icons
  • Responsive design for mobile and desktop

Infrastructure

  • Docker Compose for local development
  • PostgreSQL 15 database
  • Nginx reverse proxy for frontend
  • Telemetry simulator for realistic IoT data

πŸš€ Quick Start

Prerequisites

  • Docker and Docker Compose
  • Java 21 (for local development)
  • Node.js 18+ (for local development)

Using Docker Compose (Recommended)

  1. Clone the repository

    git clone <repository-url>
    cd EVision-Fleet-Console
  2. Start all services

    docker-compose up -d
  3. Access the application

  4. Initialize sample data (optional) The telemetry simulator will automatically create sample EVs and start sending data.

Local Development

Backend Setup

cd backend
./mvnw spring-boot:run

Frontend Setup

cd frontend
npm install
npm start

Telemetry Simulator

cd telemetry-simulator
npm install
npm start

πŸ“Š API Endpoints

EV Management

  • GET /api/evs - List all EVs
  • GET /api/evs/{id} - Get EV by ID
  • POST /api/evs - Create new EV
  • PUT /api/evs/{id} - Update EV
  • DELETE /api/evs/{id} - Delete EV

Charger Management

  • GET /api/chargers - List all chargers
  • POST /api/chargers - Create new charger
  • PUT /api/chargers/{id} - Update charger
  • DELETE /api/chargers/{id} - Delete charger

Driver Management

  • GET /api/drivers - List all drivers
  • POST /api/drivers - Create new driver
  • PUT /api/drivers/{id} - Update driver
  • DELETE /api/drivers/{id} - Delete driver

Telemetry

  • POST /api/telemetry - Submit telemetry data

Dashboard

  • GET /api/dashboard/summary - Fleet summary statistics
  • GET /api/dashboard/at-risk - At-risk vehicles
  • GET /api/dashboard/trips/today - Today's trips

πŸ”§ Configuration

Environment Variables

Backend

  • SPRING_DATASOURCE_URL - Database URL
  • SPRING_DATASOURCE_USERNAME - Database username
  • SPRING_DATASOURCE_PASSWORD - Database password

Frontend

  • REACT_APP_API_URL - Backend API URL

Telemetry Simulator

  • API_URL - Backend API URL
  • INTERVAL - Telemetry send interval (ms)
  • EV_COUNT - Number of EVs to simulate

πŸ§ͺ Testing

Backend Tests

cd backend
./mvnw test

Integration Tests

cd backend
./mvnw test -Dtest=*IntegrationTest

Frontend Tests

cd frontend
npm test

πŸ“ Project Structure

EVision-Fleet-Console/
β”œβ”€β”€ backend/                 # Spring Boot application
β”‚   β”œβ”€β”€ src/main/java/
β”‚   β”‚   └── com/evops/fleetconsole/
β”‚   β”‚       β”œβ”€β”€ controller/  # REST controllers
β”‚   β”‚       β”œβ”€β”€ service/     # Business logic
β”‚   β”‚       β”œβ”€β”€ entity/      # JPA entities
β”‚   β”‚       β”œβ”€β”€ repository/  # Data repositories
β”‚   β”‚       β”œβ”€β”€ dto/         # Data transfer objects
β”‚   β”‚       └── mapper/      # MapStruct mappers
β”‚   └── src/test/           # Unit and integration tests
β”œβ”€β”€ frontend/               # React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable components
β”‚   β”‚   β”œβ”€β”€ pages/          # Page components
β”‚   β”‚   β”œβ”€β”€ api/            # API client
β”‚   β”‚   └── types/          # TypeScript types
β”‚   └── public/
β”œβ”€β”€ telemetry-simulator/    # IoT data simulator
└── docker-compose.yml     # Container orchestration

πŸ”„ Telemetry Data Format

{
  "evId": "uuid",
  "batteryPercent": 85,
  "state": "DRIVING",
  "odometerKm": 12543.7,
  "latitude": 12.9715987,
  "longitude": 77.5945627,
  "timestamp": "2025-12-10T10:23:00Z"
}

🎯 Key Features Implemented

βœ… Complete CRUD Operations for EVs, Chargers, and Drivers βœ… Real-time Telemetry Ingestion with automatic EV status updates βœ… Interactive Dashboard with live fleet monitoring βœ… At-risk Vehicle Detection for low battery alerts βœ… Responsive UI with modern design βœ… Docker Containerization for easy deployment βœ… Comprehensive Testing with unit and integration tests βœ… Realistic IoT Simulation with intelligent state transitions βœ… Database Schema optimized for fleet operations βœ… RESTful API Design following best practices

πŸ› οΈ Technology Stack

  • Backend: Java 21, Spring Boot 3.5.x, Spring Data JPA, PostgreSQL
  • Frontend: React 19.x, TypeScript 5.7.x, Tailwind CSS, Vite
  • Testing: JUnit 5, MockMVC, Jest, React Testing Library
  • DevOps: Docker, Docker Compose, Nginx
  • Tools: MapStruct, Axios, Lucide React, React Router

πŸ“ˆ Future Enhancements

  • Real-time WebSocket updates for live dashboard
  • Advanced analytics and reporting
  • Route optimization for trip planning
  • Mobile app for drivers
  • Integration with real IoT devices
  • Machine learning for predictive maintenance
  • Multi-tenant support for fleet operators

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors