# dariuszmomot/fud architecture

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

- Interactive diagram: https://gitdiagram.com/dariuszmomot/fud
- Repository: https://github.com/dariuszmomot/fud

## Overview

FUD is a React recipe-browsing application. Users search Edamam for recipes, select a result to view recipe details, and can save recipes as favorites; saved recipes and ingredient-check state are kept in browser local storage. The graph covers routing, search and recipe display, favorites, and the supporting data and persistence layers. Service-worker code exists, but the sampled registration module says registration is not called by default, so it is not shown as an active workflow. Edges reflect only relationships visible in the excerpts or source index.

Main entry points: [`src/pages/RecipeDetails.js`](https://github.com/dariuszmomot/fud/blob/dev/src/pages/RecipeDetails.js) (Recipe details), [`src/pages/SearchPage.js`](https://github.com/dariuszmomot/fud/blob/dev/src/pages/SearchPage.js) (Recipe search), [`src/pages/MainPages.js`](https://github.com/dariuszmomot/fud/blob/dev/src/pages/MainPages.js) (Main pages), [`src/pages/FavoritePage.js`](https://github.com/dariuszmomot/fud/blob/dev/src/pages/FavoritePage.js) (Favorites page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application flow"]
  node_app["Route entry<br/>[App.js]"]
  node_main["Main pages<br/>[MainPages.js]"]
  node_navigation["Bottom navigation"]
end

subgraph group_recipe["Recipe discovery"]
  node_search["Recipe search<br/>[SearchPage.js]"]
  node_searchbar["Search bar<br/>[CustomAppBar.js]"]
  node_searchdata["Search API client"]
  node_normalize["Recipe normalization<br/>[PreparingJSONs.js]"]
  node_cards["Recipe cards<br/>[RecipeCard.js]"]
end

subgraph group_detail["Recipe details"]
  node_details["Recipe details<br/>[RecipeDetails.js]"]
  node_ingredients["Ingredient list"]
  node_ingredientitem["Ingredient item"]
end

subgraph group_state["Local state"]
  node_favorites["Favorites page<br/>[FavoritePage.js]"]
  node_storage["Favorites storage<br/>[storage.js]"]
  node_localstorage[("Browser storage")]
end

node_user(("User"))
node_edamam["Edamam API"]

node_user -->|"opens"| node_app
node_app -->|"routes"| node_main
node_app -->|"routes"| node_details
node_main -->|"renders"| node_search
node_main -->|"renders"| node_favorites
node_main -->|"renders"| node_navigation
node_search -->|"renders"| node_searchbar
node_search -->|"requests recipes"| node_searchdata
node_searchdata -->|"fetches recipes"| node_edamam
node_searchdata -->|"normalizes response"| node_normalize
node_search -->|"renders results"| node_cards
node_search -->|"opens selection"| node_details
node_favorites -->|"reads favorites"| node_storage
node_favorites -->|"renders saved recipes"| node_cards
node_favorites -->|"opens selection"| node_details
node_details -->|"reads and saves"| node_storage
node_details -->|"loads recipe"| node_searchdata
node_details -->|"renders ingredients"| node_ingredients
node_ingredients -->|"renders items"| node_ingredientitem
node_storage -->|"reads and writes"| node_localstorage

click node_app "https://github.com/dariuszmomot/fud/blob/dev/src/App.js"
click node_main "https://github.com/dariuszmomot/fud/blob/dev/src/pages/MainPages.js"
click node_navigation "https://github.com/dariuszmomot/fud/blob/dev/src/components/BottomNavigation.js"
click node_search "https://github.com/dariuszmomot/fud/blob/dev/src/pages/SearchPage.js"
click node_searchbar "https://github.com/dariuszmomot/fud/blob/dev/src/components/CustomAppBar.js"
click node_searchdata "https://github.com/dariuszmomot/fud/blob/dev/src/data/RecipeSearchData.js"
click node_normalize "https://github.com/dariuszmomot/fud/blob/dev/src/data/PreparingJSONs.js"
click node_cards "https://github.com/dariuszmomot/fud/blob/dev/src/components/RecipeCard.js"
click node_details "https://github.com/dariuszmomot/fud/blob/dev/src/pages/RecipeDetails.js"
click node_ingredients "https://github.com/dariuszmomot/fud/blob/dev/src/components/IngredientsList.jsx"
click node_ingredientitem "https://github.com/dariuszmomot/fud/blob/dev/src/components/IngredientListItem.jsx"
click node_favorites "https://github.com/dariuszmomot/fud/blob/dev/src/pages/FavoritePage.js"
click node_storage "https://github.com/dariuszmomot/fud/blob/dev/src/utils/storage.js"

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,node_main,node_navigation,node_user toneBlue
class node_search,node_searchbar,node_searchdata,node_normalize,node_cards toneAmber
class node_details,node_ingredients,node_ingredientitem,node_edamam toneMint
class node_favorites,node_storage,node_localstorage toneRose
```

## Components

### Application flow

- [Route entry](https://github.com/dariuszmomot/fud/blob/dev/src/App.js): `src/App.js`
- [Main pages](https://github.com/dariuszmomot/fud/blob/dev/src/pages/MainPages.js): `src/pages/MainPages.js`
- [Bottom navigation](https://github.com/dariuszmomot/fud/blob/dev/src/components/BottomNavigation.js): `src/components/BottomNavigation.js`

### Recipe discovery

- [Recipe search](https://github.com/dariuszmomot/fud/blob/dev/src/pages/SearchPage.js): `src/pages/SearchPage.js`
- [Search bar](https://github.com/dariuszmomot/fud/blob/dev/src/components/CustomAppBar.js): `src/components/CustomAppBar.js`
- [Search API client](https://github.com/dariuszmomot/fud/blob/dev/src/data/RecipeSearchData.js): `src/data/RecipeSearchData.js`
- [Recipe normalization](https://github.com/dariuszmomot/fud/blob/dev/src/data/PreparingJSONs.js): `src/data/PreparingJSONs.js`
- [Recipe cards](https://github.com/dariuszmomot/fud/blob/dev/src/components/RecipeCard.js): `src/components/RecipeCard.js`

### Recipe details

- [Recipe details](https://github.com/dariuszmomot/fud/blob/dev/src/pages/RecipeDetails.js): `src/pages/RecipeDetails.js`
- [Ingredient list](https://github.com/dariuszmomot/fud/blob/dev/src/components/IngredientsList.jsx): `src/components/IngredientsList.jsx`
- [Ingredient item](https://github.com/dariuszmomot/fud/blob/dev/src/components/IngredientListItem.jsx): `src/components/IngredientListItem.jsx`

### Local state

- [Favorites page](https://github.com/dariuszmomot/fud/blob/dev/src/pages/FavoritePage.js): `src/pages/FavoritePage.js`
- [Favorites storage](https://github.com/dariuszmomot/fud/blob/dev/src/utils/storage.js): `src/utils/storage.js`
- **Browser storage**

### Other components

- **User**
- **Edamam API**

## Connections

- User → Route entry: opens
- Route entry → Main pages: routes (evidence: `src/App.js`)
- Route entry → Recipe details: routes (evidence: `src/App.js`)
- Main pages → Recipe search: renders (evidence: `src/pages/MainPages.js`)
- Main pages → Favorites page: renders (evidence: `src/pages/MainPages.js`)
- Main pages → Bottom navigation: renders (evidence: `src/pages/MainPages.js`)
- Recipe search → Search bar: renders (evidence: `src/pages/SearchPage.js`)
- Recipe search → Search API client: requests recipes (evidence: `src/pages/SearchPage.js`)
- Search API client → Edamam API: fetches recipes (evidence: `src/data/RecipeSearchData.js`)
- Search API client → Recipe normalization: normalizes response (evidence: `src/data/RecipeSearchData.js`)
- Recipe search → Recipe cards: renders results (evidence: `src/pages/SearchPage.js`)
- Recipe search → Recipe details: opens selection (evidence: `src/pages/SearchPage.js`)
- Favorites page → Favorites storage: reads favorites (evidence: `src/pages/FavoritePage.js`)
- Favorites page → Recipe cards: renders saved recipes (evidence: `src/pages/FavoritePage.js`)
- Favorites page → Recipe details: opens selection (evidence: `src/pages/FavoritePage.js`)
- Recipe details → Favorites storage: reads and saves (evidence: `src/pages/RecipeDetails.js`)
- Recipe details → Search API client: loads recipe (evidence: `src/pages/RecipeDetails.js`)
- Recipe details → Ingredient list: renders ingredients (evidence: `src/pages/RecipeDetails.js`)
- Ingredient list → Ingredient item: renders items (evidence: `src/components/IngredientsList.jsx`)
- Favorites storage → Browser storage: reads and writes (evidence: `src/utils/storage.js`)
