# bigbarabum/yp-webpack architecture

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

- Interactive diagram: https://gitdiagram.com/bigbarabum/yp-webpack
- Repository: https://github.com/bigbarabum/yp-webpack

## Overview

This is a browser-based places/profile application: the page entry point loads cards and user data, then wires profile editing, card creation, image viewing, likes, and deletion. The main internal layers are the API client, card rendering, user state, and popup/form interactions. The README describes the project but does not document its product behavior; relationships below rely on the sampled source excerpts and SOURCE INDEX. Styling and build tooling are omitted.

Main entry points: [`app/index.js`](https://github.com/bigbarabum/yp-webpack/blob/master/app/index.js) (Page entry), [`app/PopupCard.js`](https://github.com/bigbarabum/yp-webpack/blob/master/app/PopupCard.js) (Card form popup), [`app/PopupProfile.js`](https://github.com/bigbarabum/yp-webpack/blob/master/app/PopupProfile.js) (Profile popup), [`app/CardList.js`](https://github.com/bigbarabum/yp-webpack/blob/master/app/CardList.js) (Card list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_entry["Page entry<br/>[index.js]"]
  node_api["API client<br/>[API.js]"]
end

subgraph group_places["Places and cards"]
  node_cardlist["Card list<br/>[CardList.js]"]
  node_card["Card<br/>[Card.js]"]
  node_cardpopup["Card form popup<br/>[PopupCard.js]"]
end

subgraph group_profile["Profile and forms"]
  node_userinfo["User info<br/>[UserInfo.js]"]
  node_profilepopup["Profile popup<br/>[PopupProfile.js]"]
  node_validator["Form validator<br/>[FormValidator.js]"]
end

subgraph group_popups["Popup interactions"]
  node_popup["Popup base<br/>[Popup.js]"]
  node_imagepopup["Image popup<br/>[PopupImage.js]"]
end

node_visitor(("Visitor"))
node_service["Praktikum API"]

node_visitor -->|"uses page"| node_entry
node_entry -->|"creates client"| node_api
node_entry -->|"starts rendering"| node_cardlist
node_entry -->|"loads profile"| node_userinfo
node_entry -->|"opens form"| node_cardpopup
node_entry -->|"opens form"| node_profilepopup
node_entry -->|"opens viewer"| node_imagepopup
node_entry -->|"handles card actions"| node_card
node_cardlist -->|"fetches cards"| node_api
node_cardlist -->|"renders via"| node_card
node_userinfo -->|"reads and updates"| node_api
node_cardpopup -->|"adds card"| node_cardlist
node_cardpopup -->|"validates input"| node_validator
node_profilepopup -->|"updates profile"| node_userinfo
node_profilepopup -->|"validates input"| node_validator
node_cardpopup -->|"extends"| node_popup
node_profilepopup -->|"extends"| node_popup
node_imagepopup -->|"extends"| node_popup
node_api -->|"HTTP requests"| node_service

click node_entry "https://github.com/bigbarabum/yp-webpack/blob/master/app/index.js"
click node_api "https://github.com/bigbarabum/yp-webpack/blob/master/app/API.js"
click node_cardlist "https://github.com/bigbarabum/yp-webpack/blob/master/app/CardList.js"
click node_card "https://github.com/bigbarabum/yp-webpack/blob/master/app/Card.js"
click node_cardpopup "https://github.com/bigbarabum/yp-webpack/blob/master/app/PopupCard.js"
click node_userinfo "https://github.com/bigbarabum/yp-webpack/blob/master/app/UserInfo.js"
click node_profilepopup "https://github.com/bigbarabum/yp-webpack/blob/master/app/PopupProfile.js"
click node_validator "https://github.com/bigbarabum/yp-webpack/blob/master/app/FormValidator.js"
click node_popup "https://github.com/bigbarabum/yp-webpack/blob/master/app/Popup.js"
click node_imagepopup "https://github.com/bigbarabum/yp-webpack/blob/master/app/PopupImage.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_api toneBlue
class node_cardlist,node_card,node_cardpopup toneAmber
class node_userinfo,node_profilepopup,node_validator,node_service toneMint
class node_popup,node_imagepopup toneRose
class node_visitor toneIndigo
```

## Components

### Application runtime

- [Page entry](https://github.com/bigbarabum/yp-webpack/blob/master/app/index.js): `app/index.js`
- [API client](https://github.com/bigbarabum/yp-webpack/blob/master/app/API.js): `app/API.js`

### Places and cards

- [Card list](https://github.com/bigbarabum/yp-webpack/blob/master/app/CardList.js): `app/CardList.js`
- [Card](https://github.com/bigbarabum/yp-webpack/blob/master/app/Card.js): `app/Card.js`
- [Card form popup](https://github.com/bigbarabum/yp-webpack/blob/master/app/PopupCard.js): `app/PopupCard.js`

### Profile and forms

- [User info](https://github.com/bigbarabum/yp-webpack/blob/master/app/UserInfo.js): `app/UserInfo.js`
- [Profile popup](https://github.com/bigbarabum/yp-webpack/blob/master/app/PopupProfile.js): `app/PopupProfile.js`
- [Form validator](https://github.com/bigbarabum/yp-webpack/blob/master/app/FormValidator.js): `app/FormValidator.js`

### Popup interactions

- [Popup base](https://github.com/bigbarabum/yp-webpack/blob/master/app/Popup.js): `app/Popup.js`
- [Image popup](https://github.com/bigbarabum/yp-webpack/blob/master/app/PopupImage.js): `app/PopupImage.js`

### Other components

- **Visitor**
- **Praktikum API**

## Connections

- Visitor → Page entry: uses page (evidence: `app/index.js`)
- Page entry → API client: creates client (evidence: `app/index.js`)
- Page entry → Card list: starts rendering (evidence: `app/index.js`)
- Page entry → User info: loads profile (evidence: `app/index.js`)
- Page entry → Card form popup: opens form (evidence: `app/index.js`)
- Page entry → Profile popup: opens form (evidence: `app/index.js`)
- Page entry → Image popup: opens viewer (evidence: `app/index.js`)
- Page entry → Card: handles card actions (evidence: `app/index.js`)
- Card list → API client: fetches cards (evidence: `app/CardList.js`)
- Card list → Card: renders via (evidence: `app/CardList.js`)
- User info → API client: reads and updates (evidence: `app/UserInfo.js`)
- Card form popup → Card list: adds card (evidence: `app/PopupCard.js`)
- Card form popup → Form validator: validates input (evidence: `app/PopupCard.js`)
- Profile popup → User info: updates profile (evidence: `app/PopupProfile.js`)
- Profile popup → Form validator: validates input (evidence: `app/PopupProfile.js`)
- Card form popup → Popup base: extends (evidence: `app/PopupCard.js`)
- Profile popup → Popup base: extends (evidence: `app/PopupProfile.js`)
- Image popup → Popup base: extends (evidence: `app/PopupImage.js`)
- API client → Praktikum API: HTTP requests (evidence: `app/API.js`)
