# wanting2500730c/dvops-recipemanager architecture

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

- Interactive diagram: https://gitdiagram.com/wanting2500730c/dvops-recipemanager
- Repository: https://github.com/wanting2500730c/dvops-recipemanager

## Overview

This is a small Express recipe manager. Users can create recipes with photos, browse/search/filter and inspect recipes, edit them, or select and delete them. The server exposes those operations and stores recipe records in a JSON file, with uploaded images served from the public directory. The supplied source shows the route wiring and implementation for all four operations; HTML page structure and the delete handler’s detailed behavior are represented only where supported by the tree or excerpts.

Main entry points: [`index.js`](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/index.js) (Express routes), [`utils/XIAOTONG.js`](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/XIAOTONG.js) (Create and validate), [`utils/recipes.json`](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/recipes.json) (Recipe JSON), [`utils/Jansen-Utils.js`](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/Jansen-Utils.js) (Update recipe)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_browse["Browse and search<br/>[wanting.js]"]
  node_create_ui["Create recipe<br/>[xiaotong.js]"]
  node_edit_ui["Edit recipe<br/>[jansen.js]"]
  node_delete_ui["Delete selection<br/>[vasu.js]"]
end

subgraph group_server["HTTP application"]
  node_express["Express routes<br/>[index.js]"]
end

subgraph group_recipes["Recipe operations"]
  node_create["Create and validate<br/>[XIAOTONG.js]"]
  node_read["Read recipes<br/>[WantingUtil.js]"]
  node_update["Update recipe<br/>[Jansen-Utils.js]"]
  node_delete["Delete recipe<br/>[vasu-utils.js]"]
end

subgraph group_storage["File storage"]
  node_json[("Recipe JSON<br/>[recipes.json]")]
  node_template["Initial recipe data"]
  node_photos[("Uploaded photos")]
end

node_visitor(("Recipe user"))

node_visitor -->|"browses"| node_browse
node_visitor -->|"enters recipe"| node_create_ui
node_visitor -->|"edits recipe"| node_edit_ui
node_visitor -->|"selects deletion"| node_delete_ui
node_browse -->|"requests recipes"| node_express
node_create_ui -->|"posts recipe"| node_express
node_edit_ui -->|"loads and updates"| node_express
node_delete_ui -->|"deletes selection"| node_express
node_express -->|"routes create"| node_create
node_express -->|"routes reads"| node_read
node_express -->|"routes update"| node_update
node_express -->|"routes delete"| node_delete
node_express -->|"serves static files"| node_browse
node_create -->|"appends recipe"| node_json
node_create -->|"loads fallback"| node_template
node_create -->|"writes photo"| node_photos
node_read -->|"reads recipes"| node_json
node_update -->|"reads and writes"| node_json
node_update -->|"replaces photo"| node_photos
node_delete -->|"removes recipe"| node_json
node_delete -->|"removes photo"| node_photos

click node_browse "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/public/js/wanting.js"
click node_create_ui "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/public/js/xiaotong.js"
click node_edit_ui "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/public/js/jansen.js"
click node_delete_ui "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/public/js/vasu.js"
click node_express "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/index.js"
click node_create "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/XIAOTONG.js"
click node_read "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/WantingUtil.js"
click node_update "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/Jansen-Utils.js"
click node_delete "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/vasu-utils.js"
click node_json "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/recipes.json"
click node_template "https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/recipes.template.json"
click node_photos "https://github.com/wanting2500730c/dvops-recipemanager/tree/main/public/uploads"

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_browse,node_create_ui,node_edit_ui,node_delete_ui,node_visitor toneBlue
class node_express toneAmber
class node_create,node_read,node_update,node_delete toneMint
class node_json,node_template,node_photos toneRose
```

## Components

### Browser experience

- [Browse and search](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/public/js/wanting.js): `public/js/wanting.js`
- [Create recipe](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/public/js/xiaotong.js): `public/js/xiaotong.js`
- [Edit recipe](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/public/js/jansen.js): `public/js/jansen.js`
- [Delete selection](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/public/js/vasu.js): `public/js/vasu.js`

### HTTP application

- [Express routes](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/index.js): `index.js`

### Recipe operations

- [Create and validate](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/XIAOTONG.js): `utils/XIAOTONG.js`
- [Read recipes](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/WantingUtil.js): `utils/WantingUtil.js`
- [Update recipe](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/Jansen-Utils.js): `utils/Jansen-Utils.js`
- [Delete recipe](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/vasu-utils.js): `utils/vasu-utils.js`

### File storage

- [Recipe JSON](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/recipes.json): `utils/recipes.json`
- [Initial recipe data](https://github.com/wanting2500730c/dvops-recipemanager/blob/main/utils/recipes.template.json): `utils/recipes.template.json`
- [Uploaded photos](https://github.com/wanting2500730c/dvops-recipemanager/tree/main/public/uploads): `public/uploads`

### Other components

- **Recipe user**

## Connections

- Recipe user → Browse and search: browses (evidence: `public/js/wanting.js`)
- Recipe user → Create recipe: enters recipe (evidence: `public/js/xiaotong.js`)
- Recipe user → Edit recipe: edits recipe (evidence: `public/js/jansen.js`)
- Recipe user → Delete selection: selects deletion (evidence: `public/js/vasu.js`)
- Browse and search → Express routes: requests recipes (evidence: `public/js/wanting.js`)
- Create recipe → Express routes: posts recipe (evidence: `public/js/xiaotong.js`)
- Edit recipe → Express routes: loads and updates (evidence: `public/js/jansen.js`)
- Delete selection → Express routes: deletes selection (evidence: `public/js/vasu.js`)
- Express routes → Create and validate: routes create (evidence: `index.js`)
- Express routes → Read recipes: routes reads (evidence: `index.js`)
- Express routes → Update recipe: routes update (evidence: `index.js`)
- Express routes → Delete recipe: routes delete (evidence: `index.js`)
- Express routes → Browse and search: serves static files (evidence: `index.js`)
- Create and validate → Recipe JSON: appends recipe (evidence: `utils/XIAOTONG.js`)
- Create and validate → Initial recipe data: loads fallback (evidence: `utils/XIAOTONG.js`)
- Create and validate → Uploaded photos: writes photo (evidence: `utils/XIAOTONG.js`)
- Read recipes → Recipe JSON: reads recipes (evidence: `utils/WantingUtil.js`)
- Update recipe → Recipe JSON: reads and writes (evidence: `utils/Jansen-Utils.js`)
- Update recipe → Uploaded photos: replaces photo (evidence: `utils/Jansen-Utils.js`)
- Delete recipe → Recipe JSON: removes recipe (evidence: `utils/vasu-utils.js`)
- Delete recipe → Uploaded photos: removes photo (evidence: `utils/vasu-utils.js`)
