Skip to content

Subha12125/NutriPlan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Perfect idea ๐Ÿš€ โ€” having a README will make your project easy to understand and use. Hereโ€™s a clean README.md for your mockFoodDB nutrition project:


# ๐ŸŽ Mock Food Nutrition Database

This project provides a **mock food database** in JavaScript with nutritional values for common foods.  
It can be used for projects like:

- Diet planning apps ๐Ÿฅ—  
- Calorie tracking systems ๐Ÿ”ฅ  
- Fitness/nutrition dashboards ๐Ÿ’ช  
- Demo or testing purposes ๐ŸŽฏ  

---

## ๐Ÿ“‚ Project Structure

nutrition-project/ โ”‚โ”€โ”€ mockFoodDB.js # Contains the mock food database โ”‚โ”€โ”€ README.md # Project documentation


---

## ๐Ÿ“œ Database Overview

The `mockFoodDB` is a **JavaScript object** containing food items as keys, and their nutritional values (per 100g) as values.

Each entry has:
- `calories` (kcal)  
- `protein` (g)  
- `carbs` (g)  
- `fat` (g)  

Example:

```js
const mockFoodDB = {
  'apple': { calories: 52, protein: 0.3, carbs: 14, fat: 0.2 },
  'banana': { calories: 89, protein: 1.1, carbs: 23, fat: 0.3 },
  'chicken breast': { calories: 165, protein: 31, carbs: 0, fat: 3.6 },
  // ... more items
};

๐Ÿฅ‘ Categories Covered

โœ… Fruits (apple, banana, mango, grapes, etc.) โœ… Vegetables (broccoli, spinach, potato, tomato, etc.) โœ… Proteins (chicken, salmon, tofu, paneer, beef, etc.) โœ… Grains & Nuts (rice, oats, quinoa, almonds, peanuts, etc.) โœ… Dairy (milk, yogurt, cheese, butter, etc.) โœ… Drinks (coffee, tea, orange juice, smoothies, etc.) โœ… Sweets (chocolate, cake, cookies, etc.)


โšก Usage

  1. Import or include mockFoodDB.js in your project.
  2. Query foods by name to get nutrition details.

Example:

console.log(mockFoodDB['banana']);

// Output:
{
  calories: 89,
  protein: 1.1,
  carbs: 23,
  fat: 0.3
}

๐Ÿ”ฎ Future Enhancements

  • Add serving size adjustments (e.g., per piece, per cup, per slice).

๐Ÿ“œ License

This project is open-source and free to use for learning and development purposes.



---

๐Ÿ‘‰ Do you want me to also **add usage examples in Node.js / Browser** (like `import` and `require`), so anyone can directly plug this into their project?

About

A simple JavaScript-based mock food database containing calories, protein, carbs, and fat values for common foods. Perfect for diet planners, calorie trackers, and demo projects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors