# sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station architecture

> Architecture diagram of the GitHub repository sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station
- Repository: https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station

## Overview

This repository is an EV charging station web application: a React frontend presents station discovery, user account and booking/payment pages, plus an admin area; a Java backend is organized into controllers, services and repositories. The sampled station list is local demo data, while the sampled admin login calls the backend directly. The README gives no workflow detail, and backend implementation excerpts were not supplied, so backend capabilities are represented by their tree-supported modules without inferred call links.

Main entry points: [`ev-charging-frontend/src/App.jsx`](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/App.jsx) (Route dispatch), [`ev-charging-frontend/src/pages/Home.jsx`](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Home.jsx) (Home), [`ev-charging-frontend/src/pages/admin/AdminLogin.jsx`](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/AdminLogin.jsx) (Admin login), [`ev-charging-frontend/src/pages/Stations.jsx`](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Stations.jsx) (Station discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Customer frontend"]
  node_app["Route dispatch<br/>[App.jsx]"]
  node_home["Home<br/>[Home.jsx]"]
  node_stations["Station discovery<br/>[Stations.jsx]"]
  node_station_detail["Station details<br/>[StationDetail.jsx]"]
  node_booking["Booking<br/>[Booking.jsx]"]
  node_payment["Payment<br/>[Payment.jsx]"]
  node_account["User account<br/>[Profile.jsx]"]
  node_account_edit["Edit profile<br/>[EditProfile.jsx]"]
  node_saved["Saved stations<br/>[Profile.jsx]"]
  node_user_login["User login<br/>[UserLogin.jsx]"]
  node_api_client["API client<br/>[apiClient.js]"]
end

subgraph group_admin["Admin frontend"]
  node_admin_login["Admin login<br/>[AdminLogin.jsx]"]
  node_admin_dashboard["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_admin_stations["Manage stations<br/>[ManageStations.jsx]"]
  node_admin_users["Manage users<br/>[ManageUsers.jsx]"]
  node_admin_bookings["Manage bookings<br/>[ManageBookings.jsx]"]
end

subgraph group_backend["Backend API"]
  node_backend_app["Spring application"]
  node_auth_api["Authentication API"]
  node_station_api["Station API"]
  node_booking_api["Booking API"]
  node_payment_api["Payment API"]
  node_user_api["User API"]
  node_saved_api["Saved station API"]
  node_services["Domain services"]
end

subgraph group_data["Domain and persistence"]
  node_entities["Domain entities"]
  node_repositories["Repositories"]
end

node_visitor(("EV user"))
node_server(("Backend server"))

node_visitor -->|"opens"| node_app
node_app -->|"routes"| node_home
node_app -->|"routes"| node_stations
node_app -->|"routes"| node_account
node_app -->|"routes"| node_account_edit
node_app -->|"routes"| node_user_login
node_app -->|"routes"| node_admin_login
node_app -->|"routes"| node_admin_dashboard
node_app -->|"routes"| node_admin_users
node_app -->|"routes"| node_admin_stations
node_app -->|"routes"| node_admin_bookings
node_home -->|"navigates"| node_stations
node_admin_login -->|"POST login"| node_server

click node_app "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/App.jsx"
click node_home "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Home.jsx"
click node_stations "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Stations.jsx"
click node_station_detail "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/StationDetail.jsx"
click node_booking "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Booking.jsx"
click node_payment "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Payment.jsx"
click node_account "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Profile.jsx"
click node_account_edit "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/EditProfile.jsx"
click node_saved "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Profile.jsx"
click node_user_login "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/UserLogin.jsx"
click node_api_client "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/api/apiClient.js"
click node_admin_login "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/AdminLogin.jsx"
click node_admin_dashboard "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/AdminDashboard.jsx"
click node_admin_stations "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/ManageStations.jsx"
click node_admin_users "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/ManageUsers.jsx"
click node_admin_bookings "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/ManageBookings.jsx"
click node_backend_app "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/EvChargingApplication.java"
click node_auth_api "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/AuthController.java"
click node_station_api "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/StationController.java"
click node_booking_api "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/BookingController.java"
click node_payment_api "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/PaymentController.java"
click node_user_api "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/UserController.java"
click node_saved_api "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/SavedStationController.java"
click node_services "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/tree/main/ev-charging-backend/src/main/java/com/example/evcharging/service"
click node_entities "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/tree/main/ev-charging-backend/src/main/java/com/example/evcharging/entity"
click node_repositories "https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/tree/main/ev-charging-backend/src/main/java/com/example/evcharging/repository"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_home,node_stations,node_station_detail,node_booking,node_payment,node_account,node_account_edit,node_saved,node_user_login,node_api_client,node_visitor toneBlue
class node_admin_login,node_admin_dashboard,node_admin_stations,node_admin_users,node_admin_bookings toneAmber
class node_backend_app,node_auth_api,node_station_api,node_booking_api,node_payment_api,node_user_api,node_saved_api,node_services,node_server toneMint
class node_entities,node_repositories toneRose
```

## Components

### Customer frontend

- [Route dispatch](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/App.jsx): `ev-charging-frontend/src/App.jsx`
- [Home](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Home.jsx): `ev-charging-frontend/src/pages/Home.jsx`
- [Station discovery](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Stations.jsx): `ev-charging-frontend/src/pages/Stations.jsx`
- [Station details](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/StationDetail.jsx): `ev-charging-frontend/src/pages/StationDetail.jsx`
- [Booking](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Booking.jsx): `ev-charging-frontend/src/pages/Booking.jsx`
- [Payment](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Payment.jsx): `ev-charging-frontend/src/pages/Payment.jsx`
- [User account](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Profile.jsx): `ev-charging-frontend/src/pages/Profile.jsx`
- [Edit profile](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/EditProfile.jsx): `ev-charging-frontend/src/pages/EditProfile.jsx`
- [Saved stations](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/Profile.jsx): `ev-charging-frontend/src/pages/Profile.jsx`
- [User login](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/UserLogin.jsx): `ev-charging-frontend/src/pages/UserLogin.jsx`
- [API client](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/api/apiClient.js): `ev-charging-frontend/src/api/apiClient.js`

### Admin frontend

- [Admin login](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/AdminLogin.jsx): `ev-charging-frontend/src/pages/admin/AdminLogin.jsx`
- [Admin dashboard](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/AdminDashboard.jsx): `ev-charging-frontend/src/pages/admin/AdminDashboard.jsx`
- [Manage stations](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/ManageStations.jsx): `ev-charging-frontend/src/pages/admin/ManageStations.jsx`
- [Manage users](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/ManageUsers.jsx): `ev-charging-frontend/src/pages/admin/ManageUsers.jsx`
- [Manage bookings](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-frontend/src/pages/admin/ManageBookings.jsx): `ev-charging-frontend/src/pages/admin/ManageBookings.jsx`

### Backend API

- [Spring application](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/EvChargingApplication.java): `ev-charging-backend/src/main/java/com/example/evcharging/EvChargingApplication.java`
- [Authentication API](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/AuthController.java): `ev-charging-backend/src/main/java/com/example/evcharging/controller/AuthController.java`
- [Station API](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/StationController.java): `ev-charging-backend/src/main/java/com/example/evcharging/controller/StationController.java`
- [Booking API](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/BookingController.java): `ev-charging-backend/src/main/java/com/example/evcharging/controller/BookingController.java`
- [Payment API](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/PaymentController.java): `ev-charging-backend/src/main/java/com/example/evcharging/controller/PaymentController.java`
- [User API](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/UserController.java): `ev-charging-backend/src/main/java/com/example/evcharging/controller/UserController.java`
- [Saved station API](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/blob/main/ev-charging-backend/src/main/java/com/example/evcharging/controller/SavedStationController.java): `ev-charging-backend/src/main/java/com/example/evcharging/controller/SavedStationController.java`
- [Domain services](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/tree/main/ev-charging-backend/src/main/java/com/example/evcharging/service): `ev-charging-backend/src/main/java/com/example/evcharging/service`

### Domain and persistence

- [Domain entities](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/tree/main/ev-charging-backend/src/main/java/com/example/evcharging/entity): `ev-charging-backend/src/main/java/com/example/evcharging/entity`
- [Repositories](https://github.com/sanchetkuchanwar2nbnsticcomp-jpg/ev-charging-station/tree/main/ev-charging-backend/src/main/java/com/example/evcharging/repository): `ev-charging-backend/src/main/java/com/example/evcharging/repository`

### Other components

- **EV user**
- **Backend server**

## Connections

- EV user → Route dispatch: opens
- Route dispatch → Home: routes
- Route dispatch → Station discovery: routes
- Route dispatch → User account: routes
- Route dispatch → Edit profile: routes
- Route dispatch → User login: routes
- Route dispatch → Admin login: routes
- Route dispatch → Admin dashboard: routes
- Route dispatch → Manage users: routes
- Route dispatch → Manage stations: routes
- Route dispatch → Manage bookings: routes
- Home → Station discovery: navigates
- Admin login → Backend server: POST login
