The assessment consists of an API to be used for opening a new “current account” of already existing customers.
- Java 17
- Spring Boot
- OpenAPI Documentation
- Docker / Docker Compose
- Liquibase
- In-memory H2 database for testing.
- JUnit 5, Mockito
- GitHub Action
- Docker
- The API will expose an endpoint which accepts the user information (customerID, initialCredit).
- Once the endpoint is called, a new account will be opened connected to the user whose ID is customerID.
- Also, if initialCredit is not 0, a transaction will be sent to the new account.
- Another Endpoint will output the user information showing Name, Surname, balance, and transactions of the accounts.
- Docker
- Browser (For testing using SwaggerUI)
- Optional: Postman
git clone https://github.com/Nail-Sv/current-account.git
cd current-account
docker-compose build
docker-compose up -d
docker-compose stop
POST /v1/account/ - creates a new account for existing customer
POST request body
{
"customerId": "550e8400-e29b-41d4-a716-446655440000",
"initialCredit": "10"
}
GET /v1/customer/{customerId} - retrieves a customer
GET /v1/customer - retrieves all customers
The application includes Swagger API documentation, which allows you to test the endpoints directly from the Swagger UI.
You can access the Swagger UI by navigating to http://localhost:8080/swagger-ui.html
after starting the application.
In the Swagger UI, you can see all available endpoints with detailed documentation. You can test the application by clicking the "Execute" button on each endpoint's documentation page. The documented examples in Swagger provide an easy way to interact with and test the application without writing any code.
http://localhost:8080/swagger-ui.html
- Thanks to the Spring Boot team for their excellent framework.
- Special thanks to all contributors.