Vampiric Engineering (2/?)
Tags: webdev, programming, showdev, watercooler
Published: 2022-09-03 20:10:04

## The quest to build observability tools for my own body (Part 2)

Find part 1 [here](https://www.ryanburke.io/blogs/vampiric-engineering-2ie6)

### Time for integrations

Now I've got my blood glucose levels reading out to my phone every 5 minutes instead of manual pinprick tests 4 or 5 times a day which gives me so much more data to work with (and it's a lot less painful!)

Now I needed to tackle the initial features list I set out:

1. Long-term data backups

2. Trend reporting

3. Web Dashboard
 
4. API for the glucose level readings
 
5. Hypo alerts for my partner

Now I was sure there were other diabetic developers out there working on this (because I'd met some) so there had to at least be a framework out there to help me.

### Enter Nightscout

Very fortunately for me the [Nightscout](https://nightscout.github.io/) project had been long on a mission, to quote them.

> We are compelled in the pursuit of humane and equitable application of technology to liberating people from the burden of diabetes.

Perfect! Exactly what I'd been looking for, fairly well documented, a community of developers and even better something I can give back to once I'm all settled.

Nightscout gives me some of the features I'm looking for out of the box and a fairly well configured Heroku to save me messing around with infrastructure until I'm ready (it'll be moving to AWS at some point as the Heroku free tier is being phased out this year).

### Lets get it moving

![Nightscout deployment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vz9s5r3zao39xcjqf2q7.png)

Being impatient I'll be using the preconfigured Heroku deployment the project provides and the recommended cloud hosting of MongoDB to keep the data backed up so this was all fairly straight forward (and free).

Heroku doesn't provide custom domains with SSL support on the free tier so looks like that's another task for once I move it over to AWS.

But a little bit of config plus some account set ups later and I have an API I can post glucose data to, I just needed to configure my uploader.

![Uploader integration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xyjen1gq1po1ra7w8b91.png)

And huzzah I have a functional dashboard, showing my entire glucose history, long term back ups of my data and an API to integrate everything else with.

![Nightscout dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2xjj0ixqk33ql3bcse4.png)

Just one more thing I wanted before I put this down for a little bit.

### Time to do something with that data

I wanted all this data so I can start to learn and improve my health with it, so I needed reporting tools and to my joy some lovely developer has built a plug in for Nightscout to give me just that.

![Reports](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/md8h9n7bvtd8fucjhecm.png)

Now with some config and some study (to understand what a bolus is) I had daily, weekly and monthly reports showing trends and stats that both me and my doctor can use.

### In summary

The first hurdle of this was made infinitely more accessible thanks to a community of like minded developers I look forward to contributing back to with my AWS expertise.

All my initial features were now complete including an app that subscribes to the API and can alert my partner to hypos, all I needed was the provide the URL for my nightscout API and boom, my partner is much more at ease.

![Alert app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gf7jrut5kgjxtjfkg6ov.jpg)

So in the next article, we're on to the fun stuff, getting values on my watch, my i3 status bar on linux, moving to AWS, probably some custom CSS work etc. See you then!