This is an API that allows users to create, manage, and bid on offers while ensuring the integrity of the auction process through the use of password authentication.
It's implemented in Kotlin using Spring Boot and uses Gradle as a build tool.
For storing data in memory it uses H2 database.
For working with amounts it uses Integer type and stores amounts in cents.
It uses following libraries/frameworks/tools:
- Spring Boot 3 - for application configuration
- Spring Data JPA - for data access
- Spring Data REST (HAL) - for exposing REST API
- JUnit Jupiter - for testing
- MockMVC - for testing REST API
- Jib Gradle Plugin - for building Docker images
- H2 - for storing data in memory
- Gradle - for building the application
- Docker - for building Docker images
- Create an offer
- Get an offer by id
- Update an offer
- Delete an offer
- Get all offers
- Search offers by status
- Close an offer
- Create a bid
- Get a bid by id
- Get all bids
- Get all bids for an offer
- Java 11
- Docker (optional)
- Gradle (optional)
- Docker Compose (optional)
- Postman (optional)
- IntelliJ IDEA (optional)
GET /offers - returns all offers
GET /offers/search/by-status?open={status} - returns all offers with given open status
GET /offers/{id} - returns offer with given id
GET /offers/{id}/bids - returns all bids for offer with given id
POST /offers - creates new offer
PUT /offers/{id} - updates offer with given id
DELETE /offers/{id} - deletes offer with given id
POST /offers/{id}/bids - creates new bid for offer with given id
PUT /offers/{id}/close - closes offer with given id
To be implemented
To run the application, use the following command:
./gradlew bootRun
To run the tests, use the following command:
./gradlew test
To build the application, use the following command:
./gradlew build
To build the application without running the tests, use the following command:
./gradlew build -x test
To build the Docker image, use the following command:
./gradlew jibDockerBuild
The image will be available in the local Docker registry and then you can run it using the following command:
docker run -p 8080:8080 auktion:0.0.1-SNAPSHOT