This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
I wanted to build a nutrition tracker that didn't make me do the most annoying part of nutrition tracking: manually searching for every food, figuring out the serving size, and entering everything one value at a time.
So I built NutriTrack.
The idea is simple: I should be able to type something like:
"2 boiled eggs, a glass of milk and 250g chicken"
and have the app turn that into useful nutrition data.
It started as a small React prototype. Then I kept adding things to it.
Authentication. Firebase. Firestore. Gemini. Food logs. Goals. Streaks. Date handling.
Eventually, the frontend was doing way too much. Every new feature seemed to create another problem somewhere else.
So instead of continuing to patch it, I rebuilt it properly as a full-stack MERN application.
Now it has:
Natural-language food logging using AI
Daily calorie and macro tracking for calories, protein, carbs and fats
Date-based food history
Custom nutrition goals
Daily logging streaks
JWT authentication and protected routes
MongoDB persistence for users, food logs and goals
A separate Express API between the frontend, database and AI layer
Validation and error handling for things that inevitably go wrong.
Demo
The core flow is:
Register/Login → Dashboard → Describe what you ate → AI analyzes it → Food gets logged → Daily totals update
You can also change dates, edit nutrition targets, delete food entries, and track your logging streak.
Code
How I Built It
The frontend is built with React, Vite and Tailwind CSS.
The backend uses Node.js and Express.js to expose REST APIs for authentication, food logs and nutrition goals.
MongoDB + Mongoose handle persistent data storage, while JWT and bcrypt handle authentication and password security.
For the AI layer, I used the Gemini API to analyze natural-language food descriptions and return structured nutrition data such as calories, protein, carbohydrates and fats.
One of the biggest architectural changes was moving the AI call from the frontend to the backend:
React → Express → Gemini → MongoDB → React
That keeps the API key away from the client and makes the AI layer something I can improve or replace without rewriting the whole application.
Why Does Open Innovation Matter?
This project probably wouldn't exist in its current form without the huge ecosystem of tools and ideas I could build on.
React, Vite, Tailwind CSS, Express, MongoDB, Mongoose, JWT libraries and the rest of the JavaScript ecosystem let me focus on building the product instead of reinventing basic infrastructure.
For the AI part, I used Gemini through its API rather than running an open-weight model locally. That means the AI itself isn't open-source, and I don't want to pretend otherwise.
What the open ecosystem did give me was the ability to build the application around modular pieces. The AI is just one service in the architecture. I can change the model, change the nutrition-analysis logic, or eventually run a different model locally without rebuilding the entire application.
For me, that's what open innovation made possible: taking existing tools, combining them in a way that solves a real problem, breaking things when I inevitably got ambitious, and then rebuilding them better.


Top comments (0)