Skip to Content


Posted on 2 mins read

EnergyRocks is a company that helps businesses save money on their energy provider.

Stephen and Andrew approached me with a well thought out specification, and in order to reduce time-to-market, we decided to build the app out as a GraphQL backend with a React frontend. This would allow us to bring in a React dev so that we could build the frontend and backend out quickly, without needing to change things on the backend as the frontend evolved.

As it happened, we were unable to find a decent React dev with availability, so I ended up building this portion of the project too.

Building the frontend in React, and using Apollo as the GraphQL client meant that we could do away with much of the state management that I’ve often build with Flux apps. This trimmed the amount of code required and allowed be to get the build completed in less time, and with a smaller codebase!

For infrastructure, I wanted to ensure that we had redundancy while still maintaining a simple push-to-deploy system. Flynn was chosen as for this purpose, and I put together a set of Terraform and Ansible scripts to spin up a three node cluster on DigitalOcean, with backups sent to AWS S3.

Flynn doesn’t quite natively support LetsEncrypt just yet, though there is work being done with this goal in mind. In order to get the certs installed and deployed, I put together a script to run dehydrated and update the apps with the new / updated certs.

Datadog is used to monitor the health of the cluster and apps, and Skylight provides really decent insight into app performance.