FitVis Nutrition - A Journey Towards Sustainable Changes in Eating Habits
FitVis Nutrition is a project focused on food analysis and the long-term improvement of eating habits. However, we do not want to create another application that simply shows users a table of nutritional values and tells them everything they are doing wrong.
The main goal of FitVis is to help people change their eating habits gradually and in a sustainable way.
Why gradual change?
Imagine a person who has been consuming too little fiber for a long time. If they discover that the recommended daily intake is significantly higher than their current intake, they may try to reach the recommended amount immediately.
However, this may not be the ideal approach. Increasing fiber intake too quickly can lead to digestive problems, especially when the body is not used to a higher amount.
FitVis therefore does not simply want to say: "You are not getting enough fiber. Eat more of it."
Instead, the application tries to spread the change over time. If it detects a long-term deficiency, it can recommend gradually increasing the intake in smaller steps. The goal is not to reach the ideal value within a single day, but to build a new eating habit that a person can maintain in the long term.
We want to gradually apply the same principle to other areas of nutrition as well.
Food tracking
The foundation of the application is food tracking itself. Users can record the foods they eat, monitor their nutritional values, and gain an overview of what their diet looks like over time.
FitVis works with a food database and aims to make the process of recording meals as simple as possible.
The application also includes food scanning using the device's camera. This means users do not have to manually enter nutritional information and other details.
Diet analysis
Simply recording food is not the main goal. FitVis uses the collected data to provide additional context and help users understand their overall diet.
The application can track, for example:
- energy intake,
- protein, carbohydrates, and fats,
- fiber,
- selected vitamins and minerals,
- hydration,
- caffeine intake,
- body weight,
- long-term eating habits.
The combination of these types of information is particularly important. Instead of looking only at individual values, users can gradually understand how their overall diet works.
Energy throughout the day
One of the more advanced parts of FitVis is its approach to energy levels throughout the day.
Based on recorded food intake and other available data, the application uses a predictive model to estimate when a person may approximately experience a drop in energy.
This is not a medical prediction, nor is it intended to determine the exact moment when someone will become tired. Instead, the goal is to provide another layer of information that can help users better understand the relationship between their diet and how they feel throughout the day.
When should you eat a particular food?
FitVis does not focus only on the question of "what to eat", but also on "when to eat it".
The application can analyze individual foods and their suitability at different times of the day. This can be useful when planning meals before physical activity, during the working day, or in the evening.
Again, the goal is not to create a rigid meal plan for the user, but to provide information that can help them make better decisions.
Meal planning
Another part of the application is planning meals in advance.
Users can plan what they are going to eat over the following days instead of deciding what to eat only when they are already hungry.
FitVis can take into account not only individual meals, but also overall nutrient intake and longer-term goals when planning.
The application also includes sections for recommended foods and frequently consumed foods, helping users speed up the planning process.
Hydration, caffeine, and weight
FitVis does not focus exclusively on solid food.
The application also allows users to track fluid and caffeine intake and record their body weight. These data can then be used together with information about their diet.
The goal is to gradually create a more comprehensive picture of the user's lifestyle, rather than simply maintaining a list of individual foods.
Sharing with friends and experts
FitVis also includes a social and expert-oriented component.
Users will be able to share their data with other people, such as friends or experts. This can be useful when someone wants to discuss their diet or needs additional support while making long-term changes to their habits.
Technical architecture
From a technical perspective, FitVis is already a relatively large project. It is not just a single mobile application, but an entire system consisting of several separate components.
The mobile application is built using Flutter and Dart. Flutter was chosen primarily because it allows us to share a large part of the codebase across platforms. I have also made several modifications to the framework to allow the application to run on the web.
In addition to the application itself, there is also a presentation website built with Next.js.
Databases and search
The data layer uses a combination of MongoDB and PostgreSQL. Each database has its own role in the architecture depending on the type of data and how the application works with it.
For search, we use Elasticsearch, which allows us to efficiently work with a large food database.
The infrastructure also includes Redis, which we use for caching and speeding up frequently performed operations.
Vector-based food matching
One of the more technical parts of the project is food search and matching.
We use vector representations of foods together with FAISS, which allows us to efficiently search for similar items in vector space. These vector representations are then used for efficient food matching.
This is particularly useful when processing user input, as the user's entry may not be exact or may differ from the name stored in the database.
The system can therefore search for semantically similar foods and then use additional logic and AI to evaluate the results.
AI and automated processing
AI is not used as a replacement for the entire application. Instead, it is used primarily where it can help with data processing and interpretation.
We therefore combine traditional database search, vector search, our own application logic, and external AI APIs.
The goal is to assign each task to the technology that is best suited for it. Simple operations do not need to be sent to an AI model, while more complex interpretation can be handled using AI.
Storage and authentication
We use Cloudflare R2 for storing files and images.
Authentication is handled by our own authentication system together with sign-in through Google and Apple.
The entire project is operated using Docker, allowing individual parts of the system to be separated and consistently deployed across different environments.
Administration and expert dashboard
FitVis also has its own administration interface built with ASP.NET Core.
A separate expert dashboard is being developed using Next.js, React, TypeScript, and Tailwind CSS.
This allows the regular user to have a simple mobile application interface, while administrators and experts can work with a more extensive interface tailored to their needs.
Internal documentation and additional services
The entire project is planned and documented in Notion, which serves as our internal database for information related to the application and its development.
For transactional and system emails, we use the external service Resend.
The individual parts of the system are separated according to their responsibilities, meaning FitVis does not depend on a single monolithic solution.
Current state
FitVis Nutrition is currently in internal testing. A functional version is available for iOS, Android, and the web, and we are gradually testing individual features as well as the system as a whole.
The project is therefore no longer just a prototype or concept. The core infrastructure, application, and supporting systems are already in place, while further development is focused primarily on improving, testing, and connecting them.
Where FitVis is heading
The long-term goal is not to create another application that simply tells users how many calories or nutrients they consumed during the day.
We want to build FitVis as a tool that helps people understand their own eating habits and gradually improve them.
Instead of immediately pushing users toward a perfect diet, we want to work with small changes that can gradually become a natural part of everyday life.
It is this combination of food tracking, analysis, predictions, planning, and gradual recommendations that we believe can distinguish FitVis from conventional calorie-counting applications.