This app implements a payment account system using a double ledger approach to manage credit and debit transactions. The authentication uses JWT for secure access and an API key approach for programmatic use on third-party applications.
- Payment Account: Allows users to create multiple payment accounts, each potentially for a separate currency.
- Ledger System: Manages the credit and debit transactions.
- Transactions: Enables deposits and transfers.
Run the application. Create an account. Make a deposit to your account. Perform a transfer using the system account number.
- You can get the account number as part of the response after signup or by calling the Get User API to retrieve user account information.
Before you begin, ensure you have the following installed on your local machine:
- Git: Java Development Kit (JDK) 11 or higher
- Docker: Apache Maven (for building the project)
- Git: (for cloning the repository)Ensure Git is installed on your machine.
- Docker (optional, if you want to run this app with Docker) Ensure Docker and Docker Compose are installed on your machine.
Open a terminal and run the following command to clone your repository:
git clone https://github.com/znuta/onebank.git
Navigate into the cloned repository:
cd onebank
Ensure you are in the root directory of the cloned repository.
Run the following command to build the project using Maven:
mvn clean install
This command will clean any previous builds and install the required dependencies.
After the build is complete, run the following command to start the application:
mvn spring-boot:run
If you have a Dockerfile in your project, you might want to build the Docker images first. You can do this by running:
docker-compose build
Use Docker Compose to start the containers for your application and database:
docker-compose up
on your browser goto:
http://127.0.0.1:8080/swagger-ui/index.html#