# ejathinreddy/recipely architecture

> Architecture diagram of the GitHub repository ejathinreddy/recipely, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ejathinreddy/recipely
- Repository: https://github.com/ejathinreddy/recipely

## Overview

Recipely is a React recipe-discovery website. Users search or choose a category; the App loads results from TheMealDB, shows loading/error feedback and recipe cards, and retrieves full details when a card is opened. The modal presents ingredients, instructions, and available video/source links. App also owns result expansion and dark-mode state. The README documents these capabilities; sampled source supports the main calls and rendering. The listed mealApi module is empty, so API behavior is implemented in App. Styling and responsive presentation are omitted as internal presentation details.

Main entry points: [`src/App.jsx`](https://github.com/ejathinreddy/recipely/blob/main/src/App.jsx) (Discovery state and orchestration), [`src/components/RecipeModal.jsx`](https://github.com/ejathinreddy/recipely/blob/main/src/components/RecipeModal.jsx) (Recipe detail modal), [`src/components/SearchBar.jsx`](https://github.com/ejathinreddy/recipely/blob/main/src/components/SearchBar.jsx) (Search input), [`src/components/RecipeCard.jsx`](https://github.com/ejathinreddy/recipely/blob/main/src/components/RecipeCard.jsx) (Recipe cards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Recipe discovery"]
  node_app["Discovery state and orchestration<br/>[App.jsx]"]
end

subgraph group_presentation["Recipe interface"]
  node_search["Search input<br/>[SearchBar.jsx]"]
  node_navbar["Navigation and theme toggle<br/>[Navbar.jsx]"]
  node_cards["Recipe cards<br/>[RecipeCard.jsx]"]
  node_loader["Loading feedback<br/>[Loader.jsx]"]
  node_errors["Error and retry feedback<br/>[ErrorMessage.jsx]"]
end

subgraph group_details["Recipe details"]
  node_modal["Recipe detail modal<br/>[RecipeModal.jsx]"]
end

node_visitor(("Recipe seeker"))
node_mealdb[("TheMealDB API")]
node_youtube["YouTube videos"]
node_recipe_source["Original recipe source"]

node_visitor -->|"enters query"| node_search
node_visitor -->|"selects category"| node_app
node_visitor -->|"toggles theme"| node_navbar
node_search -->|"submits query"| node_app
node_app -->|"searches or filters"| node_mealdb
node_app -->|"looks up details"| node_mealdb
node_app -->|"renders results"| node_cards
node_app -->|"renders while loading"| node_loader
node_app -->|"renders failures"| node_errors
node_errors -->|"retries fetch"| node_app
node_cards -->|"opens recipe"| node_app
node_app -->|"renders selected recipe"| node_modal
node_modal -->|"links to video"| node_youtube
node_modal -->|"links to source"| node_recipe_source

click node_app "https://github.com/ejathinreddy/recipely/blob/main/src/App.jsx"
click node_search "https://github.com/ejathinreddy/recipely/blob/main/src/components/SearchBar.jsx"
click node_navbar "https://github.com/ejathinreddy/recipely/blob/main/src/components/Navbar.jsx"
click node_cards "https://github.com/ejathinreddy/recipely/blob/main/src/components/RecipeCard.jsx"
click node_loader "https://github.com/ejathinreddy/recipely/blob/main/src/components/Loader.jsx"
click node_errors "https://github.com/ejathinreddy/recipely/blob/main/src/components/ErrorMessage.jsx"
click node_modal "https://github.com/ejathinreddy/recipely/blob/main/src/components/RecipeModal.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app toneBlue
class node_search,node_navbar,node_cards,node_loader,node_errors,node_mealdb toneAmber
class node_modal toneMint
class node_visitor,node_youtube,node_recipe_source toneIndigo
```

## Components

### Recipe discovery

- [Discovery state and orchestration](https://github.com/ejathinreddy/recipely/blob/main/src/App.jsx): `src/App.jsx`

### Recipe interface

- [Search input](https://github.com/ejathinreddy/recipely/blob/main/src/components/SearchBar.jsx): `src/components/SearchBar.jsx`
- [Navigation and theme toggle](https://github.com/ejathinreddy/recipely/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Recipe cards](https://github.com/ejathinreddy/recipely/blob/main/src/components/RecipeCard.jsx): `src/components/RecipeCard.jsx`
- [Loading feedback](https://github.com/ejathinreddy/recipely/blob/main/src/components/Loader.jsx): `src/components/Loader.jsx`
- [Error and retry feedback](https://github.com/ejathinreddy/recipely/blob/main/src/components/ErrorMessage.jsx): `src/components/ErrorMessage.jsx`

### Recipe details

- [Recipe detail modal](https://github.com/ejathinreddy/recipely/blob/main/src/components/RecipeModal.jsx): `src/components/RecipeModal.jsx`

### Other components

- **Recipe seeker**
- **TheMealDB API**
- **YouTube videos**
- **Original recipe source**

## Connections

- Recipe seeker → Search input: enters query (evidence: `src/components/SearchBar.jsx`)
- Recipe seeker → Discovery state and orchestration: selects category (evidence: `src/App.jsx`)
- Recipe seeker → Navigation and theme toggle: toggles theme
- Search input → Discovery state and orchestration: submits query (evidence: `src/App.jsx`)
- Discovery state and orchestration → TheMealDB API: searches or filters (evidence: `src/App.jsx`)
- Discovery state and orchestration → TheMealDB API: looks up details (evidence: `src/App.jsx`)
- Discovery state and orchestration → Recipe cards: renders results (evidence: `src/App.jsx`)
- Discovery state and orchestration → Loading feedback: renders while loading (evidence: `src/App.jsx`)
- Discovery state and orchestration → Error and retry feedback: renders failures (evidence: `src/App.jsx`)
- Error and retry feedback → Discovery state and orchestration: retries fetch (evidence: `src/App.jsx`)
- Recipe cards → Discovery state and orchestration: opens recipe (evidence: `src/App.jsx`)
- Discovery state and orchestration → Recipe detail modal: renders selected recipe (evidence: `src/App.jsx`)
- Recipe detail modal → YouTube videos: links to video (evidence: `src/components/RecipeModal.jsx`)
- Recipe detail modal → Original recipe source: links to source (evidence: `src/components/RecipeModal.jsx`)
