Skip to content

A modern, responsive recipe management application built with React. Browse recipes by category, search by (name, category, ingredient), adjust serving sizes dynamically, and keep track of your favorites!

License

Notifications You must be signed in to change notification settings

aymansoliman-dev/GroqRecipeBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

23 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“– Groq Recipe Book

Your personal recipe collection. Store, organize, and discover delicious recipes by Chef Groq.

A modern, responsive recipe management application built with React. Browse recipes by category, search by name, adjust serving sizes dynamically, and keep track of your favorites!

Groq Recipe Book Tailwind CSS Vite License


โœจ Features

  • ๐Ÿณ 15+ Curated Recipes - Diverse collection from Greek Salad to Sushi Rolls
  • ๐Ÿ” Smart Search - Find recipes by name instantly with real-time filtering
  • ๐Ÿท๏ธ Category Filters - Browse by Pasta, Seafood, Salads, Meat, Desserts, Mexican, Korean, Japanese
  • โš–๏ธ Dynamic Serving Adjustment - Scale ingredient amounts automatically based on servings
  • โญ Favorites System - Mark and filter your favorite recipes
  • ๐Ÿ“ฑ Fully Responsive - Seamless experience on desktop, tablet, and mobile
  • ๐Ÿ’พ Persistent Storage - LocalStorage integration keeps your data between sessions
  • ๐ŸŽจ Beautiful UI - Clean, modern design with smooth animations
  • โ™ฟ Accessible - Built with WCAG accessibility guidelines
  • ๐Ÿ“‹ Interactive Ingredients - Check off ingredients as you cook
  • ๐Ÿ“Š Nutrition Information - View nutritional data for each recipe
  • ๐Ÿ’ก Cooking Tips - Expert tips included with every recipe
  • ๐ŸŒ SEO Optimized - Meta tags and structured data for better discoverability

๐Ÿš€ Live Demo

View Live Demo


๐Ÿ“ธ Screenshots

Home Page

Browse recipes by category with beautiful card layouts Home Page

Recipe Detail View

Detailed instructions, ingredients with serving adjustments, and nutrition info Recipe Detail

Mobile Responsive

Full functionality on any device Mobile View


๐Ÿ› ๏ธ Tech Stack

Core

  • React 18.3 - Modern UI library with hooks
  • Vite 5.0 - Lightning-fast build tool and dev server
  • JavaScript ES6+ - Modern JavaScript features

Styling

  • Tailwind CSS 3.4 - Utility-first CSS framework
  • Custom CSS - Additional styling and animations

State Management

  • React Context API - Global state management
  • useImmerReducer - Immutable state updates with Immer
  • LocalStorage API - Client-side data persistence

UI/UX

  • Tippy.js - Elegant tooltips and popovers
  • Custom Hooks - Reusable React logic

๐Ÿ“‹ Prerequisites

Before you begin, ensure you have:

  • Node.js (v18.0.0 or higher)
  • npm (v9.0.0 or higher) or yarn

๐Ÿ”ง Installation & Setup

1. Clone the repository

git clone https://github.com/aymansoliman-dev/GroqRecipeBook.git
aymansoliman-dev GroqRecipeBook

2. Install dependencies

npm install

3. Start development server

npm run dev

4. Open in browser

Navigate to http://localhost:5173


๐Ÿ“ฆ Available Scripts

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Lint code
npm run lint

๐ŸŽฏ Usage Guide

Browsing Recipes

  1. Browse all recipes on the home page
  2. Click category filters (Pasta, Seafood, Salads, etc.) to filter by cuisine
  3. Use the search bar to find specific recipes by name, cuisine, category, or even ingredient
  4. Click on "Cook Now" button in any recipe card to view full details

Viewing Recipe Details

  1. Click "Cook Now" on any recipe card
  2. See complete ingredient list with amounts
  3. Read step-by-step instructions
  4. View nutrition information and cooking tips
  5. Click the โœ• button or press Escape to close

Adjusting Servings

  1. Open any recipe detail page
  2. Find the "Adjust Servings" section
  3. Use - and + buttons to decrease or increase servings
  4. Watch ingredient amounts scale automatically
  5. Original serving count is shown for reference

Managing Favorites

  1. Click the โค๏ธ (heart) icon on any recipe card
  2. Toggle on/off to add/remove from favorites
  3. Click the "Favorites" filter to view only favorited recipes

Checking Off Ingredients

  1. While viewing a recipe, check ingredient checkboxes as you gather them
  2. Track your progress while cooking
  3. Checkboxes reset when you reopen the recipe

