Hello Flutter Flow Community,
I am currently trying out FlutterFlow and building my first app to get an idea of how it works. I am working on an app that features a list of food items, each with detailed nutritional information, and a collection of recipes composed of these food items. The app aims to calculate the total nutritional value of each recipe based on its ingredients. Additionally, I plan to include a user authentication system using email.
The core components of my app include:
Food Database: Contains items like bananas, tomatoes, potatoes, etc., along with nutritional details such as calories, carbohydrates, and protein for a standard weight (100g).
Recipes: Recipes are designed for a specific number of portions (e.g. 2, 3, 4 portions) and are made using ingredients from the food database, with specific weights for each ingredient (e.g., 70g tomatoes, 114g potatoes).
User Database: Simple authentication system that uses email.
I am facing challenges in structuring my Firestore database, especially in linking the food database with the recipe database effectively. The goals are:
Ensure recipes are composed only of items from the food database.
Allow users to add new ingredients to recipes, which also updates the food database.
Calculate the total nutritional value of recipes based on the ingredient weights and nutritional information.
Could anyone provide guidance or examples on how to structure this database to achieve these functionalities efficiently? Specifically, I am looking for advice on:
A logical way to structure the data model for this app.
Best practices for linking the food and recipe databases.
Strategies for dynamically calculating recipe nutritional values.
Any insights or references to similar projects would be greatly appreciated. Thank you in advance for your time and help!