Cephra is a full-stack EV charging queue management system designed to optimize station operations, reduce wait times, and improve customer flow.
Built as a Data Structures and Algorithms project, it integrates a Java desktop system, a PHP web application, and a shared MySQL database with real-time updates.
- β‘ Priority-based EV queue system (low battery first)
- π Real-time updates using WebSocket + SSE
- π₯οΈ Multi-interface system (Admin, Customer, Monitor)
- π Java + PHP connected directly to one MySQL database
- π Designed for scalability and real-world station workflows
EV infrastructure is growing rapidly, but queue handling at charging stations remains inefficient.
Cephra solves this by:
- π€ Automating queue prioritization
- β³ Reducing idle bay time
- π Providing real-time visibility for both customers and operators
- π Simulating a real production environment using multiple systems
- β±οΈ Real-time queue management across 8 charging bays
- π¦ Priority scheduling (battery < 20%)
- β‘ Automatic bay assignment (Fast / Normal)
- π₯οΈ Live station monitor display (TV-ready)
- π² Customer queue tracking and charging progress
- π οΈ Admin dashboard for operations and control
- π Real-time updates via WebSocket and Server-Sent Events
1. Admin Panel (Java Swing)
- ποΈ Queue management
- πͺ« Bay allocation
- π¨βπΌ Staff and transaction control
- π Real-time monitoring
2. Phone Simulator (Java Swing)
- π± Simulates customer mobile interface
- β³ Queue status and charging progress
3. Web Application (PHP)
- π Customer interface (browser-based)
- π‘οΈ Admin dashboard (SSE-powered)
- π₯οΈ Monitor display (WebSocket-powered)
Both Java and PHP systems connect directly to a shared MySQL database.
flowchart TD
subgraph Java App
A[JDBC]
end
subgraph PHP Web
B[PDO]
end
A -- Shared DB --> DB[(MySQL cephradb)]
B -- Shared DB --> DB
DB -- Notifications --> SSE[Server-Sent Events]
DB -- Notifications --> WS[WebSocket]
SSE -- Admin Updates --> Admin[Admin Panel]
WS -- Monitor Display --> Monitor[Monitor]
- ποΈ MySQL triggers log updates into a
notificationstable - π’ PHP services read and broadcast updates
- β‘ Clients receive instant updates without refresh
QueueFlow
- π Uses
PriorityQueue<Entry> - π Vehicles with battery < 20% are prioritized
- β© FIFO preserved within same priority
BayManagement
- πͺ« Assigns available charging bays dynamically
- β‘ Supports Fast and Normal chargers
ChargingManager
- β²οΈ Uses background
Timer - π Battery increases 1% per tick
- π Auto-completes at 100%
Ticket Format
FCH001β Fast chargingNCH001β Normal chargingFCHP001/NCHP001β Priority tickets
Cephra-QMS/
βββ src/main/java/cephra/
β βββ Admin/
β βββ Database/
β βββ Frame/
β βββ Phone/
β βββ Launcher.java
βββ src/main/resources/
βββ Appweb/
β βββ Admin/
β βββ User/
β βββ Monitor/
β βββ shared/
βββ pom.xml
- β Java 21+
- π¨ Maven
- ποΈ MySQL 8+
- π PHP (local server like Apache/Nginx)
Run:
Appweb/shared/notifications_setup.sqlCreate .env file:
DB_HOST=127.0.0.1
DB_NAME=cephradb
DB_USER=root
DB_PASSWORD=yourpasswordEdit:
src/main/resources/db.propertiesSet your database password:
dataSource.password=yourpasswordServe the Appweb/ folder using your PHP server.
mvn exec:java- π€ Customer: http://localhost/Cephra/Appweb/User/
- π‘οΈ Admin: http://localhost/Cephra/Appweb/Admin/
- π₯οΈ Monitor: http://localhost/Cephra/Appweb/Monitor/
- π± Mobile app (React Native / Flutter)
- π API layer (Spring Boot REST)
- βοΈ Cloud deployment (AWS / GCP)
- π³ Payment gateway integration
- π€ Predictive queue optimization (AI-based)
| Usher Kielvin Ponce | Project Lead, Backend | |
|---|---|---|
| Mark Dwayne Dela Cruz | Web UI/UX | |
| Dizon Dizon | Backend, Database | |
| Kenji Hizon | Java Frontend |
