This API implements a new feature for an application: that allows users add their bank accounts by providing their bank account number, selecting a bank name, and writing their name as registered with their banks.
The pure Levenshtein Distance algorithm is more effective than the Damerau-Levenshtein Distance algorithm in this specific application due to the need for stricter comparison between the account names inputted. In addition to insertions, deletions, and substitutions, the Damerau-Levenshtein algorithm also takes into account transpositions as a valid edit operation. This may make the application allow greater differences between the two account names taken into consideration when determining a match.
For example the names 'John Doe' and 'Jonh Joe' would be pass the (maximum distance of 2) check if we use Damerau-Levenshtein distance due to transposition.
The major assumption in this application is that the api is being accessed by a registered user. This implies that for the mutation and queries, along with the details needed, an Id that represents the user must also be provided. This is implemented in order to properly verify user accounts and add Bank Details. A mutation for registering a user is also provided.
This api was developed using
- NodeJs
- Sequelize ORM (PostgreSQL database)
- Express
- GraphQL
- Apollo Server
- Axios
- TypeScript
The tools listed below are needed to run this application to run effectively:
- Node (LTS Version)
- Npm v8.3.1 or above
You can check the Node.js and npm versions by running the following commands.
node -v
npm -v
-
Install project dependencies by running
npm install
. -
To compile kindly use
npm postinstall
-
Start the server with
npm start
-
Access endpoints on your desired localhost set port
npm run test
All tests are written in the src/test
directory.
The base URL is
http://localhost/grapghl/
The base URL for the live version is
https://backdrop-graphql-api.onrender.com/graphql
You click here to test the api