As part of the post, you’ll read about my private side project – an application for automatically generating a ketogenic diet. Thanks to it I can save even one hour a day!
Laziness – a driving motor
Man is lazy by nature. In this matter, I am no different from the majority of the human population, but I try to fight it. I am not always successful in this field, but in this war, every smaller battle wins motivate me to continue. I am a lazy person and I always try to automate repetitive activities. At the same time, I am a big fan of the ketogenic diet. It is a diet that requires many sacrifices and a lot of work. The ketogenic diet protocol demands a daily calorie intake of 70% fat, 25% protein, and only 5% carbohydrates. While creating meals, cooking and a restrictive menu are no problems for me, but preparing a menu is a nightmare. To create a daily menu for me and my wife for one day, I spend an hour on average. It’s really a lot of time!
I thought I had to try to save this time somehow. So I decided I will create an application that will do it for me! Of course, WEBCON BPS helped me with this.
MVP approach
The article presents the application in the simplest form that allows you to use it (Minimum Viable Product). My goal is to use the application as early as possible to be able to use the ketogenic diet and enjoy the time saved immediately. Of course, in my free time, I intend to develop the application and at the end of the article, I will present ideas for further functions and my plans related to it.
Base process – recipe database
First of all, it is necessary to create a recipe database. For this purpose, I created the “Diet Database” process with the “Dictionary workflow”, which consists of two types of forms:
- Ingredient – the most basic unit of recipes (fruit, vegetables, meat, etc.)
- Recipe – the recipe consists of a list of ingredients and other recipes
The workflow itself is very simple. At the registration step, we complete the form and register the ingredient or recipe. You can cancel or restore a given workflow element. Each of the forms has information on macronutrients as well as names and descriptions in both Polish and English.
Daily plan – the workflow for single day menu
Another process I prepared is to create a menu for a given day. This is the simplest possible workflow consisting of two steps. In the first step, we complete the menu for the day and then register the workflow element. This workflow is used to create a menu for a given day, manually.
Diet generator – the process of generating a menu for many days
The last prepared process is the workflow for automatically generating the menu for many days. Here the process is a little more complicated.
In the first step, you need to fill the simulation parameters to perform. Then the simulation runs on the “Register” transition path (I will write more about this in the next article). After a minute, a timeout starts, and automatically make a path transition. In “Is finished?” step, the system verifies whether the server-side calculations have been made. If so, it goes to the final step “Finished simulations”. The daily plan sub-workflows are registered on the transition path.
Below are examples of two different automatically generated daily menus wich met simulation conditions.
As you can see, the application is not very complicated, but it allows me to generate menus for several days. The application will definitely be developed by me. I have already planned more functionalities that I will want to implement:
- Extending the recipe database by several hundred items to make the diet varied and interesting
- Ability to register recipes based on recipes already registered in the system if some of them are similar
- The generation of a single PDF file with all recipes after generating the menu for several days
- Generation of a shopping list within the user-specified date range
Summary
The WEBCON BPS process engine can be used for many purposes that are not so obvious. They don’t always have to be boring business processes, such as shopping invoices or holiday approval. If you look at your life, you’ll find that many activities in our daily routine are also a process. Even such a normal activity as planning a menu and shopping list.