A full-stack nutrition tracker for logging meals, hitting your macro and water goals, and keeping a daily streak going. You can add foods by hand, save the meals you eat often, or just scan a barcode and let the app fill in the details.
- Tracks calories, protein, carbs, and fat against targets you set yourself
- Logs water and (optionally) creatine, with a daily streak to keep you honest
- Scans barcodes to pull product info, with OCR as a fallback for reading numbers straight off packaging
- Lets you save reusable meals and ingredients, or log one-off items for a single day
- Signs you in with email/password or Google, both backed by JWT
- Runs as a PWA with light/dark themes and multi-language support
When you save a day to history, water, creatine, and any one-time items reset for the next one.
You'll need Node 20.19+ (or 22.12+) and MySQL 8.
git clone https://github.com/KoZsombat/Sproutly
cd nutrition-app
# install both sides
cd client && npm install
cd ../server && npm install
# set up the database
cd ..
mysql -u root -p < database/schema.sqlNext, set up your environment. Copy the server example and fill it in:
cp server/.env.example server/.envThe important ones are your MySQL connection (DBHOST, DBUSER, DBPASSWORD, DBNAME), a JWT_SECRET and SESSION_SECRET, and FRONTEND_URL / BACKEND_URL. Google login is optional — leave GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET blank to skip it.
Then create client/.env with one line pointing at the API:
VITE_API_URL=http://localhost:3000Start both and open the app:
# in server/
npm start
# in client/
npm run devThe frontend runs at http://localhost:5173.
React 19 + TypeScript on the front, Express 5 + MySQL on the back. Barcode scanning uses the Scanbot Web SDK with ZXing and Tesseract.js for OCR, auth is JWT with optional Google OAuth via Passport, and the build is Vite with PWA support. The API and database schema live in server/src/routes and database/schema.sql if you want to dig in.
Built as a portfolio project, provided as-is.