How olhasmy/mesto works
Mesto is an interactive web app for viewing and managing a user profile and place cards. The main workflow loads the user and cards from the remote API, renders them, and lets the user edit profile/avatar data, add or delete cards, toggle likes, and open image previews. Form validation and popup components support those interactions; BEM styles provide the presentation layer. Edges follow the shown page orchestration, module references, and API calls; unsampled UI wiring is not inferred.
Main entry points: index.js Page controller · constants.js DOM bindings · index.html App document · Api.js API client
Components 14
App orchestration
- Page controller
src/pages/index.js - DOM bindings
src/utils/constants.js
Profile and cards
- API client
src/components/Api.js - User profile
src/components/UserInfo.js - Card behavior
src/components/Card.js - Card rendering
src/components/Section.js
Forms and popups
- Form validation
src/components/FormValidator.js - Popup base
src/components/Popup.js - Form popup
src/components/PopupWithForm.js - Image preview
src/components/PopupWithImage.js
UI presentation
- App document
src/index.html - BEM styling
src/blocks
Other components
- Visitor
- Mesto API
Connections 18
- Visitor → Page controller: uses
README.md - Page controller → API client: loads and updates
src/pages/index.js - API client → Mesto API: fetches data
src/components/Api.js - Page controller → User profile: sets profile
src/pages/index.js - Page controller → Card rendering: renders cards
src/pages/index.js - Card rendering → Page controller: calls renderer
src/components/Section.js - Page controller → Card behavior: creates cards
src/pages/index.js - Card behavior → Page controller: invokes handlers
src/pages/index.js - Page controller → Form popup: handles submissions
src/pages/index.js - Page controller → Image preview: opens preview
src/pages/index.js - Page controller → Form validation: enables validation
src/pages/index.js - Page controller → DOM bindings: imports bindings
src/pages/index.js - DOM bindings → Form validation: configures
src/utils/constants.js - DOM bindings → User profile: constructs
src/utils/constants.js - Form popup → Popup base: extends
src/components/PopupWithForm.js - Image preview → Popup base: extends
src/components/PopupWithImage.js - App document → Page controller: hosts
- App document → BEM styling: styled by