Flora Feed is a project that combines two of my passions, nature and technology, to make life a little bit easier! With Flora Feed, I can remotely check my Callisia gentlei var. elegans plant's moisture levels to determine whether or not it needs to be watered soon, and check on images of it throughout the day! I love applying technical solutions to practical problems, so this has been super fun to develop so far! Keep reading to learn about how this project works under the hood or check out the dashboard to see the live moisture levels and an hourly image of my plant!
Flora Feed can be broken down into a few different main components- software, hardware, and infrastructure. Let's dive in!
Being a software engineer, I don't get to interact with hardware during my regular work as much as I would like to, so this project was a great opportunity for me to branch out and explore this other side of the tech world! The setup for this project is a bit rudimentary, but it gets the job done. I am using an old Raspberry Pi 4 Model B that I've had sitting around and I wired it up to a capacitive moisture sensor via a breadboard.
To make this project possible, I wrote a Python script that reads data from the moisture sensor and takes a picture with the camera mentioned above at the top of every hour (via a scheduled cron job). These are then both sent via HTTP POST requests to their respective Java (Spring Boot) based microservices, which authenticate the requests using API keys and then, upon successful authentication, persist the moisture reading data in a MySQL database and the photo to AWS S3 storage.
The front-end (what you are looking at right now) is built using Next.js and Tailwind CSS in conjunction with NGINX and Docker! To retrieve the data to be displayed, it makes HTTP GET requests to endpoints on the backend. Once it has the data, it does a bit of manipulation wherever necessary and then visualizes it!
I am using a microservice-focused architecture to enable scalability, optimization, and fault tolerance on this project as it expands. This will also help me easily swap out service implementations whenever needed.
To really bring this project to life, I wanted to make this project available to the public! The frontend, backend, and database are all hosted on a DigitalOcean droplet, though I hope to separate these out in more efficient ways in the future! I also rely on AWS S3 for image storage and retrieval.