๐Ÿ—‚๏ธ Project Structure

aymansoliman-dev
GroqRecipeBook/
โ”‚
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ robots.txt              # SEO crawler instructions
โ”‚   โ””โ”€โ”€ favicon files           # App icons
โ”‚  
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ assets/
โ”‚   โ”‚   โ””โ”€โ”€ asset.svg           # Every svg icon used in the App
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ Advertisement.jsx   # Recommending Chef Groq App
โ”‚   โ”‚   โ”œโ”€โ”€ AIChefAssistant.jsx # Link to Chef Groq App
โ”‚   โ”‚   โ”œโ”€โ”€ CategoryBrowser.jsx # Category filter buttons
โ”‚   โ”‚   โ”œโ”€โ”€ Footer.jsx          # App footer
โ”‚   โ”‚   โ”œโ”€โ”€ Header.jsx          # App header with branding
โ”‚   โ”‚   โ”œโ”€โ”€ Logo.jsx            # Reusable logo component
โ”‚   โ”‚   โ”œโ”€โ”€ MainContent.jsx     # Main content wrapper
โ”‚   โ”‚   โ”œโ”€โ”€ NavigationBar.jsx   # App navbar
โ”‚   โ”‚   โ”œโ”€โ”€ RecipeCard.jsx      # Individual recipe card
โ”‚   โ”‚   โ”œโ”€โ”€ RecipePage.jsx      # Full recipe detail modal
โ”‚   โ”‚   โ”œโ”€โ”€ RecipesGrid.jsx     # Recipe cards grid layout
โ”‚   โ”‚   โ”œโ”€โ”€ SearchBar.jsx       # Recipe search input
โ”‚   โ”‚   โ”œโ”€โ”€ Stat.jsx            # Reusable individual stat component
โ”‚   โ”‚   โ””โ”€โ”€ Stats.jsx           # Stas of your recipes
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ context/
โ”‚   โ”‚   โ””โ”€โ”€ RecipesProvider.jsx # Global state with Context + Reducer
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ””โ”€โ”€ state.js            # Recipe database (15 recipes)
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ App.css                 # App styles
โ”‚   โ”œโ”€โ”€ App.jsx                 # Root component
โ”‚   โ””โ”€โ”€ main.jsx                # App entry point 
โ”‚
โ”œโ”€โ”€ .gitignore                   # Git ignore rules
โ”œโ”€โ”€ index.html                   # HTML entry point with meta tags
โ”œโ”€โ”€ vite.config.js               # Vite configuration
โ”œโ”€โ”€ package.json                 # Dependencies and scripts
โ”œโ”€โ”€ LICENSE                      # MIT License
โ””โ”€โ”€ README.md                    # This file

๐ŸŽจ Key Features Explained

State Management Architecture

The app uses React Context API with useImmerReducer for predictable, immutable state updates:

// Reducer actions
- viewed_recipe_page // Open recipe detail
- hid_recipe_page    // Close recipe detail
- toggled_favorite   // Toggle favorite status
- selected_category  // Update category filter
- searched           // Update search query

Dynamic Ingredient Scaling

Ingredients are structured as objects with precise measurements:

{
  name: "all-purpose flour",
  amount: 2,
  unit: "cups"
}

When servings are adjusted, amounts scale proportionally:

  • Base: 2 servings, 2 cups flour
  • Scaled to 4: 4 cups flour
  • Scaled to 1: 1 cup flour

LocalStorage Persistence

All state is automatically saved to browser localStorage:

  • Recipes and their favorite status
  • User preferences
  • Filter and search state (optional)

Data persists across browser sessions and page refreshes.

Accessibility Features

  • Semantic HTML elements (<article>, <section>, <nav>)
  • ARIA labels for icon buttons
  • Keyboard navigation support (Escape to close modals)
  • Focus management
  • Screen reader friendly

๐Ÿงช Recipe Data Structure

Each recipe contains:

{
  id: 0,
  name: "greek salad",
  image: "https://...",
  category: "salads",
  cuisine: "greek",
  difficultyLevel: "easy",
  servings: 2,
  ingredients: [
    { name: "cucumber", amount: 2, unit: "large" },
    { name: "salt", amount: null, unit: "to taste" }
  ],
  description: "Fresh Mediterranean salad...",
  prepTime: 8,
  rating: 4,
  instructions: ["Step 1...", "Step 2..."],
  nutritionInfo: {
    calories: 180,
    protein: "6g",
    carbs: "12g",
    fat: "12g",
    fiber: "3g"
  },
  tips: ["Tip 1...", "Tip 2..."],
  isFavorite: false,
  isSaved: false
}

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

