A simple web application that calculates daily caloric needs and macronutrient distribution based on user inputs. The app allows users to tweak their macros and caloric intake based on weight loss or fitness goals.
- Calculate baseline macros based on body weight
- Dynamic updates to macro distribution
- Goal-based adjustments for caloric intake and macros
- Responsive design for mobile and desktop
- Frontend Framework: Next.js 15 with App Router
- UI Library: React 19
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Hosting: Vercel (recommended)
- Node.js 18.18.0 or later
-
Clone the repository
git clone https://github.com/longda/diet-calculator.git cd diet-calculator -
Install dependencies
npm install
-
Run the development server
npm run dev
-
Open http://localhost:3000 in your browser to see the application
- Total daily calories =
bodyweight * 12 - Protein =
1 gram per pound of bodyweight(calories = protein grams * 4) - Fat =
0.5 grams per pound of bodyweight(calories = fat grams * 9) - Carbs = Remaining calories / 4 (grams)
The easiest way to deploy this application is using Vercel:
npm install -g vercel
vercelMIT