This project is a simple vehicle management system that allows users to create, view, and delete vehicles via the user interface and REST API.
- Frontend: React, JavaScript, HTML, CSS, Vite, Axios, TypeScript, Material UI
- Backend: Spring Boot, Java
- Database: In-memory H2 Database
- Clone the repository:
git clone https://github.com/jugovicm/VehicleManagement
- Navigate to the project directory:
cd VehicleManagement - Go to the backend folder:
cd server - Run the application:
./mvnw spring-boot:run
The backend will be available at: http://localhost:8080
cd client/vehicle-manager
npm install
npm run dev
The frontend will be available at: http://localhost:5173
Base URL: http://localhost:8080/vehicles
Endpoint: POST /vehicles Description: Creates a new vehicle record in the system. Request Body (JSON):
{
"model": "Audi",
"firstRegistrationYear": "2015",
"cubicCapacity": 2000,
"fuel": "DIESEL",
"mileage": 120000
}Endpoint: GET /vehicles Description: Returns a list of all vehicles in the system. Example Response (200 OK):
{
"id": 1,
"model": "Audi",
"firstRegistrationYear": "2015",
"cubicCapacity": 2000,
"fuel": "DIESEL",
"mileage": 120000
},
{
"id": 2,
"model": "BMW",
"firstRegistrationYear": "2018",
"cubicCapacity": 3000,
"fuel": "PETROL",
"mileage": 90000
}Endpoint: DELETE /vehicles/{id}
Description: Deletes the vehicle with the specified ID from the system.
Path Parameter: id (Integer): The ID of the vehicle to be deleted.
For further information, please contact us at: jugmic@yahoo.com.