Welcome to the BforBank MoneyPot Microservice. This project is a part of the technical test for BforBank's internship program. The microservice is designed to manage a "MoneyPot" for each customer. Every time a customer makes a purchase, the merchant can add a certain amount to the customer's MoneyPot. The customer can check their MoneyPot at any time to see if it is available. A MoneyPot is considered available if the customer has made at least 3 purchases and has a minimum of β¬10 in their MoneyPot.
The microservice is built using Java, Spring Boot, SQL, and Maven. It exposes a REST API for managing the MoneyPots.
- Add rights management with a canExecute method at usecase level
- Add Deployment
- Add environment management (to prepare deployment)
- Add E2E tests
- Add coverage check to prevent pull request to be merged if test coverage is not enough
- Add a small front to interact with the API
- Java 17
- Maven
- Clone the repository to your local machine.
git clone git@github.com:MisterAzix/technical-test-bforbank.git
- Navigate to the project directory.
cd technical-test-bforbank
- Build the project using Maven.
mvn clean install
- Launch database using Docker.
docker-compose up -d
- Run the application.
mvn spring-boot:run
Project available at http://localhost:8080
- View moneypot containing 15β¬ and 3 transactions, available is true
![image](https://private-user-images.githubusercontent.com/40914400/344648049-e95361fc-1419-45c7-b67d-e974dbfe58e0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzODM0MjQsIm5iZiI6MTcyNDM4MzEyNCwicGF0aCI6Ii80MDkxNDQwMC8zNDQ2NDgwNDktZTk1MzYxZmMtMTQxOS00NWM3LWI2N2QtZTk3NGRiZmU1OGUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDAzMTg0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ4MzgxOWM2NDQzNWVjZjM4MmJhZDcxNDI4Yjg4MDFlMGRlNWQzOThlOGUxOTM2NDE3NTU4YzJmNTRiZjQ4YWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xYcPTJAgw5N1S1cJ4Z9yZgzgme-jXgsjFmNLtXR29OE)
- View moneypot containing 20β¬ but only 2 transactions, available is false
![image](https://private-user-images.githubusercontent.com/40914400/344648661-aecba14e-ff68-4a45-9497-d1a62bbe96f6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzODM0MjQsIm5iZiI6MTcyNDM4MzEyNCwicGF0aCI6Ii80MDkxNDQwMC8zNDQ2NDg2NjEtYWVjYmExNGUtZmY2OC00YTQ1LTk0OTctZDFhNjJiYmU5NmY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDAzMTg0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgzNmFmMmIzZmY2YmMxYzYwNTEwYjVlOWMxN2YzNjY5NGNlZDUxOWMyMWFhMDI2MDFlMTAxZTNhNDI4Mjk1OWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZasWvyafgiRBtLRX7XPubUVNInS1SnD8_r0byEYLItg)
- Adding money to moneypot
![image](https://private-user-images.githubusercontent.com/40914400/344652064-9737ee5f-f85b-4377-9d28-8cd1a8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Gdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDAzMTg0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM2Nzc3Mjk3YWQ1OTU3ODY0OTQ1MWIyZTk5YWM4ZmU3N2JlMGNkODk4MTI2ZmI5YmYyMWM2YTJhMTlkYjYzYjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.B5k0NNBgrwCmXYK4f0l4qUvypv_T1P876yylEyB7qYE)
- View a not found moneypot
![image](https://private-user-images.githubusercontent.com/40914400/344652379-e4540cd0-9a70-4ba7-9a3f-81c141bd6ece.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzODM0MjQsIm5iZiI6MTcyNDM4MzEyNCwicGF0aCI6Ii80MDkxNDQwMC8zNDQ2NTIzNzktZTQ1NDBjZDAtOWE3MC00YmE3LTlhM2YtODFjMTQxYmQ2ZWNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDAzMTg0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThhMTUxOTg4NTQ3NTU1MjIyNDdkMjY2NTJlNzc3YmE5ZjZkMDU4MWNkNTM1ZWFkNDhiNDk1NWJiOGU4NzI1YTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hHPSZBs4Mis6eWQ9p3ArX1c9T2L16a3RcGtOR7q1jyI)
- Maxence BREUILLES (@MisterAzix)