Deploying a Single SPA Application on AWS

This post is a follow up to Hosting a Single Page Application in AWS. It builds on that article with some specifics for the Single SPA micro frontend famework. There are couple core problems to solve here when using the recommended setup outside of just hosting the applicaiton as described in the article linked above.… Continue reading Deploying a Single SPA Application on AWS

Give Modals, Drawers, and other Overlay Elements URLs with React Router

One of my pet peeves about webapps is that actions that happen in things like a modal or other popover are often not linkable. This makes sharing those actions with others hard: send a link to the original URL along with instructions about what to do in order to trigger the overlay. A much better… Continue reading Give Modals, Drawers, and other Overlay Elements URLs with React Router

What is Self in a Service Worker?

After researching service workers a bit, none of the tutorials seem to explicitly state what self actuall is. It's a ServiceWorkerGlobalScope implementation. The events passed to the install and activate listeners are ExtenableEvent implementations. This is where the waitUntil method comes from to force an event listener to wait until a promise resolves. The install… Continue reading What is Self in a Service Worker?

Handling Authentication Tokens in Single Page Apps

There are broad scenarios in which a single page app (SPA) needs to handle authentication: The SPA is using an API custom built for the app itself -- the API being used is not public in any other way The SPA is using an API built for public consumption -- one with a full fledged… Continue reading Handling Authentication Tokens in Single Page Apps

Building an Upload System Backed by S3 and Client-Side Uploads

Client-Side S3 Uploads

One of the things I try to do when building applications is keep servers stateless. This makes those servers easy to throw away -- a piece of infrastructure failing (which it always will) is not a big deal with stateless servers. Just spin up a new one. When the requirement came down the pipeline to… Continue reading Building an Upload System Backed by S3 and Client-Side Uploads

How to Monitor Client-Side Upload Progress (with XMLHttpRequest)

XMLHttpRequest Upload Progress

Showing a user something like a progress bar during a file upload is handy and let's them know that stuff is working. Higher level abstractions like fetch don't really provide a look into how much of a request body has been sent, but good ol' XMLHttpRequest does. In order to monitor upload progress, attach an… Continue reading How to Monitor Client-Side Upload Progress (with XMLHttpRequest)