It looks good underneath the hood.

Technology used

Overview

The data is stored within a GitHub repo, while the application is driven by Cloudflare Workers. Finally, your browser will provide the required libraries and functionality for the Single Page Application (SPA) experience. The beauty of it all is, the microsite is also a Progressive Web App (PWA), which means that it continues to work offline too.

Process

Github

Github hosts the service worker and adatafile that features all the content, sections and some configurations such as colours. This file is publicly available and users with access can edit and re-commit the file. The Service Worker will turn the application in a Progressive Web Application (PWA)

The solemn aim of the datafile is to emimic an external data source, simialr to a detached CMS. The file we use is in JSON format and drives the content and type of sections (layout) of the pages. The purpose is to deliver the content in a machine readable way that is quick, safe and easy to digest. The service worker will provide the browser with further caching and loading instructions. Having this file on GitHub means that the file can adjusted and evolve over time from an external source without code changes to the Cloudflare Worker.

Cloudflare

A Cloudflare Worker (Webpack) uses the JSON file to populate the pages and create the HTML.

The Cloudflare Worker utilises the JSON file to review whether the requested page exists and what the content is. As there is no detached CMS in the background, there is some routing functionality at play, ensuring that the right content and status codes are provided to the user-agent. The duty of the Cloudflare Worker is to route the requested page to the right content and show the content; using the appropriate layouts and colours. The information is fully driven by the JSON file on GitHub, while the Cloudflare Worker is purely functional.

Worker

A Web Worker will ensure that the site becomes a Single Page Application (SPA).

To really review the extend of opportunities with this project, it will have a Single Page Application feeling over it. We will be using Web Workers to ensure that the main thread occupancy is reduced while a Service Worker will allow static and indefinite caching of all resources. Ultimately resulting in a fast and seamless user-experience with offline capabilities. No external resources will be provided, and the Cloudflare Worker will provide a Service Worker file on demand.