You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 4 digits after that are a randomly generated number
And the last digit is a control number being calculated by the mod11 algorithm
The customer ID is the last 7 digits of the bank account number
After successfully creating a new customer, you are redirected to the Find customer page and the personal number you used will be filled into the form so you can easily display the customer
Update customer details
You first have to search for a customer (all 11 digits, for security)
The form will then be filled in with all the details of the customer, and you can choose which you want to change
When submitting, you get a success message as long as nothing went wrong
Delete customer
You first have to search for a customer (all 11 digits, for security)
The customer will then display with a Delete-button which will delete the customer and display a success message as long as nothing went wrong
Latency calculation
Information
Latency will be logged to the terminal whenever you do something on the site that includes a mongoDB query
The log includes the HTTP status code, method used to send, the endpoint and the mongoDB query type that was used
How it works
The end-to-end latency is logged by morgan and saved in a log file
The cloud processing latency is logged by mongoose pre/post-middleware that can be found in the customer schema
The post-middleware also calls on a function which takes the last line from the end-to-end log and compares it to the current cloud processing latency calculation to get the communication latency, and finally logs everything out to the terminal in a neat form
Assumptions & things done for simplicity
Creating customer
Customers can have only one account each
Personal number, account number and customer ID should be unique in the database
ABC Bank has the 'Bank register number' 1234
Updating customer
If customer changes account type, a new account number will be generated
Customer ID can not be updated, even when the account type (and therefore account number) is changed
About
ABC Bank Customer Management System || Assignment 1 in IDG2001 Cloud Technologies