Bank is a backend service that provides gRPC APIs to the frontend, facilitating the following functionalities:
Create and Manage Bank Accounts: Users can create bank accounts with details including owner’s name, balance, and currency.
Record Balance Changes: The service records every transaction that results in a balance change, creating an account entry record for each such instance.
Money Transfer: Enables users to perform money transfers between two accounts within a transaction, ensuring that either both accounts’ balances are updated successfully, or none of them are.
User Authentication: Authenticates users and ensures that they can only access and manage their own accounts.
Role-based Functionality: The service includes role-based access control, with specific roles such as "banker" and "depositor". There are several ways to create a banker user. You can create the first banker user either via a DB migration, or a script that runs on the production server. Once the first banker user is created, they can access an API that allows them to create other banker users.