# veronika855/washing_shop architecture

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

- Interactive diagram: https://gitdiagram.com/veronika855/washing_shop
- Repository: https://github.com/veronika855/washing_shop

## Overview

This is a Rails storefront for browsing products and promotions, managing a cart, and placing orders, with account, favorites, reviews, gift cards, callback requests, and an admin area. The principal checkout path is routed request → cart/order handling → persisted order and stock updates. The graph also preserves documented route branches and sampled review and admin behavior. Evidence is limited to the supplied excerpts, SOURCE INDEX, and routes; uninspected controller behavior and storage wiring are not assumed.

Main entry points: [`config/routes.rb`](https://github.com/veronika855/washing_shop/blob/main/config/routes.rb) (HTTP routes), [`app/models/product.rb`](https://github.com/veronika855/washing_shop/blob/main/app/models/product.rb) (Products), [`app/controllers/orders_controller.rb`](https://github.com/veronika855/washing_shop/blob/main/app/controllers/orders_controller.rb) (Checkout and orders), [`app/controllers/admin/promotions_controller.rb`](https://github.com/veronika855/washing_shop/blob/main/app/controllers/admin/promotions_controller.rb) (Promotion management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_routes["HTTP routes<br/>[routes.rb]"]
  node_catalog["Product catalog"]
end

subgraph group_commerce["Commerce"]
  node_product_model["Products<br/>[product.rb]"]
  node_cart["Cart handling<br/>[cart_controller.rb]"]
  node_quick_cart["Quick cart add"]
  node_checkout["Checkout and orders"]
  node_order_model["Order records<br/>[order.rb]"]
  node_promotions["Promotion management"]
  node_promotion_model["Promotions<br/>[promotion.rb]"]
  node_db[("Application database<br/>[schema.rb]")]
end

subgraph group_engagement["Customer features"]
  node_accounts["Accounts and sessions"]
  node_favorites["Favorites"]
  node_reviews["Review submission"]
  node_review_model["Review records<br/>[review.rb]"]
  node_gift_cards["Gift cards"]
  node_callbacks["Callback requests"]
end

subgraph group_administration["Administration"]
  node_admin_orders["Admin order control"]
  node_admin_dashboard["Admin dashboard"]
end

node_shopper(("Shopper"))

node_shopper -->|"sends requests"| node_routes
node_routes -->|"routes catalog"| node_catalog
node_routes -->|"routes cart"| node_cart
node_routes -->|"routes quick add"| node_quick_cart
node_routes -->|"routes orders"| node_checkout
node_routes -->|"routes registration"| node_accounts
node_routes -->|"routes favorites"| node_favorites
node_routes -->|"routes reviews"| node_reviews
node_routes -->|"routes gift cards"| node_gift_cards
node_routes -->|"routes callbacks"| node_callbacks
node_routes -->|"routes admin promos"| node_promotions
node_routes -->|"routes admin orders"| node_admin_orders
node_routes -->|"routes admin home"| node_admin_dashboard
node_checkout -->|"checks stock and price"| node_product_model
node_checkout -->|"creates order"| node_order_model
node_checkout -.->|"persists transaction"| node_db
node_admin_orders -->|"updates status"| node_order_model
node_admin_orders -->|"adjusts stock"| node_product_model
node_promotions -->|"loads products"| node_product_model
node_promotions -->|"saves promotions"| node_promotion_model
node_reviews -->|"finds product"| node_product_model
node_reviews -->|"creates or deletes"| node_review_model
node_review_model -->|"refreshes review stats"| node_product_model
node_product_model -.->|"stores product data"| node_db
node_order_model -.->|"stores order data"| node_db

click node_routes "https://github.com/veronika855/washing_shop/blob/main/config/routes.rb"
click node_catalog "https://github.com/veronika855/washing_shop/blob/main/app/controllers/products_controller.rb"
click node_product_model "https://github.com/veronika855/washing_shop/blob/main/app/models/product.rb"
click node_cart "https://github.com/veronika855/washing_shop/blob/main/app/controllers/cart_controller.rb"
click node_quick_cart "https://github.com/veronika855/washing_shop/blob/main/app/controllers/cart_quick_controller.rb"
click node_checkout "https://github.com/veronika855/washing_shop/blob/main/app/controllers/orders_controller.rb"
click node_order_model "https://github.com/veronika855/washing_shop/blob/main/app/models/order.rb"
click node_promotions "https://github.com/veronika855/washing_shop/blob/main/app/controllers/admin/promotions_controller.rb"
click node_promotion_model "https://github.com/veronika855/washing_shop/blob/main/app/models/promotion.rb"
click node_accounts "https://github.com/veronika855/washing_shop/blob/main/app/controllers/users_controller.rb"
click node_favorites "https://github.com/veronika855/washing_shop/blob/main/app/controllers/favorites_controller.rb"
click node_reviews "https://github.com/veronika855/washing_shop/blob/main/app/controllers/reviews_controller.rb"
click node_review_model "https://github.com/veronika855/washing_shop/blob/main/app/models/review.rb"
click node_gift_cards "https://github.com/veronika855/washing_shop/blob/main/app/controllers/gift_cards_controller.rb"
click node_callbacks "https://github.com/veronika855/washing_shop/blob/main/app/controllers/callback_requests_controller.rb"
click node_admin_orders "https://github.com/veronika855/washing_shop/blob/main/app/controllers/admin/orders_controller.rb"
click node_admin_dashboard "https://github.com/veronika855/washing_shop/blob/main/app/controllers/admin/dashboard_controller.rb"
click node_db "https://github.com/veronika855/washing_shop/blob/main/db/schema.rb"

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_routes,node_catalog toneBlue
class node_product_model,node_cart,node_quick_cart,node_checkout,node_order_model,node_promotions,node_promotion_model,node_db toneAmber
class node_accounts,node_favorites,node_reviews,node_review_model,node_gift_cards,node_callbacks toneMint
class node_admin_orders,node_admin_dashboard toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [HTTP routes](https://github.com/veronika855/washing_shop/blob/main/config/routes.rb): `config/routes.rb`
- [Product catalog](https://github.com/veronika855/washing_shop/blob/main/app/controllers/products_controller.rb): `app/controllers/products_controller.rb`

### Commerce

- [Products](https://github.com/veronika855/washing_shop/blob/main/app/models/product.rb): `app/models/product.rb`
- [Cart handling](https://github.com/veronika855/washing_shop/blob/main/app/controllers/cart_controller.rb): `app/controllers/cart_controller.rb`
- [Quick cart add](https://github.com/veronika855/washing_shop/blob/main/app/controllers/cart_quick_controller.rb): `app/controllers/cart_quick_controller.rb`
- [Checkout and orders](https://github.com/veronika855/washing_shop/blob/main/app/controllers/orders_controller.rb): `app/controllers/orders_controller.rb`
- [Order records](https://github.com/veronika855/washing_shop/blob/main/app/models/order.rb): `app/models/order.rb`
- [Promotion management](https://github.com/veronika855/washing_shop/blob/main/app/controllers/admin/promotions_controller.rb): `app/controllers/admin/promotions_controller.rb`
- [Promotions](https://github.com/veronika855/washing_shop/blob/main/app/models/promotion.rb): `app/models/promotion.rb`
- [Application database](https://github.com/veronika855/washing_shop/blob/main/db/schema.rb): `db/schema.rb`

### Customer features

- [Accounts and sessions](https://github.com/veronika855/washing_shop/blob/main/app/controllers/users_controller.rb): `app/controllers/users_controller.rb`
- [Favorites](https://github.com/veronika855/washing_shop/blob/main/app/controllers/favorites_controller.rb): `app/controllers/favorites_controller.rb`
- [Review submission](https://github.com/veronika855/washing_shop/blob/main/app/controllers/reviews_controller.rb): `app/controllers/reviews_controller.rb`
- [Review records](https://github.com/veronika855/washing_shop/blob/main/app/models/review.rb): `app/models/review.rb`
- [Gift cards](https://github.com/veronika855/washing_shop/blob/main/app/controllers/gift_cards_controller.rb): `app/controllers/gift_cards_controller.rb`
- [Callback requests](https://github.com/veronika855/washing_shop/blob/main/app/controllers/callback_requests_controller.rb): `app/controllers/callback_requests_controller.rb`

### Administration

- [Admin order control](https://github.com/veronika855/washing_shop/blob/main/app/controllers/admin/orders_controller.rb): `app/controllers/admin/orders_controller.rb`
- [Admin dashboard](https://github.com/veronika855/washing_shop/blob/main/app/controllers/admin/dashboard_controller.rb): `app/controllers/admin/dashboard_controller.rb`

### Other components

- **Shopper**

## Connections

- Shopper → HTTP routes: sends requests (evidence: `config/routes.rb`)
- HTTP routes → Product catalog: routes catalog (evidence: `config/routes.rb`)
- HTTP routes → Cart handling: routes cart (evidence: `config/routes.rb`)
- HTTP routes → Quick cart add: routes quick add (evidence: `config/routes.rb`)
- HTTP routes → Checkout and orders: routes orders (evidence: `config/routes.rb`)
- HTTP routes → Accounts and sessions: routes registration (evidence: `config/routes.rb`)
- HTTP routes → Favorites: routes favorites (evidence: `config/routes.rb`)
- HTTP routes → Review submission: routes reviews (evidence: `config/routes.rb`)
- HTTP routes → Gift cards: routes gift cards (evidence: `config/routes.rb`)
- HTTP routes → Callback requests: routes callbacks (evidence: `config/routes.rb`)
- HTTP routes → Promotion management: routes admin promos (evidence: `config/routes.rb`)
- HTTP routes → Admin order control: routes admin orders (evidence: `config/routes.rb`)
- HTTP routes → Admin dashboard: routes admin home (evidence: `config/routes.rb`)
- Checkout and orders → Products: checks stock and price (evidence: `app/controllers/orders_controller.rb`)
- Checkout and orders → Order records: creates order (evidence: `app/controllers/orders_controller.rb`)
- Checkout and orders → Application database: persists transaction
- Admin order control → Order records: updates status (evidence: `app/controllers/admin/orders_controller.rb`)
- Admin order control → Products: adjusts stock (evidence: `app/controllers/admin/orders_controller.rb`)
- Promotion management → Products: loads products (evidence: `app/controllers/admin/promotions_controller.rb`)
- Promotion management → Promotions: saves promotions (evidence: `app/controllers/admin/promotions_controller.rb`)
- Review submission → Products: finds product (evidence: `app/controllers/reviews_controller.rb`)
- Review submission → Review records: creates or deletes (evidence: `app/controllers/reviews_controller.rb`)
- Review records → Products: refreshes review stats (evidence: `app/models/review.rb`)
- Products → Application database: stores product data
- Order records → Application database: stores order data
