To implement a microservices-based banking solution with three micorservices:
- Customer Service: CRUD for customer data (first name, last name mandatory; other name optional)
- Account Service: CRUD for accounts (each account has IBAN, BIC SWIFT, belongs to one customer)
- Card Service: CRUD for cards (card alias editable; account ID, card type, PAN, CVV not editable)
Key rules considered in dev:
- One customer can have multiple accounts.
- Each account belongs to exactly one customer.
- Each account can have max 2 cards.
- One card per type (virtual/physical) per account.
- Sensitive card fields (PAN, CVV) are masked by default on API responses; override param allows unmasking.
Data Retrieval/query APIs support:
- pagination and filtering:Customers by name (full text search) and created date range.
- Accounts by IBAN, BIC SWIFT, card alias.
- Cards by card alias, card type, PAN.
Run the following command to start a PostgreSQL container:
docker run --name dtpebanking-postgres -e POSTGRES_PASSWORD=devdtbept -p 5432:5432 -d postgres:15Make sure the build script is executable, then run it while at the root dir:
mvn clean install && chmod +x dtb-build-all.sh && ./dtb-build-all.shBuild and start the containers with:
docker-compose -f docker-compose.yml up --buildIf you need do a clean up and rebuild containers from scratch then :
docker-compose down -v
docker-compose up --build| Service | Coverage Report Link |
|---|---|
| Customer Service | View Report |
| Account Service | View Report |
| Card Service | View Report |