The global economy that we are all part of runs on credit. Credit cards are used for a billion purposes worldwide. When a new mom buys baby diapers online or at a department store, she uses her credit card. When a corporate executive places a big order for a smart conference table, they use a credit card. When a small business owner promotes their business on facebook, they take out their credit card. But, credit card frauds are common, despite the best efforts of the payment providers, law enforcement, and others. The consumer sentinel network databook 2019 from ftc.gov mentions that ftc received around 3.20 M reports of fraud, identity theft, and other similar incidents from consumers.
Cardvault is an app that uses typing DNA to offer consumers a secure storage for their credit card data. A person can register on the app as they would on any other by providing an email address and a password. After registration and subsequent enrollment, they can log in by entering the credentials. During login, typing dna's typing biometrics authentication api captures the typing pattern and compares that with the saved one. If the score calculated is satisfactory, the person successfully logs in. The person sees the device, no. of enrollments, match, score, and the user id. In the text area, the person can enter their credit card data such as card type code, card type full name, issuing bank, card no., card holder's name, cvv/cvv2, issue date, expiry date, cad pin, credit limit, & more. When the person presses the safely store credit card data button, the data is stored in a postgresql database. Later, the person can come back to the app to access or update the saved data. As the app uses typing biometrics authentication, no other person can access the data, even if they steal the email address and password.
At its core, it is a node app that uses
typingdnaclient node package for typing biometrics authentication. The view engine used is
pug. The server uses
light-http-server node package. The database interactions take place through
pg node package. The file
final.pug implements the function
initilizedatabase() responsible for initialization tasks. The function places a get xml http request to the final 1 endpoint that connects to the postgresql database, creates the table cards with columns userid (text, primary key) & cards1 (text), if the table does not exist already. The 2nd query fetches all rows from the table and sends them as response to the get xml http request. The response is searched for the user id of the logged-in user, and if found, the card data textarea is populated with saved data. When the user presses the
Safely store credit card data button, the
submitform1() function is called that places a post xml http request to the final 1 endpoint with the user id and card data. At the endpoint, an insert is performed in the cards table, if the user id is a new one. In the case of a conflict i.e. in the case of an existing user id, an update is performed.