Damilola99-web / mysql

Native mysql, Service-models-controllers uncle bob architecture 2023

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Start application

npm start

Edge case

  • User cannot transfer to himself
  • User cannot transfer to non-existing user
  • User cannot transfer more than his balance (insufficient balance)
  • User cannot transfer negative amount
  • Cash back on all withdrawals
  • Redis cache for user profile AND STATISTICS
  • You cannot transfer more than 1000 USD without being a premium user

  • Added joi validation - fail fast principle
  • Clean table before creating new tables in order to avoid foreign key constraint error
  • Overdraft limit for premium users
  • Transaction history with pagination
  • handle unhandled exceptions e.g if your port is already in use
  • Implementing account freeze or suspen sion for suspicious account activity by administrators [rbac ]

TODO

  • Implementing two-factor authentication for secure transactions
  • Setting transaction limits based on user account type (e.g. savings, checking, business)
  • Handling currency exchange rates and conversions for international transactions
  • Implementing a transaction timeout to prevent unauthorized access or fraud
  • Managing concurrent transactions to avoid race conditions and ensure data integrity
  • Handling failed transactions and providing appropriate error messages to users
  • Implementing transaction fees for certain types of transactions (e.g. international transfers, expedited transfers)
  • Handling edge cases related to transaction reversal or refund requests from users
  • Managing account closure and data retention policies in compliance with relevant regulations
  • Handling large transactions or transfers that may require additional verification or approval from the bank
  • Implementing transaction categorization or tagging for budgeting or expense tracking purposes
  • Handling scenarios where the user's bank account is compromised or hacked, and implementing appropriate security measures such as user authentication, password resets, and account recovery processes.

Start a redis container

Run redis container

docker run -d --name logan redis

run redis container with port mapping

docker run -d --name logan -p 6379:6379 redis

Access redis container

docker exec -it logan bash docker exec -it logan redis-cli

OR

Download redis

wget http://download.redis.io/releases/redis-5.0.5.tar.gz

Get all keys

KEYS *

Make sure you start server Image description

Delete a key in redis

127.0.0.1:6379> DEL "user:imi@gmail.com"

About

Native mysql, Service-models-controllers uncle bob architecture 2023


Languages

Language:JavaScript 100.0%