A Professional API Setup for an Energy startup
Homii now has a production environment for their API with a proper CI/CD pipeline. Their infra is deployed with each releases on AWS using Docker and Github.
- Energy sector
- Programming languages
- Technologies used
- Django REST Framework
- Domain Architecture
- Software Development
- 2 months
Gas prices have been rising steeply since the start of 2022. Many people in the Netherlands live in block heated apartment buildings, where several flats are heated by the same boiler via a network of pipes for natural gas distribution. This results in households having no insight into their individual gas usage. Homii sets out to resolve this by converting all meter readings of the building into a dashboard where people can see their current energy consumption alongside a consumption forecast for the rest of the season.
Homii needed a mobile-first web app designed to provide insight into energy consumption and the expected costs associated with their consumption, for people living in block heated apartment buildings. BiteStreams was tasked with building a back-end for the mobile/web app that integrates the necessary data sources and provides usage reporting to the user, along with their expected future costs. In this case-study, we present how we set up a flexible cloud-based back-end and the technologies we worked with over the course of two months.
For every building, we ingest and process new heating-meter data every two weeks, via a file detailing consumption for each heater in the building. The first step we took was to efficiently propagate this data, while making the uploading of new data simple for non-technical administrative users. We leveraged Django framework internals to streamline the data processing they had to do in batches. Having an idempotent data pipeline meant we minimized mistakes when uploading new data and guaranteed API consistency. We used pandas to parse and transform raw information using data interpolation. This made the second step, calculating consumption and cost per household, much less complex.
AWS services are used for app hosting and data storage.
We built a state-of-the-art REST API that can be used with any kind of front-end, using the industry standard, JWT for authentication. The project has an API for the app to authenticate with and request resources from. Resources include information like user details and estimated expenses for a flat. We set up a system where users can seamlessly register via a registration link, which pre-fills all required fields, making the app ready to use at first launch. The user is free to request reports about their energy consumption and the cost over any period of time in an instant. This is made possible by our efficient data storing and loading. To ensure that the front-end is highly available and has fast response times, we deployed the front-end as a static site behind a CDN, AWS CloudFront in this case.
As a result, we produced an MVP with a cloud-based production-ready architecture. We ensured that the data was flexible and processed as accurately as possible. Indeed, the core business value of Homii is giving users accurate predictions of their heating usage. The app is easy to use for both administrative users and customers alike. As with every other project, we practiced test-driven development, ensuring high quality software which can easily be adjusted to new emerging requirements. In addition, the product was set up in such a way that future heating predictions can easily be fed into the calculations as well.
Do you want a solid foundation? Contact us now
Get more data-driven with BiteStreams, and leave the competition behind you.Contact us