Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MacroBud

Tracking macros gets tiring, and when we eventually all give up, we just start estimating in our heads. Macrobud estimates for you, giving more accurate figures so you actually hit your goals.

Prerequisites

  • Node.js (v18+)
  • Python (3.10+)

No database install needed -- the app uses SQLite which is built into Python.

Setup

1. Backend

cd backend
pip install -r requirements.txt

Add your OpenAI API key to backend/.env:

OPENAI_API_KEY=sk-your-key-here

Start the server:

uvicorn main:app --reload

The API runs at http://localhost:8000.

2. Frontend

cd frontend
npm install
npm run dev

The app runs at http://localhost:5173.

Usage

  1. Open http://localhost:5173 in your browser.
  2. Type one or more foods into the input (e.g. "1 slice of rye bread, 2 eggs, a glass of milk").
  3. The app sends your input to OpenAI, which splits multi-food entries and estimates macros for each item.
  4. If anything is vague (e.g. "chicken breast" without a quantity), you'll get a prompt to clarify.
  5. Your running totals update as you add or remove items.

Tech Stack

Layer Technology
Frontend React + Vite
Backend Python + FastAPI
Database SQLite
AI OpenAI gpt-4o-mini

About

Macro tracking web app with built in AI Copilot which gives helpful diet suggestions based off current eating habits.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages