This project is a REST API for managing a fleet of taxis and their corresponding trajectories, built using Java, Spring Boot, Hibernate, and PostgreSQL. The API allows CRUD operations for taxis and provides endpoints to query the latest taxi trajectories. It includes unit tests and follows a layered architecture for structuring a Spring Boot project.
- Java 21
- Spring Boot 3
- Hibernate (JPA)
- PostgreSQL
- JUnit5 for unit testing
- Mockito for mocking in tests
- Postman/Newman for API testing
-
Clone the repository:
git clone https://github.com/yourusername/fleet-management-api.git cd fleet-management-api
-
Run the project: Use Maven to start the application.
mvn spring-boot:run
-
Access the API: The API will be available at
http://localhost:8080
. You can start making requests to the endpoints defined in the API (e.g.,/taxis
,/trajectories
).
Run the unit tests using Maven:
mvn test
-
Install Newman: If you haven't installed Newman yet, you can do so globally:
npm install -g newman
-
Run Postman Tests: Use the following command to run the Postman tests through Newman:
newman run postman/collection.json -e postman/environment.json
- Optimized Response Times via indexing database.
- Increase data source for the API.