Axway Holiday App: A Christmas Integration Story

Axway Holiday App
Axway Holiday App

`Twas the month before Christmas, when all through Axway
Making AMPLIFY awesome, so busy were they.
The holiday party was planned with such care
In hopes that a mobile app would soon be there.

Anyone that knows me well knows that I love a challenge. So when the Axway Griffin Innovation Lab (our top-secret laboratory for creating awesome stuff) reached out to me to create a mobile app and API for the Axway Holiday party, I was excited and ready to go! 🎉 

Some requirements of the APIs/App:

  • 🏆 Allow employees to scan barcodes at stations to win prizes
  • 🗺️ Provide digital maps of the facilities (2 floors) showing where all activities will take place
  • 🎟️ Provide a way for party organizers to enter winning raffle ticket numbers and notify users
  • 🖼️ Allow users to post pictures and status updates to show up in activity feed in app
  • 📺 Create dashboard for television screens showing live leaderboard and activity at event
  • 😎Make it an awesome and fun experience!
  • 😳 Deliver everything in about 3 weeks

The first order of business, as everyone who has heard me preach my API First philosophy, was to design and create a suite of APIs for the project.  I have been architecting, designing, and building APIs in some shape or form for 20+ years so trust me on this: Make API First your favorite!  (A little Elf joke for those that know the context…)

Visions of APIs dancing in my head…

Authentication/Authorization API

I needed an Authentication/Authorization API and I had some requirements:

  • Authenticate with Axway credentials
  • Handle permissions for various resource servers
  • Generate a JWT that was signed by Axway Key for use with AMPLIFY Central

Looking over the requirements, I immediately thought of AMPLIFY API Builder v4.  Using this, I was able to quickly create an API endpoint for Authorization that could be used by mobile, web, and other APIs.

The signed JWT that was created and contained user claims would also be useful for the content APIs coming up next…

Content Resource APIs

Next, I needed a way to store metadata about users, events, activities, and other features in the app. AMPLIFY BaaS (Axway’s Cloud Backend-as-a-Service) was perfect for this! I could create a new instance for my project and I instantly had a cloud database with built-in support for users, posts, places, photos, likes, and more along with support for any custom objects I needed!

With AMPLIFY API Builder v4, I was able to easily connect to SSO Authentication, my instance of AMPLIFY BaaS, as well as third-party APIs such as Microsoft Office 365 API and even a Google Sheets API.

Publishing APIs

I now had several APIs I needed to publish.  Using AMPLIFY Runtime Services made this super simple!  I just typed acs publish and my APIs were now hosted in the AMPLIFY Cloud!

Securing APIs with Proxy

Given the JWT token from my Authentication/Authorization APIs, I wanted to secure my newly created resource APIs. If you didn’t already know, quicker than Santa can hop down the chimney, you can use AMPLIFY Central to create a proxy for your existing APIs!  AMPLIFY Central helps you create a unified management layer over your Cloud and On-Premise APIs where you can enforce policies, establish credentials, and monitor usage.

I simply added a policy to add rate limiting and secure by API key but I was also going to use the new AMPLIFY Central feature that allowed me to secure my resource APIs by JWT.  It was easy to set up and I now had secure APIs to use with my mobile app and other APIs!

Publishing to Catalog

Now we need a place for individuals and teams to discover and use the APIs and Integrations that I created.  With one click, I am able to take my APIs in AMPLIFY Central and publish them to the AMPLIFY Catalog!  Other teams can now search for and test these APIs without my (or an IT specialist’s) support.  Oh!  And did I mention that the other teams can make requests to any of the cataloged endpoints using forms auto-generated by AMPLIFY based on the Swagger definitions! While I love testing everything in Postman, this makes it easy for users to experiment and test the APIs right from AMPLIFY Central!

Now, I can hand this over to the Axway Griffin innovation Lab Team and they can get started working on the cool dashboard for the event! I will go into more detail about this in the following section.

Third-Party APIs

As awesome as the APIs I created are, there were other APIs that I wanted to talk to as well!

Google Sheets API

I didn’t have to, but I chose to also integrate with the Google Sheets API. The reason this appealed to me as I needed a quick way to allow the party organizers to enter winning raffle ticket numbers that would then be announced to employees using the mobile app. With a little JavaScript code in the Google Sheet, I was able to quickly create an interface to enter data that could then be accessed via an API. Oh! And I was, of course, able also able to add this API to AMPLIFY Central so it could be secured as well!

Microsoft Office 365 API

The Microsoft Office 365 API gave me access to employee avatars and metadata that I could use to enhance the mobile experience! Our team has posted several blog posts showing the many examples of 3rd party API, such as Salesforce and others, that can easily be integrated using our AMPLIFY products!

I spoke not a word, but went straight to my work,
Building Titanium apps is an Axway perk!

On iOS! on Android! with Titanium and Alloy!

Now I needed a solid mobile app that could tie this all together (and put a bow on it)! But it had to be done quickly because I am pretty sure I already heard Santa on the rooftop!

Mobile App

This was another easy decision! Our AMPLIFY Titanium Native Mobile solution is not only free and open-source but it is also the most mature cross-platform native mobile product in the mobile app landscape. What exactly is “cross-platform native” you ask? Well, it allows me to create a mobile app in JavaScript (using whatever IDE I choose) and generate a native app (Objective-C, Swift, and Java) for iOS and Android!! The flexibility of JavaScript with the power of Platform Native!

I love using Microsoft Visual Studio Code and that’s what I chose to use for this project. I needed to work fast (did I mention the tight time frame?) so I quickly created a new Titanium app project and got to work. The flexibility and power of Titanium + Alloy gave me everything I needed to create a lot of screens and integrate with platform features such as camera, photo gallery, secure storage, animations, and much, much more!

Working with APIs is easy with Titanium and was able to take advantage of the many open-source JavaScript packages available on npm. I first integrated with the Authentication API and stored the JWT in a secure Keychain using the Ti.Identity module. I could then use this JWT access_token as a Bearer token to authenticate with the many resource APIs I had created earlier.

amplify-logincamera-permissionsphoto-permissions

Streaming Live Data

Earlier, I talked about using Google Sheets to allow the party organizers to enter winning raffle ticket numbers. I could set up something to poll to update the list in the app but I wanted it to be as close to real-time as possible.

Enter AMPLIFY Streams.

Introducing AMPLIFY Streams

AMPLIFY Streams allows you to turn any RESTful API into a streaming API that uses SSE (Server-Sent Events) to stream data to your API or mobile device. With one HTTPS connection, it will send the initial payload and then only send the actual data that was changed or added; all in the same HTTP connection! You pretty much just set it and forget it. Using the Backbone Collections that are built into Titanium Alloy, I could then keep the list up-to-date, as well as alerting users on their device.

axway-amplify-winnerAMPLIFY-better-together

Reporting Dashboard

With the mobile app and APIs complete, we needed a way for employees to be able to see a live dashboard highlighting the activity of the event.

For this, I handed it over to our Griffin Innovation Lab experts:  Leor Brenman, Rick White, and Darren Mason! With just a few days’ notice, they were able to create an awesome dashboard that was displayed on the television screens at the event. To create this quickly they relied on AMPLIFY Integration Builder, which is a iPaaS (integration platform-as-a-service) low-code solution for integrating with APIs in the cloud and on-premise.

Using AMPLIFY Integration Builder, they could integrate with our AMPLIFY BaaS and High Charts to display multiple charts and graphs of employee activity. This solution provided real-time data and a web dashboard that added a lot of fun and excitement to the event!

JavaScript is a winner!

JavaScript is one of the big winners of the project!  We were able to use and share JavaScript and Node.js modules across AMPLIFY Titanium Native Mobile, AMPLIFY API Builder v4, AMPLIFY Integration Builder, and even in the Google Sheets script editor!  This is a huge win for developers and architects looking to simplify their ecosystem by sharing Architecture approved components across both APIs, Mobile, and Integrations!

AMPLIFY FTW!

This was a great experience! Thanks to Axway AMPLIFY, I was able to create an integrated API holiday experience and be able to deliver it to our employees on their own device.

amplify-flow

That’s the power of Axway AMPLIFY in the palm of your hand!!

🎅🏻 As far as Santa, I didn’t catch a glimpse…
But I heard he installed the app and is using Axway AMPLIFY to power his sleigh!! 🛷

He sprang to his sleigh, to his team gave a whistle,
And away they all flew like the down of a thistle.
But I heard him exclaim, ere he drove out of sight,
MERRY CHRISTMAS TO ALL, AND TO ALL A GOOD-NIGHT!

1 COMMENT

Comments are closed.