Vertical Farming Apps

To the project

Disclaimer: I have signed a NDA so I can only vaguely talk and show the project. I was employed by the company and worked there for 2 years.

The Concept

The concept is simple: building a hydroponic vertical farming system that is as efficient and automated as possible. And prototyping along the way. The team consisted of two juniors and one part time senior and me. I lead the team for the latter part of the project. The produce that we focused on was lettuce for the most part.

The different parts

For realizing the concept we needed few different parts:

  • Farming App: An app for the farmer to monitor, control the system and collect plant data.
  • Planning App: An app for the production planner and the biologist to evaluate the data and plan the production.
  • IoT devices and servers for communicating with sensors, cameras and other automation devices in the farm.
  • A website for marketing the project.

Tech Stack

For almost every front facing app we used React and especially for the Farming App which I was primarily developing I used React with recoilJs and NestJS with Typescript in the backend. Most of our backends were NestJS with Typescript and MongoDb. But I also used Python, FastAPI, Matplotlib and Pandas for the IoT devices and for analyzing the data.

  • React (sometimes as PWA)
  • State management with RecoilJs and MobX
  • NestJS with Typescript for the backend
  • MongoDB
  • Playwright for end to end testing
  • Jest for unit testing
  • Python with FastAPI, Matplotlib and Pandas for the IoT devices
  • Docker for deployment
  • Orchestration with Docker compose
  • Github Actions for CD/CI
  • Husky for pre-commit hooks
  • Sentry for error tracking
  • Grafana for monitoring
  • Wordpress for the Website
  • Telegram bots for alerting and humoures notifications
  • Raspberry Pi for all the IoT devices
  • ESP32 for small sensors

My Responsibilities

I was the lead developer and was responsible for basically everything that had to do with the Farming App. I was also responsible for the backend of the Farming App and the Planning App. I also helped with the IoT devices and the website. I was also responsible for the CD/CI pipeline and the monitoring of the apps. One day my team lead wanted to write down all responsibilities I had in the project and let me put it that way: It was everything an IT could ever do in a project. I was responsible for Networking, Backend, Frontend, IoT, DevOps, Monitoring, Testing, Security, Documentation, Support, Machine Learning, Debugging IoT Devices, teaching the juniors and help them write better code and so on. But I really liked it and learned a lot.

My traumas

I just want to say one word. Bacnet. I was the Bacnet guy in the team and to put it simple, it was really goofy and unpredictable. But I extended a node-bacnet library, added Typescript and some new features for it to fit my needs. I really hope the next guy responsible for it will survive it.

The cool sidegigs

Sadly I can't talk much about it but here is a short list of awesome sidegigs I had:

  • (Simpy)[https://simpy.readthedocs.io/en/latest/] for simulating processes and workflows. I also wrote a small wrapper for it to make it more user friendly and to fit our needs.
  • Microsoft Kinect with OpenCV to capture and analyze 3d data of the plants.
  • In charge of managing and setting up raspberry pis for the IoT devices.
  • Extensive network debugging and internal DNS troubleshooting.
  • Writing a Telegram bot for alerting and notifications. We did it in a godfather theme and every notification was hillarious!
  • Setting up Grafana for monitoring and alerting.
  • Writing all the python scripts for the IoT devices and the data analysis.
  • Proposing Logo ideas and helping with the website.
  • ESP32 for ultrasonic sensor testing. I hosted a small react app on the ESP32 to visualize the data. It was overkill but in a good way.
  • Writing a small python script for the Kinect to capture 3d data and send it to the backend.
  • Setting up cameras and python servers with FastAPI.

The Outcome

The project is still ongoing and I am not part of it anymore. But I am really proud of what we achieved in the time I was there. The team was awesome and I learned a lot. I am really grateful for the opportunity and the trust they had in me. I am looking forward to see the project grow and to see the first commercial lettuce being harvested.