A comprehensive GTA5 vehicle management API built with Quarkus and PostgreSQL. This application provides a complete database solution for storing and managing detailed information about vehicles from Grand Theft Auto 5.
- Complete CRUD operations for GTA5 vehicles
- Detailed vehicle specifications including performance metrics
- PostgreSQL database with Panache ORM
- RESTful API with OpenAPI documentation
- Advanced search functionality with multiple criteria
- Comprehensive vehicle attributes (manufacturer, class, performance stats, etc.)
- Quarkus 3.x
- PostgreSQL
- Hibernate ORM with Panache
- RESTEasy Reactive
- OpenAPI (Swagger UI)
- Jakarta EE 10
- JDK 21 or later
- Maven 3.8.6+
- PostgreSQL 13+
- Git
git clone https://github.com/devTASE/gta5-vehicles-api.git
cd gta5-vehicles-api- Install PostgreSQL if you haven't already
- Create a new database:
createdb gta5vehicles- Configure your database credentials in
src/main/resources/application.properties:
quarkus.datasource.username=your_username
quarkus.datasource.password=your_password./mvnw compile quarkus:devThis will start the application in development mode with hot reload enabled.
Build the application:
./mvnw packageRun the JAR file:
java -jar target/quarkus-app/quarkus-run.jarOnce the application is running, you can access the Swagger UI at:
http://localhost:8080/swagger-ui
This provides interactive documentation of all available endpoints and allows you to test the API directly from your browser.
The API provides the following endpoints:
GET /vehicles- Retrieve all vehiclesGET /vehicles/{id}- Get a specific vehicle by IDPOST /vehicles- Create a new vehiclePUT /vehicles/{id}- Update an existing vehicleDELETE /vehicles/{id}- Delete a vehicleGET /vehicles/search- Search for vehicles with multiple filter criteria
The search endpoint supports the following query parameters:
name- Search by vehicle name (partial match)manufacturer- Filter by manufacturervehicleClass- Filter by vehicle class (Sports, Super, Muscle, etc.)minSeats- Filter by minimum number of seatsminTopSpeed- Filter by minimum top speedmaxPrice- Filter by maximum priceisSpecialVehicle- Filter special vehicles onlymodification- Filter by available modification
curl -X 'POST' \
'http://localhost:8080/vehicles' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Adder",
"manufacturer": "Truffade",
"vehicleClass": "Super",
"seats": 2,
"topSpeed": 220.0,
"acceleration": 9.2,
"braking": 8.5,
"handling": 8.3,
"price": 1000000,
"releaseDate": "2013-09-17",
"isSpecialVehicle": false,
"modifications": [
"Engine Upgrade",
"Turbo",
"Custom Spoiler"
]
}'# Get all vehicles from a specific manufacturer
curl -X 'GET' 'http://localhost:8080/vehicles/search?manufacturer=Truffade'
# Get all super cars with at least 2 seats and max price of 2 million
curl -X 'GET' 'http://localhost:8080/vehicles/search?vehicleClass=Super&minSeats=2&maxPrice=2000000'The Vehicle entity contains the following fields:
id(Long): Primary keyname(String): Vehicle namemanufacturer(String): Vehicle manufacturervehicleClass(String): Vehicle class (Sports, Super, Muscle, etc.)seats(Integer): Number of seatstopSpeed(Double): Top speed in mphacceleration(Double): Acceleration rating (0-10)braking(Double): Braking rating (0-10)handling(Double): Handling rating (0-10)price(BigDecimal): Vehicle price in GTA$releaseDate(LocalDate): Date when the vehicle was releasedisSpecialVehicle(Boolean): Whether it's a special vehiclemodifications(List): Available modifications
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.