Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
Post /accounts
Body: {name, email, password, ...}
Post /login
Body: {email, password}
Get /accounts/{account_id}
Patch /update-account/{account_id}
Body: {email, address, ..}
Post /payment-methods/{account_id}
Body: {type, account_number, ...)
Post /transactions/{account_id}
Body: {type, amount, ..}
Get /transaction-history/{account_id}
Get /transactions/{account_id}/{transaction_id}
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
Client:
API Gateway:
Auth Service:
User Service:
Banking Service:
Fraud Detection Service:
Database:
Keystore (KMS):
LB:
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
Entity Data Models
User
id (pk, unique, indexed)
name
email (unique, indexed)
password (indexed)
created_at (timestamp)
updated_at (timestamp)
last_login_geo_location
Transactions
- id (pk, unique, indexed)
- user_id (fk)
- payment_method_type
- payment_method_id
- amount
BankCard
- id (unique)
- user_id (fk)
- name
- number
- exp_date
- cvv
BankAccount
- id (unique)
- user_id (fk)
- account_number
- routing_number
Deep Dive / Detailed Component Designed:
- DB will be relational with synchronous replicas, to ensure
data durability, and make it fault tolerent
- User service will handle user related functions like
user creation, account management