This repository is a implementation an academic project for the creation of a fictitious digital bank.
You need to create a digital bank when:
- It must be possible to create and remove holder
- a holder must contain only your name and Document Number
- The Document Number must be valid and unique in the registration of holder
- The digital accounts must contain the following features:
- The account must be created using the Document Number do holder
- An account must have its balance, number e agency available for Query
- Required for find history balance account from per period
- A holder can close the digital account at any time
- Perform withdrawal and deposit operations
- Deposit is released to all active and unlocked accounts
- Withdrawal is allowed for all active and unlocked accounts as long as there is available balance and does not exceed the daily limit of 2 thousand R$
- We need to lock and unlock the digital account at any time
- The digital account can never have the negative balance
- Some Concepts off the Clean Architecture
- H2 Database for save transactions
- SpringBoot
- Junit for Unit Tests
- Spring Data
- Open API 3.0 specification
- Docker
- Docker Compose
- Kubernetes node cluster
- RestAPI Client's for example: (Postman/Insomnia)
- Access Internet for gradlew dependency's download
Docker
$ cd .\challenge-developper-api-rest_webapp\
$ docker-compose up --build -d
cd .\challenge-developper-api-rest_webapp\
$ docker-compose down
Kubernetes
Run command for create service
$ cd .\challenge-developper-api-rest_webapp\
$ .\kubernetes> kubectl apply -f .\kubernetes\service.yaml
service/challenge-developper-api-rest-webapp-svc created
Run command for create deployment
$ cd .\challenge-developper-api-rest_webapp\
$ .\kubernetes> kubectl apply -f .\kubernetes\deployment.yaml
deployment.apps/challenge-developper-api-rest-webapp-k8s created
After run this commands access swagger to validate application its ok.
For test api's you need to import postman collection.json
If you need click here to know how to import the collections in postman.
Atention
Because it is a integration test, it's work's if you run one time!
if you need to re-execute it, it is recommended to clean the database or restart the application.
Run integration test:
This project Using OpenAPI 3.0 specification if you whant to see a doc open swagger-ui in your Browser