M.A.Ge - Introduction
Roadmap
- Introduction
- App navigation
Introduction
Everyday most of us have a problem “What to prepare for breakfast, lunch or dinner?” So, why not to make a mobile app?
Yes, there are already great apps that generate your menu. There is a great project Eat This Much. Now there are lots of useful features and paid subscription. But, when I started making this project it was still in beta test stage and didn’t have features that I needed.
I wanted my app to be as simple as possible. so I didn’t want to have nutrition plans and calorie counting. I don’t count calories, my friends and relatives don’t count calories. The only people who count calories are those who have special diets. I just wanted an app that could make me a diverse menu, not just rotations of potatoes/pasta/rice.
When I make a menu I have simple rules:
- At breakfast serve only breakfast meals (no soup/pasta)
- For breakfast use high_carb, free, low_carb products
- For lunch use low_carb, high_carb, protein, fat, free products
- For dinner use protein, free, low_carb, fat products
- On weekends I can make meals with long preparation time
I started to think how to transform this rules into coding as class hierarchies and express rules by writing code inside methods.But then I came across a wonderful article “Wizards and warriors” and post on Stackoverflow. In the article author described a system, where rules are data, not code, and finds it to be more flexible. So I decided to give it a try.
Images and text
Wizard icon was created from an icon by Freepik - Flaticon
Images:
- from PIXNIO and Pixabay are covered by the Creative Commons license and marked with “CC0”.
- my friends sent me their photos
Meal ideas - I asked my friends to write down what meals they usually prepare in everyday life.
Text - I wrote and translated by myself with the help of Google and DeepL Translators.
Software
- Python - because I wanted to improve my Python skills
- framework Kivy - because it is easy to use, cross-platform and fast
- KivyMD compliant widgets - to make the app visually look more native
- I also made custom widgets, buttons and layouts based on KivyMD
- Plyer - Python API for accessing hardware features of various platforms (Android, iOS, macOS, Linux and Windows)
- Pytest - all backend code is covered with tests
- kivy.storage.jsonstore - is used to save settings
- UnQLite - NoSQL database engine for storing recipes and rules
Localization
Localization in three languages (English, Ukrainian and Russian) is made using Babel. The user should choose the language at the app initialization and can change it only through new installation.