This is an API test project providing a set of endpoints and functionality to be used in an enterprise environment. The project provisions a list of endpoints and functionalities including but not limited to:
- Endpoint for customer profile creation
- Endpoint for current account creation
- Endpoint to obtain the list of transactions related to an account
The structure of the project is mainly in three parts:
doc/adrsfolder - discussions around the decisions taken in the implementation of this project is discussedAccountServicemodule - containing the Accounts service for customer account/profile managementTransactionServicemodule - containing the Transactions service for transaction management
- Java 17
- Maven
- SpringBoot v3.1.1
Testing and running the application. You need the AccountService and TransactionService running to
experience the full functionality of the project.
Navigate to the service module/folder in a different terminal:
cd ./AccountService
mvn clean install
mvn spring-boot:run- Runs on port 1010
- The service can then be accessed through OpenAPI/Swagger using in http://localhost:1010/swagger-ui/index.html
Navigate to the service module/folder in a different terminal:
cd ./TransactionService
mvn clean install
mvn spring-boot:run- Runs on port 1011
- The service can then be accessed through OpenAPI/Swagger using in http://localhost:1011/swagger-ui/index.html
A number of considerations and issues have been covered in the system design adr already here, below other assumptions and considerations are covered:
- It'd have been best to have the modules of this project in separate repository but for the sake of accessibility, a multimodule project structure is used
- H2 (in-memory) is used as the database for both services
- OpenAPI is used for API documentation and testing
- TDD (use-case perspective) was used for implementation of all business logic
- No security mechanism was implemented for this project but options to explore include but not limited to JWT Authorization/Authentication with RBAC, API keys or BASIC authentication
- Containerization mechanisms were considered but not implemented. In this case Docker or Kubernetes could be used
- The services are loosely coupled. Read about loosely coupled system here
- Lastly, REST is used for communication between the two services. There are other good solutions to replace this "infrastructurally" covered in the system design ADR