# mndoumghar/recipe-book-app architecture

> Architecture diagram of the GitHub repository mndoumghar/recipe-book-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mndoumghar/recipe-book-app
- Repository: https://github.com/mndoumghar/recipe-book-app

## Overview

Recipe Book App is a French-language browser app for browsing, searching, paginating, adding, and deleting recipes through DummyJSON. The user-facing flow starts at the page entry point, which initializes the recipes feature; that controller coordinates requests, state, and rendering, while UI components handle form validation and recipe-card interactions. The README documents responsive layout and image fallback; the sampled card implementation confirms the fallback. The graph follows shown imports and calls; some event-driven user interactions are documented but not traced from the HTML excerpt.

Main entry points: [`src/features/recipes/recipes.controller.js`](https://github.com/mndoumghar/recipe-book-app/blob/main/src/features/recipes/recipes.controller.js) (Recipes controller), [`src/components/recipeForm.js`](https://github.com/mndoumghar/recipe-book-app/blob/main/src/components/recipeForm.js) (Recipe form), [`src/render/recipes.render.js`](https://github.com/mndoumghar/recipe-book-app/blob/main/src/render/recipes.render.js) (Recipe rendering), [`src/main.js`](https://github.com/mndoumghar/recipe-book-app/blob/main/src/main.js) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["App coordination"]
  node_entry["App entry<br/>[main.js]"]
  node_controller["Recipes controller"]
end

subgraph group_presentation["Recipe presentation"]
  node_form["Recipe form<br/>[recipeForm.js]"]
  node_card["Recipe card<br/>[recipeCard.js]"]
  node_recipe_render["Recipe rendering<br/>[recipes.render.js]"]
  node_pagination_render["Pagination rendering"]
  node_messages["Status messages<br/>[messages.render.js]"]
end

subgraph group_network["Recipe API"]
  node_api["Recipe API<br/>[recipes.api.js]"]
  node_axios["Axios client<br/>[axiosClient.js]"]
end

subgraph group_support["Utilities"]
  node_validation["Form validation<br/>[validation.js]"]
  node_debounce["Search debounce<br/>[debounce.js]"]
  node_throttle["Page throttle<br/>[throttle.js]"]
  node_pagination["Page calculations<br/>[pagination.js]"]
  node_errors["Error mapping<br/>[errors.js]"]
end

node_user(("User"))
node_dummyjson["DummyJSON API"]

node_user -.->|"uses app"| node_entry
node_entry -->|"initializes"| node_controller
node_controller -->|"requests recipes"| node_api
node_controller -->|"renders results"| node_recipe_render
node_controller -->|"renders pages"| node_pagination_render
node_controller -->|"shows status"| node_messages
node_controller -->|"creates form"| node_form
node_form -->|"submits values"| node_controller
node_form -->|"validates fields"| node_validation
node_recipe_render -->|"creates cards"| node_card
node_recipe_render -->|"uses empty message"| node_messages
node_api -->|"sends requests"| node_axios
node_axios -->|"calls API"| node_dummyjson
node_controller -->|"debounces search"| node_debounce
node_controller -->|"throttles paging"| node_throttle
node_controller -->|"computes pages"| node_pagination
node_controller -->|"maps errors"| node_errors

click node_entry "https://github.com/mndoumghar/recipe-book-app/blob/main/src/main.js"
click node_controller "https://github.com/mndoumghar/recipe-book-app/blob/main/src/features/recipes/recipes.controller.js"
click node_form "https://github.com/mndoumghar/recipe-book-app/blob/main/src/components/recipeForm.js"
click node_card "https://github.com/mndoumghar/recipe-book-app/blob/main/src/components/recipeCard.js"
click node_recipe_render "https://github.com/mndoumghar/recipe-book-app/blob/main/src/render/recipes.render.js"
click node_pagination_render "https://github.com/mndoumghar/recipe-book-app/blob/main/src/render/pagination.render.js"
click node_messages "https://github.com/mndoumghar/recipe-book-app/blob/main/src/render/messages.render.js"
click node_api "https://github.com/mndoumghar/recipe-book-app/blob/main/src/api/recipes.api.js"
click node_axios "https://github.com/mndoumghar/recipe-book-app/blob/main/src/api/axiosClient.js"
click node_validation "https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/validation.js"
click node_debounce "https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/debounce.js"
click node_throttle "https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/throttle.js"
click node_pagination "https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/pagination.js"
click node_errors "https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/errors.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_entry,node_controller,node_user toneBlue
class node_form,node_card,node_recipe_render,node_pagination_render,node_messages toneAmber
class node_api,node_axios,node_dummyjson toneMint
class node_validation,node_debounce,node_throttle,node_pagination,node_errors toneRose
```

## Components

### App coordination

- [App entry](https://github.com/mndoumghar/recipe-book-app/blob/main/src/main.js): `src/main.js`
- [Recipes controller](https://github.com/mndoumghar/recipe-book-app/blob/main/src/features/recipes/recipes.controller.js): `src/features/recipes/recipes.controller.js`

### Recipe presentation

- [Recipe form](https://github.com/mndoumghar/recipe-book-app/blob/main/src/components/recipeForm.js): `src/components/recipeForm.js`
- [Recipe card](https://github.com/mndoumghar/recipe-book-app/blob/main/src/components/recipeCard.js): `src/components/recipeCard.js`
- [Recipe rendering](https://github.com/mndoumghar/recipe-book-app/blob/main/src/render/recipes.render.js): `src/render/recipes.render.js`
- [Pagination rendering](https://github.com/mndoumghar/recipe-book-app/blob/main/src/render/pagination.render.js): `src/render/pagination.render.js`
- [Status messages](https://github.com/mndoumghar/recipe-book-app/blob/main/src/render/messages.render.js): `src/render/messages.render.js`

### Recipe API

- [Recipe API](https://github.com/mndoumghar/recipe-book-app/blob/main/src/api/recipes.api.js): `src/api/recipes.api.js`
- [Axios client](https://github.com/mndoumghar/recipe-book-app/blob/main/src/api/axiosClient.js): `src/api/axiosClient.js`

### Utilities

- [Form validation](https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/validation.js): `src/utils/validation.js`
- [Search debounce](https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/debounce.js): `src/utils/debounce.js`
- [Page throttle](https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/throttle.js): `src/utils/throttle.js`
- [Page calculations](https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/pagination.js): `src/utils/pagination.js`
- [Error mapping](https://github.com/mndoumghar/recipe-book-app/blob/main/src/utils/errors.js): `src/utils/errors.js`

### Other components

- **User**
- **DummyJSON API**

## Connections

- User → App entry: uses app (evidence: `README.md`)
- App entry → Recipes controller: initializes (evidence: `src/main.js`)
- Recipes controller → Recipe API: requests recipes (evidence: `src/features/recipes/recipes.controller.js`)
- Recipes controller → Recipe rendering: renders results (evidence: `src/features/recipes/recipes.controller.js`)
- Recipes controller → Pagination rendering: renders pages (evidence: `src/features/recipes/recipes.controller.js`)
- Recipes controller → Status messages: shows status (evidence: `src/features/recipes/recipes.controller.js`)
- Recipes controller → Recipe form: creates form (evidence: `src/features/recipes/recipes.controller.js`)
- Recipe form → Recipes controller: submits values (evidence: `src/features/recipes/recipes.controller.js`)
- Recipe form → Form validation: validates fields (evidence: `src/components/recipeForm.js`)
- Recipe rendering → Recipe card: creates cards (evidence: `src/render/recipes.render.js`)
- Recipe rendering → Status messages: uses empty message (evidence: `src/render/recipes.render.js`)
- Recipe API → Axios client: sends requests (evidence: `src/api/recipes.api.js`)
- Axios client → DummyJSON API: calls API (evidence: `README.md`)
- Recipes controller → Search debounce: debounces search (evidence: `src/features/recipes/recipes.controller.js`)
- Recipes controller → Page throttle: throttles paging (evidence: `src/features/recipes/recipes.controller.js`)
- Recipes controller → Page calculations: computes pages (evidence: `src/features/recipes/recipes.controller.js`)
- Recipes controller → Error mapping: maps errors (evidence: `src/features/recipes/recipes.controller.js`)
