Building QR Code Generator in Serverless World using Kumologica

Written by ab73863 | Published 2020/08/27
Tech Story Tags: serverless | integration | aws-lambda | aws | microservices | qr-codes | amazon | programming

TLDR Kumologica is a free low-code development tool to build serverless integrations. We will be creating an API that will generate and host a QRCode which when read using a QR Code will direct you to a simple floor access form. The code is the perfect tool for use cases such as contactless mobile payments, Bitcoin and cryptocurrency payments. The use case is an employee approaching the service desk for an access to a floor. The service desk operator generates a QRode which is displayed on a screen in front of the service.via the TL;DR App

The concepts of social distancing, contactless approach and safety first have now become the new normal in our present COVID induced downturn.
We have already started adapting by finding new ways to interact with new technologies or by enhancing the existing ones. One such technology which is already popular and has made a comeback is the QRCode. During this COVID time, QRCode helps in ensuring social distancing and business operations go hand in hand.
QR Codes can easily be scanned from a short distance. QR Codes have a minimum radius of 25 cm (10 in), which then scales up depending on the size of the QR Code.
QR Codes are the perfect tool for use cases such as:
  1. Contactless mobile payments
  2. Bitcoin and cryptocurrency payments.
  3. Convenient WiFi access.
  4. Contactless ticketing.
  5. Contactless entrance to buildings, offices, or events.
  6. General information sharing for social media links, PDFs, videos, images, and website links.
And the list goes…
In this article we will be creating a Kumologica API that will generate and host a QRCode which when read using a QRCode scanner will direct you to a simple floor access form. Kumologica is a free low-code development tool to build serverless integrations. You can learn more about Kumologica in this medium article or subscribe to our YouTube channel for the latest videos.
Use case
In this use case an employee approaches the service desk for an access to a floor. The service desk operator checks the employee id and generates a QRCode which is displayed on a screen in front of the service desk operator.
The employee needs to scan the QRCode which will direct to the URL for a floor access form which needs to be completed by the employee and submitted to get the clearance.
Prerequisite
Kumologica designer installed in your machine. https://kumologica.com/download.html
Implementation
Open Kumologica Designer, click the Home button and choose Create New Kumologica Project.
Enter name (for example QRCodeDemo), select directory for project and switch Source into From Existing Flow …
2. Copy and Paste the following flow
3. press Create Button.
You should be seeing two flows as given below on the designer canvas.
First flow is for generating the QRCode
Second flow is for responding with the access form.
When the code is imported the first flow will be having an empty node which is a missing QRCode node. QRCode node is not part of the core nodes and hence will not be showing up in the palette.
In order to add the QRCode to the flow, go to Add more nodes option on the palette section which will open a page for you to select the nodes of your interest . In this case we will select the QRCode node and click Install. Post installation designer needs to be restarted. Once restarted the first flow will be completed with QRCode node.
Now if you open the settings of the QRCode node , you should see the following
QR String : https://<<gatewayid>>.xyz.amazon.com/test/access
The URL provided as the QR string is the endpoint URL of the second flow.
Note: The second flow endpoint URL can be known only once the flow is deployed to your AWS account. After the first deployment update the QR string in QRCode node with the second endpoint URL and redeploy. This is done because both the QRCode generation API and Access From API are in the same project.
Testing
Invoke the First flow (QRCode generation API) endpoint URL on your browser to see the QRCode displayed.QRCode displayed on the screen
2. Use your QRCode scanner in your mobile phone to scan the code.
3. Click on the second flow (Access From API) endpoint URL popped up to see the employee JSON data.
Conclusion
This article presented how easy Kumologica Designer to build an API to generate and host a QRCode. Remember Kumologica is totally free to download and use. Go ahead and give it a try, we would love to hear your feedback.
In the meantime, if there is any specific use case that you would like to see in a future article please let us know in the comments section.

Published by HackerNoon on 2020/08/27