There are 2 customers known by the application: tesla and apple.
A Basic auth mechanism is set up to authenticate api users:
- Tesla: tesla-uuid/tesla-password
- Apple: apple-uuid/apple-password
There are 4 users known by the application:
- apple-user1-uuid belongs to apple-uuid company
- apple-user2-uuid belongs to apple-uuid company
- tesla-user1-uuid belongs to tesla-uuid company
- tesla-user2-uuid belongs to tesla-uuid company
When starting the application:
- Tesla has a balance of 1000€
- Apple has a balance of 2000€.
Note that the application (deposit-service) is focused ONLY on Deposit.
It's not focused on other domain model such as Customer, User or Balance.
When starting the application, an in-memory H2 database is created (see schema.sql) and populated (see data.sql)
Database is owned by deposit-service and consequently contains only tables related to Deposit. (We try to stick to DDD)
The OpenApi standard was used to describe the REST API.
Additionally, a self-configured UI is available at: http://localhost:8080/swagger-ui/index.html
Note : you will need to use the basic auth credentials to authenticate. (see above)
Some unit and integration tests are available on test/java folder.
- Implement one or two functions allowing companies to distribute gift and meal deposits to a user if the company balance allows it.
- Implement a function to calculate the user's balance.