A simple, scientific daily protein calculator built with React, TypeScript, and TailwindCSS. Get your personalized protein needs based on current sports nutrition research - answers the question: "How much protein do I need to consume daily?"
This calculator provides a single, clear answer: your daily protein requirement in grams, based on your body weight and fitness goals. No tracking, no complexity - just scientifically-backed protein calculations.
- Scientific Protein Calculation: Based on current sports nutrition research (0.8-1.2g per lb)
- Dual Unit Support: Works with both pounds (lb) and kilograms (kg)
- Three Goal Categories: Maintain, Build, or Maximize muscle/performance
- Instant Results: Get your daily protein target immediately
- Meal Distribution: See how to spread protein throughout the day
- Simple 3-Step Setup: Name โ Body stats โ Goal selection
- Mobile-Friendly: Responsive design that works on all devices
- No Registration: All data stored locally in your browser
- Clean Interface: Focus on the answer you need without distractions
The app uses evidence-based protein factors:
| Goal | Protein per Pound | Example (180 lb person) |
|---|---|---|
| Maintain (Minimum) | 0.8g/lb | 144g per day |
| Build (Recommended) | 1.0g/lb | 180g per day |
| Maximize (High Performance) | 1.2g/lb | 216g per day |
Your Weight ร Protein Factor = Daily Protein Needs
Examples:
- 150 lb person, Build goal: 150 ร 1.0 = 150g protein/day
- 70 kg person, Maximize goal: 70 kg (154 lb) ร 1.2 = 185g protein/day
- Node.js 16+
- npm or yarn
-
Clone the repository
git clone https://github.com/Ignazio-00/hit-your-protein.git cd hit-your-protein -
Install dependencies
npm install
-
Start development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000
npm run build-
Enter Your Name
- Simple personal identification
-
Body Information
- Weight (with kg/lb toggle)
- Height, age, gender for context
-
Select Your Goal
- Maintain: Build or maintain muscle (minimum requirement)
- Build: Muscle building (recommended for most people)
- Maximize: High performance/intense training
-
Get Your Answer
- See your daily protein target in grams
- View the calculation breakdown
- Get meal distribution recommendations
- Main Result: Large, clear daily protein target (e.g., "156g")
- Calculation Breakdown: How the number was calculated
- Meal Distribution: Suggested protein per meal
- Goal Comparison: See protein needs for all three goals
- Scientific Context: Research-based explanations
- React 18 with TypeScript for type safety
- TailwindCSS for modern, responsive styling
- Vite for fast development and optimized builds
- Lucide React for clean, consistent icons
- localStorage for data persistence (no backend needed)
- Based on current sports nutrition guidelines
- Simplified from complex research into practical recommendations
- Focuses on grams per pound for easy understanding
- 0.8g/lb: Minimum for muscle maintenance
- 1.0g/lb: Optimal for most muscle-building goals
- 1.2g/lb: For intense training or maximizing muscle growth
- Beginners wanting to know their protein needs
- Athletes needing quick protein calculations
- Anyone asking "How much protein should I eat?"
- Fitness enthusiasts planning their nutrition
- People who want science-based recommendations without complexity
- โ Food tracking or logging
- โ Progress monitoring over time
- โ Calorie counting
- โ Detailed nutrition analysis
- โ Meal planning beyond protein distribution
- Maintain: 150 ร 0.8 = 120g/day
- Build: 150 ร 1.0 = 150g/day
- Maximize: 150 ร 1.2 = 180g/day
- Maintain: 154 ร 0.8 = 123g/day
- Build: 154 ร 1.0 = 154g/day
- Maximize: 154 ร 1.2 = 185g/day
src/
โโโ components/
โ โโโ Header.tsx
โ โโโ Onboarding.tsx
โ โโโ ProteinCalculator.tsx
โโโ utils/
โ โโโ proteinCalculator.ts
โ โโโ storage.ts
โ โโโ dateUtils.ts
โโโ types.ts
โโโ App.tsx
npm run dev- Development servernpm run build- Production buildnpm run preview- Preview build locally
Contributions welcome! Areas for improvement:
- Additional scientific validation
- UI/UX enhancements
- Mobile optimization
- Accessibility improvements
MIT License - see LICENSE file for details.
Hit Your Protein - Get your answer in 3 simple steps! ๐ช
"How much protein do I need daily?" - We've got the answer.