04. GENERAL SYSTEM DESCRIPTION - riyadmazari/ie-bank-infra GitHub Wiki
System Context
The IE Bank App MVP is designed to provide a modern and secure digital banking experience for users. It encompasses two main components: the Backend, responsible for user and account management, and the Frontend, offering a simplified interface for users to interact with their accounts.
System Environments and Modes
-
Backend Services:
- User Management Service: Handles admin user operations, such as viewing, creating, updating, deleting bank users, and making transactions.
- Authentication Service: Manages user authentication, allowing admin and bank users to log in securely.
- Account Management Service: Enables bank users to perform various banking operations, including viewing accounts, transactions, and transferring money.
-
Frontend: The frontend is a static web app that provides a simple and intuitive user interface. It interacts with the backend services through secure APIs to fetch and display user-specific information.
-
Database: A relational database is used to store user information, account details, and transaction records. The database ensures data consistency and integrity across services. It´s accessed via SQL queries from the Flask backend.
-
Azure Cloud Platform: Docker containers are organized using Azure App Service for Containers, providing scalability, flexibility, and ease of deployment. This allows for efficient resource utilization and simplified management. They are managed through Azure's web portal, CLI, and Bicep language for IaC.
-
Integration Points: The backend services communicate with each other through secure APIs. The frontend communicates with the backend via HTTPS to ensure data privacy and integrity. Integration points are secured using appropriate authentication mechanisms.
-
Scalability and Performance: The system is designed to be scalable, allowing for the addition of resources as the user base grows. This monitoring tools ensure optimal performance under varying workloads.
User Characteristics
-
Admin Users:
-
Roles and Responsibilities:
- Admin users have the responsibility of managing other bank users.
- They can view, create, update, and delete bank users.
- Admin users have full access to the users management portal.
-
Authentication:
- Admin users log in using a username and password.
- Default admin user credentials are created upon the initial launch.
-
-
Bank Users:
-
Roles and Responsibilities:
- Bank users are customers of the account management portal.
- They can have one or more bank accounts associated with their profile.
- Bank users can perform various banking operations through the account management portal.
-
Authentication:
- Bank users log in using a username and password.
- They can view only their own bank accounts and transactions.
-
Money Transfer:
- Bank users can transfer money to other existing accounts within the bank.
-
Admin users focus on user management, while bank users engage in account-related activities.
Operational Scenarios
| Scenario | User Type | Objective | Steps |
|---|---|---|---|
| Admin User Management | Admin | Manage bank users through the users management portal. | 1. Log in to the IE Bank App using admin credentials. 2. Navigate to the users management portal. 3. View, create, update, and delete bank users as needed. |
| Admin Login | Admin | Log in securely to access the admin features. | 1. Open the IE Bank App. 2. Enter the admin username and password. 3. Successfully log in to access the users management portal. |
| Bank User Account Operations | Bank User | Perform various operations related to their accounts. | 1. Log in to the IE Bank App using bank user credentials. 2. View their own bank accounts. 3. Access account details and transactions. 4. Initiate a money transfer to another account. |
| Bank User Login | Bank User | Log in securely to access their account information. | 1. Open the IE Bank App. 2. Enter the bank user username and password. 3. Successfully log in to access their personalized account portal. |
| Money Transfer | Bank User | Transfer money to another existing account within the bank. | 1. Log in to the IE Bank App using bank user credentials. 2. Select the option to transfer money. 3. Enter recipient's account number and transfer amount. 4. Confirm the transaction. |
Environments Design
Environments:
-
Development Environment:
- Purpose: Development and testing of new features.
- Components:
- Frontend (Static Web App)
- Backend Server (Docker Container)
- Database
- Deployment Process:
- Feature branches trigger automatic deployment.
- Developers test new features in this environment.
-
User Acceptance Testing (UAT) Environment:
- Purpose: Validation of features and user acceptance testing.
- Components:
- Frontend (Static Web App)
- Backend Server (Docker Container)
- Database
- Deployment Process:
- Pull requests to the main branch trigger automatic deployment.
- Stakeholders and users test and validate features.
-
Production Environment:
- Purpose: Live deployment for end-users.
- Components:
- Frontend (Static Web App)
- Backend Server (Docker Container)
- Database
- Deployment Process:
- Pushes to the main branch trigger automatic deployment.
- Only stable and validated features are deployed.
Infrastructure Services:
-
Azure Services:
- Utilized for cloud-native deployment.
- App Service for hosting Docker containers.
- Additional services for scalability, security, and monitoring.
-
GitHub Actions:
- CI/CD pipelines for automating testing and deployment.
- Workflow triggers based on branch pushes and pull requests.
Deployment Workflow:
-
Feature Branch Deployment:
- Triggered by pushes to feature branches in the GitHub repository.
- Deploys to the development environment for testing new features.
-
Pull Request Deployment:
- Triggered by pull requests to the main branch in the GitHub repository.
- Deploys to the UAT environment for user acceptance testing.
-
Main Branch Deployment:
- Triggered by pushes to the main branch in the GitHub repository.
- Deploys to both the UAT and production environments.
Summary:
The environments are structured to support development, testing, and production phases. Azure services provide the cloud infrastructure, GitHub Actions automate the CI/CD processes, and the deployment workflow ensures a controlled and validated release of features to different environments. This design supports continuous integration, testing, and delivery while maintaining separation between development and production environments.