Keep Canada Working

Awareness and support-gathering campaign

All development

  • web
  • front-end
  • back-end
  • ES6
  • cssnext
  • Twig
  • serverless
  • Lambda
  • AWS
  • MySQL
  • Tribal

https://register.keepcanadaworking.ca/

This was a pretty simple one, and I built the majority of it in under a day.

It’s built from Javascript and Twig sources to static HTML with Webpack.

The original requirements were for several different versions which would differ only in images and text. Since differences were likely to be slight, I originally had this built from a “base” set of data which would then be extended for each version with the minimal replacement data to override what was necessary. However, requirements changed, and now there’s just one version.

I wanted to try out the Serverless Framework on this project. Though I found the documentation lacking, it did make the process of developing and testing Lambda functions much smoother than doing it all manually. There are three Lambda functions associated with this build:

  1. Set up the database table. This is of course not accessible via a regular web endpoint.

  2. Handle the form submission, adding users’ details to a database. I wanted to try out DynamoDB but couldn’t: requirements stated all data needed to remain within Canada (fine) and be encrypted at rest (not yet available in DynamoDB in Canada). So instead data is stored in an Amazon Aurora MySQL database.

  3. Get a CSV report on the recorded data, and this endpoint is password-protected. It was interesting and frustrating to find while developing this that it’s not possible to fully implement HTTP Basic Authentication via AWS Lambda and AWS API Gateway, due to “known issues” in API Gateway.

Update, a week later

They ended up wanting a second version after all! Essentially it’s the same thing with the form moved to the top and restyled. That’s up on a subdomain.

Another update, after another month

A lot of changes were made by other developers to the first version I built, and this new version is at the original URL I posted. The “register” version as I left it is still up, so I’ve updated the URL for this project to point to that version.