You need to have the following installed:
- Java 8
- PostgreSQL
- Maven
- Docker
The Application Interacts with a Postgress Database so a DB will have to be set up locally
This can be Done using PG Admin and creating a database - atm
The application.properties file will define the connection to the DB - see Credentials being used below
Required Tables will be created on startup of the Application
When the Repo has been cloned locally, run the following commands in the root directiory to start the Application
- mvn clean install
- mvn spring-boot:run
When the Repo has been cloned locally, run the following commands in the root directiory to run the Application on Docker
- docker build -f Dockerfile -t atm-service .
- docker run -p 8081:8081 atm-service
Note: When running on Docker the ip address and port being used to conect to Postgress will differ per machie
The Application can be Tested locally using the following Enpoints
Request
Request
Request
Request Example
Response Examples
valid pin & valid amount - sucessfully withdrwan
valid pin & not enough in Users account - user is told and nothing is effected
valid pin & not enough funds in ATM - user is told and nothing is effected
invalid pin - user is told and nothing is effected
A requirment listed below needs logic to be implemented in the Application yet
- TO-DO - Dispense the minimum number of notes per withdrawal & inform details of the notes that would be dispensed