Reporting Bugs

  1. Check if the bug is already reported in Issues
  2. Open a new issue with:
    • Clear title and description
    • Steps to reproduce
    • Expected vs actual behavior
    • Screenshots if applicable

Suggesting Features

  1. Open an issue with the enhancement label
  2. Describe the feature and its benefits
  3. Discuss implementation approach

Pull Requests

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Make your changes
  4. Commit with clear messages (git commit -m 'Add some AmazingFeature')
  5. Push to your branch (git push origin feature/AmazingFeature)
  6. Open a Pull Request

Code Style

  • Follow existing code formatting
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Ensure no console errors or warnings

๐Ÿ› Known Issues

Currently, there are no known issues! ๐ŸŽ‰

If you find a bug, please report it.


๐Ÿ”ฎ Roadmap & Future Enhancements

Short Term

  • Add recipe creation form
  • Edit existing recipes in-app
  • Delete recipes
  • Recipe categories management
  • Improved mobile navigation

Medium Term

  • Export recipes as PDF
  • Print-friendly recipe view
  • Share recipes via link/QR code
  • Recipe import from URL
  • Shopping list generator from selected recipes
  • Meal planning calendar
  • Recipe notes and personal modifications

Long Term

  • User authentication (Firebase/Supabase)
  • Cloud sync across devices
  • Recipe ratings and reviews
  • Community recipe sharing
  • AI-powered recipe generation (Groq API integration)
  • Image upload for custom recipes
  • Video cooking instructions
  • Voice-guided cooking mode
  • Multi-language support (i18n)
  • Dark mode toggle
  • Advanced filtering (dietary restrictions, prep time, difficulty)
  • Ingredient substitution suggestions
  • Nutritional goals tracking
  • Weekly meal prep planner

๐ŸŒ Deployment

Deploy to Vercel

  1. Push your code to GitHub
  2. Visit vercel.com
  3. Import your repository
  4. Vercel auto-detects Vite configuration
  5. Click "Deploy"

Manual Deployment

# Build production files
npm run build

# The dist/ folder contains your production files
# Upload to any static hosting service

๐Ÿ“„ License

This project is licensed under the MIT License.

See the LICENSE file for details.

TL;DR: You can use, modify, and distribute this project freely. Just include the original license.


Author

Ayman Soliman


๐Ÿ™ Acknowledgments

  • Recipe data curated and structured for demonstration purposes
  • Food images from Pixels and Cloudinary
  • Icons and UI inspiration from modern recipe applications
  • Built as a learning project to master React state management patterns
  • Special thanks to the React and Tailwind CSS communities

๐Ÿ“š Learning Resources

This project demonstrates:

  • โœ… React Hooks (useState, useEffect, useContext, useReducer)
  • โœ… Context API for global state
  • โœ… Immutable state updates with Immer
  • โœ… Component composition patterns
  • โœ… Conditional rendering
  • โœ… List rendering and keys
  • โœ… Form handling
  • โœ… Event handling
  • โœ… LocalStorage API
  • โœ… Responsive design with Tailwind
  • โœ… Accessibility best practices

Perfect for learning modern React development! ๐Ÿš€


๐Ÿ’ฌ Support

Need help? Have questions?


โญ Show Your Support

If you found this project helpful or interesting:

  • โญ Star this repository
  • ๐Ÿ”€ Fork it and build your own version
  • ๐Ÿ“ฃ Share it with others learning React
  • ๐Ÿ› Report bugs to help improve it
  • ๐Ÿ’ก Suggest features you'd like to see

๐ŸŽฏ Don't forget to:

  1. Replace placeholder URLs:

    • https://github.com/aymansoliman-dev/GroqRecipeBook โ†’ Your actual repo URL
    • https://aymansoliman-dev/GroqRecipeBook.vercel.app โ†’ Your deployed app URL
    • your.email@example.com โ†’ Your actual email
    • @yourusername โ†’ Your GitHub username
  2. Add screenshots:

    • Create a screenshots/ folder
    • Add: home.png, recipe-detail.png, mobile.png
  3. Create LICENSE file:

   MIT License
   
   Copyright (c) 2025 Ayman Soliman
   
   [Full MIT license text]

About

A modern, responsive recipe management application built with React. Browse recipes by category, search by (name, category, ingredient), adjust serving sizes dynamically, and keep track of your favorites!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published