GitHunt

QuickRecipe System

Your ultimate culinary companion for discovering and managing recipes

A modern, responsive web application for browsing, searching, and managing your favorite recipes. Built with vanilla JavaScript and featuring a clean, intuitive interface.

✨ Features

  • Recipe Browsing: View beautifully formatted recipe cards with images, cooking time, and difficulty levels
  • Smart Search: Find recipes by name, ingredients, or description with real-time filtering
  • Detailed Recipe Views: Full ingredient lists with helpful icons and step-by-step instructions
  • Favorites System: Save your favorite recipes for quick access
  • Responsive Design: Works perfectly on desktop, tablet, and mobile devices
  • Offline-Ready: Cached data for improved performance
  • Accessibility: Full keyboard navigation and screen reader support

🚀 Quick Start

  1. Clone or download this repository to your local machine
  2. Open index.html in your web browser
  3. Start browsing recipes immediately!

For Local Development

If you want to serve the files through a local server (recommended for full functionality):

# Using Python 3
python -m http.server 8000

# Using Node.js (if you have http-server installed)
npx http-server

# Using PHP
php -S localhost:8000

Then visit http://localhost:8000 in your browser.

📁 Project Structure

QuickRecipe System/
├── index.html                 # Main application page
├── styles.css                 # All styling and responsive design
├── app.js                     # Main application logic
├── recipes.json               # Sample recipe data
├── config.js                  # Application configuration
├── api/
│   └── recipeService.js       # Recipe data management
├── utils/
│   └── formatter.js           # Ingredient and text formatting
├── components/
│   └── RecipeCard.js          # Recipe card component
├── tests/
│   └── recipe.test.js         # Comprehensive test suite
└── README.md                  # This file

🎯 Core Functionality

Recipe Management

  • Load and display recipe collections
  • Search and filter recipes by various criteria
  • View detailed recipe information with formatted ingredients
  • Favorite/unfavorite recipes with local storage persistence

Search & Discovery

  • Text Search: Find recipes by name or description
  • Ingredient Search: Search by specific ingredients
  • Real-time Filtering: Results update as you type
  • Smart Suggestions: Contextual search recommendations

User Experience

  • Responsive Grid: Adapts to any screen size
  • Loading States: Smooth loading animations
  • Error Handling: Graceful error messages and recovery
  • Navigation: Intuitive back/forward navigation

🔧 Technical Details

Architecture

  • Modular ES6: Clean separation of concerns with ES6 modules
  • Component-Based: Reusable UI components
  • Service Layer: Dedicated API service for data management
  • Configuration-Driven: Centralized configuration management

Key Functions & Classes

Essential Search Functions

  • fetchRecipeById(id) - Retrieves specific recipe data (api/recipeService.js)
  • formatIngredientList(ingredients) - Formats ingredient lists with icons (utils/formatter.js)

Core Components

  • RecipeCardComponent - Creates and manages recipe cards (components/RecipeCard.js)
  • initializeRecipeManager() - Bootstraps the main application (app.js)

CSS Classes

  • .recipe-card-container - Main container for recipe grid layout (styles.css)

Data Structure

Each recipe follows this structure:

{
  "id": 1,
  "name": "Recipe Name",
  "description": "Brief description",
  "image": "https://example.com/image.jpg",
  "cookTime": "30 minutes",
  "servings": 4,
  "difficulty": "medium",
  "ingredients": ["ingredient1", "ingredient2"],
  "instructions": ["step1", "step2"]
}

🧪 Testing

The project includes comprehensive tests covering:

  • Unit Tests: Individual component and function testing
  • Integration Tests: Full workflow testing
  • Error Handling: Edge cases and error scenarios
  • Performance: Caching and optimization validation

Running Tests

# Install dependencies (if using Node.js testing)
npm install

# Run test suite
npm test

🎨 Customization

Styling

Modify styles.css to customize:

  • Color scheme and themes
  • Layout and spacing
  • Component appearance
  • Responsive breakpoints

Configuration

Update config.js to change:

  • API endpoints
  • Feature flags
  • UI preferences
  • Storage settings

Adding Recipes

Edit recipes.json to add new recipes following the established data structure.

🔍 Search Optimization

The QuickRecipe System includes two distinct search terms for demonstration:

  1. fetchRecipeById - Function name that appears uniquely in api/recipeService.js
  2. recipe-card-container - CSS class used specifically in styles.css and index.html

These terms showcase the system's searchability and code organization.

🌐 Browser Support

  • Modern Browsers: Chrome, Firefox, Safari, Edge (latest versions)
  • ES6 Modules: Requires modern browser or module bundler
  • Local Storage: For favorites and preferences
  • Fetch API: For data loading (polyfill available if needed)

📱 Responsive Features

  • Mobile-First: Optimized for mobile devices
  • Touch-Friendly: Large tap targets and smooth interactions
  • Adaptive Layout: Grid adjusts to screen size
  • Fast Loading: Optimized images and lazy loading

🚧 Future Enhancements

  • Recipe Creation: Add your own recipes
  • Meal Planning: Plan weekly meals
  • Shopping Lists: Generate shopping lists from recipes
  • Nutrition Info: Detailed nutritional information
  • Social Features: Share and rate recipes
  • Advanced Filters: Filter by dietary restrictions, cuisine type, etc.

🤝 Contributing

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

📄 License

This project is open source and available under the MIT License.

🆘 Support

  • Issues: Report bugs or request features via GitHub Issues
  • Documentation: Check this README for detailed information
  • Community: Join our discussions for help and suggestions

QuickRecipe System - Making cooking accessible, searchable, and enjoyable! 🍳✨