A comprehensive Electric Vehicle (EV) charging management system built with Laravel 12, featuring a complete web interface and RESTful API architecture.
- Responsive Dashboard - Modern EV charging interface with real-time station data
- User Authentication - Complete registration, login, and OTP verification system
- Admin Panel - Comprehensive management interface for stations, users, and bookings
- User Pages - Bookings, reservations, and profile management interfaces
- Real-time Updates - Live charging session monitoring and notifications
- RESTful API - Complete API coverage for all system functionality
- Authentication - Sanctum-based API authentication with token management
- Station Management - CRUD operations with location-based search
- Booking System - Complete booking lifecycle management
- User Management - Profile, preferences, and vehicle management
- Admin Dashboard - Analytics, user management, and system monitoring
- Notifications - Real-time notification system with multiple delivery methods
- Backend: Laravel 12, PHP 8.2+
- Frontend: TailwindCSS 4.0, Alpine.js
- Database: MySQL with Eloquent ORM
- Authentication: Laravel Sanctum (API) + Session-based (Web)
- APIs: RESTful architecture with comprehensive endpoints
- PHP 8.2 or higher
- Composer
- Node.js & NPM
- MySQL 8.0+
- Laravel 12
-
Clone the repository
git clone <https://github.com/tecnodeveloper/evc.git> cd evc
-
Install PHP dependencies
composer install
-
Install Node.js dependencies
npm install
-
Environment setup
cp .env.example .env php artisan key:generate
-
Configure database
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=evc DB_USERNAME=your_username DB_PASSWORD=your_password
-
Run migrations
php artisan migrate
-
Build assets
npm run build
-
Start the development server
php artisan serve
├── app/
│ ├── Http/Controllers/
│ │ ├── API/ # API Controllers
│ │ │ ├── AuthApiController.php
│ │ │ ├── UserApiController.php
│ │ │ ├── StationApiController.php
│ │ │ ├── BookingApiController.php
│ │ │ ├── AdminApiController.php
│ │ │ └── NotificationApiController.php
│ │ └── [Other Controllers] # Web Controllers
│ ├── Models/
│ │ ├── User.php
│ │ ├── Station.php
│ │ ├── Booking.php
│ │ ├── Notification.php
│ │ ├── Payment.php
│ │ ├── PaymentMethod.php
│ │ └── VehiclePreference.php
├── database/migrations/ # Database schemas
├── resources/views/ # Blade templates
├── routes/
│ ├── web.php # Web routes
│ └── api.php # API routes
- users - User accounts and profiles
- stations - Charging station information
- bookings - Charging session bookings
- notifications - User notifications
- payments - Payment records
- payment_methods - User payment methods
- vehicle_preferences - User vehicle information
- User → Bookings (One to Many)
- User → VehiclePreferences (One to Many)
- User → Notifications (One to Many)
- Station → Bookings (One to Many)
- Booking → Payment (One to One)
The system supports dual authentication:
- Web Application: Session-based authentication
- API: Laravel Sanctum token-based authentication
- Find nearby stations
- Check availability
- Create booking
- Start charging session
- Stop charging session
- View booking history
- Login as admin
- View dashboard analytics
- Manage users and stations
- Monitor bookings
- Generate reports
All API responses follow a consistent format:
- Pagination - All list endpoints support pagination
- Filtering - Advanced filtering options for data retrieval
- Caching - Model relationships and query optimization
- Location-based Search - Efficient distance calculations for stations
- Background Processing - Async notification delivery
- Input Validation - Comprehensive request validation
- Rate Limiting - API rate limiting protection
- CORS Support - Configurable cross-origin requests
- Token Management - Secure API token handling
- Admin Authorization - Role-based access control
The API includes comprehensive error handling with appropriate HTTP status codes:
200- Success201- Created400- Bad Request401- Unauthorized403- Forbidden404- Not Found422- Validation Error500- Server Error
php artisan test./vendor/bin/pintphp artisan db:seedFor issues, feature requests, or questions:
- Create an issue in the repository
- Contact the development team
- Check the API documentation for detailed endpoint information
This project is licensed under the MIT License.
Built with ❤️ for the future of electric mobility 🚗⚡