Skip to content

Manisha5918/Recipe-Explorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meal App – React Recipe Finder Application

A responsive Recipe Finder Web Application built using React.js that allows users to explore meals from different cuisines using TheMealDB API. The application provides meal searching, filtering, detailed recipe information, and cooking tutorial access through an interactive user interface.


Project Overview

Meal App is a React-based food recipe application that fetches real-time recipe data from TheMealDB REST API. Users can browse meals, search recipes, filter meals based on categories and regions, view complete meal details, and access video tutorials.

The project focuses on API integration, component-based architecture, React Hooks, routing, and dynamic data rendering.


Features

Meal Search

  • Search meals by entering the meal name
  • Fetch matching recipes dynamically from TheMealDB API
  • Display results instantly in meal cards

Category Filtering

Users can filter meals by categories such as:

  • Seafood
  • Vegetarian
  • Chicken
  • Beef
  • Pasta
  • Dessert

Area Based Filtering

Browse meals based on different regions:

  • Indian
  • Italian
  • American
  • Chinese
  • French
  • Mexican

Alphabet Search

  • Search meals using starting letters A-Z
  • Dynamically generates alphabet filter options

Random Meal Generator

  • Fetches a random meal suggestion
  • Helps users discover new recipes

Meal Details Page

Each meal contains:

  • Meal image
  • Meal name
  • Category
  • Origin area
  • Cooking instructions
  • Ingredients list
  • YouTube tutorial link

Dynamic Routing

Implemented React Router for:

  • Home Page
  • Meals Page
  • Meal Detail Page
  • About Page

Example:

/              → Home Page
/meals         → All Meals
/meal/:id      → Individual Meal Details
/about         → About Page

Technologies Used

  • React.js
  • JavaScript (ES6)
  • HTML5
  • CSS3
  • Axios
  • React Router DOM
  • TheMealDB API

API Used

The project uses TheMealDB REST API.

Base API:

https://www.themealdb.com/api/json/v1/1/

API endpoints used:

Get All Meals

search.php?s=

Search Meal

search.php?s={mealName}

Meal Details

lookup.php?i={mealId}

Random Meal

random.php

Search By Letter

search.php?f={letter}

Category Filter

filter.php?c={category}

Area Filter

filter.php?a={area}

Project Structure

src
│
├── components
│   │
│   ├── Header.js
│   ├── Home.js
│   ├── Meals.js
│   ├── MealDetail.js
│   ├── About.js
│   └── Footer.js
│
├── App.js
├── App.css
└── index.js

Component Description

App.js

Main application component.

Responsibilities:

  • Manages application state
  • Handles API requests
  • Stores meal data
  • Provides functions to child components

Concepts used:

  • useState
  • useEffect
  • Props
  • Axios API calls

Header.js

Handles application navigation.

Features:

  • Navigation bar
  • React Router configuration
  • Component routing

Routes:

  • Home
  • Meals
  • Meal Details
  • About

Home.js

Landing page of the application.

Includes:

  • Hero section
  • Application introduction
  • Meal statistics display

Meals.js

Main recipe browsing page.

Features:

  • Search input
  • Category filter
  • Area filter
  • Alphabet filter
  • Random meal button
  • Meal cards display

MealDetail.js

Displays complete recipe information.

Includes:

  • Meal image
  • Ingredients
  • Instructions
  • Category
  • Region
  • YouTube tutorial

About.js

Provides information about the application.


Footer.js

Displays footer content and API credits.


React Concepts Implemented

  • Functional Components
  • JSX
  • Props
  • State Management
  • React Hooks
  • Conditional Rendering
  • List Rendering using map()
  • Event Handling
  • Dynamic Routing
  • API Integration

Installation and Setup

Clone the repository:

git clone <repository-url>

Go to project folder:

cd meal-app

Install dependencies:

npm install

Install Axios:

npm install axios

Install React Router:

npm install react-router-dom

Start application:

npm start

Application runs on:

http://localhost:3000

Application Workflow

User Opens Application

        ↓

React App Loads

        ↓

useEffect Fetches Meal Data

        ↓

Axios Sends API Request

        ↓

TheMealDB API Returns Data

        ↓

State Updates

        ↓

Components Re-render

        ↓

Meals Displayed

Search Workflow

User Enters Meal Name

        ↓

Search State Updates

        ↓

Search Button Clicked

        ↓

API Request Sent

        ↓

Matching Meals Received

        ↓

Meal Cards Updated

Screens Available

  • Home Screen
  • Meal Listing Screen
  • Recipe Details Screen
  • About Screen

Key Learning Outcomes

  • Building reusable React components
  • Managing state using React Hooks
  • Fetching data from external APIs
  • Implementing client-side routing
  • Handling dynamic URLs
  • Creating responsive user interfaces

Future Enhancements

  • User authentication
  • Save favorite recipes
  • Advanced recipe filters
  • Dark mode
  • Pagination
  • Backend database integration

About

Recipe Explorer is a React-based recipe discovery platform that allows users to search meals, filter recipes by category and cuisine, explore random dishes, and view detailed recipe information through API integration. Built with React, JavaScript, HTML, and CSS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors