Anshin

Anshin

I live by myself far away from my relatives, which can can make them worried if they don't hear about me for too long. To reassure them, I made a simple web application which displays my recent activity alongside a list of emergency contacts.

Article image

Because the app did not require any kind of interactivity, I decided to build it using Astro. As the recent activity needs shown on the app to be up to date, Astro is in SSR mode with the Node.js adapter, thus fetching the latest data every time the page is requested. The app is written in TypeScript and uses the Tailwind CSS framework for styling.

The "Recent activity" section displays data queried from Loki, which can be fed data from various sources. Here, a used a simple Node-red flow to forward MQTT motion sensor messages to Loki.

Article image

On the other hand, the emergency contacts are provided as a .yml file which is parsed by the Astro application at runtime.

The app is currently deployed on my Kubernetes cluster. However, as it displays personal information of my emergency contacts, I didn't want to make it fully open to the public. On the other hand, implementing an authentication mechanism would have been too involved for such as simple project. As such, access control is achieved using basic authentication configured on the corresponding Kubernetes Ingress. More information about this process can be found in this article.

As usual, the source code is available on GitHub.