# nedixcode/shoppetproject architecture

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

- Interactive diagram: https://gitdiagram.com/nedixcode/shoppetproject
- Repository: https://github.com/nedixcode/shoppetproject

## Overview

ShopPet is a pet-products storefront with customer and administrator experiences. The customer journey spans product discovery and filtering, account access, favorites and basket management; administrators manage products and product types. Backend services implement catalog, authentication, basket, favorites, and order operations over repositories and persisted entities. The excerpts establish several backend controller/service and service/repository relationships, but do not show most frontend API wiring or all order and favorites implementations, so those links are omitted or marked unverified.

Main entry points: [`frontend/src/App.jsx`](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/App.jsx) (App Routes), [`src/main/java/backend/shoppetproject/repository`](https://github.com/nedixcode/shoppetproject/tree/main/src/main/java/backend/shoppetproject/repository) (Data Repositories), [`src/main/java/backend/shoppetproject/service/AuthService.java`](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/AuthService.java) (Auth Service), [`frontend/src/pages/SearchPage.jsx`](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/SearchPage.jsx) (Search Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["App Routes<br/>[App.jsx]"]
  node_search["Search Page<br/>[SearchPage.jsx]"]
  node_filters["Catalog Filters<br/>[Filters.jsx]"]
  node_searchbar["Search Bar<br/>[SearchBar.jsx]"]
  node_suggestions["Search Suggestions"]
  node_basketui["Basket Page<br/>[BasketPage.jsx]"]
  node_favoritesui["Favorites Page<br/>[FavoritePage.jsx]"]
end

subgraph group_identity["Identity"]
  node_loginui["Login and Registration<br/>[LoginPage.jsx]"]
  node_profileui["Profile Page<br/>[ProfilePage.jsx]"]
  node_authapi["Auth API Client<br/>[authApi.js]"]
  node_authcontroller["Auth Controller"]
  node_authservice["Auth Service<br/>[AuthService.java]"]
end

subgraph group_catalog["Catalog and Admin"]
  node_adminui["Admin Panel<br/>[adminPage.jsx]"]
  node_catalogui["Product Browsing<br/>[ProductArea.jsx]"]
  node_productservice["Product Service"]
  node_admincontroller["Admin Controller"]
  node_adminservice["Admin Service<br/>[AdminService.java]"]
end

subgraph group_commerce["Commerce"]
  node_basketcontroller["Basket Controller"]
  node_basketservice["Basket Service<br/>[BasketService.java]"]
  node_favoritescontroller["Favorites Controller"]
  node_orders["Order Processing"]
end

subgraph group_backend["Backend Data"]
  node_repositories["Data Repositories"]
  node_entities[("Persistent Entities")]
end

node_shopper(("Shopper"))

node_shopper -->|"uses"| node_app
node_app -->|"routes to"| node_search
node_app -->|"renders"| node_filters
node_app -->|"renders"| node_catalogui
node_search -->|"renders"| node_filters
node_searchbar -->|"uses"| node_suggestions
node_app -->|"routes to"| node_basketui
node_app -->|"routes to"| node_favoritesui
node_app -->|"routes to"| node_loginui
node_app -->|"routes to"| node_profileui
node_loginui -.->|"API use unverified"| node_authapi
node_authcontroller -->|"delegates"| node_authservice
node_authservice -->|"reads and writes"| node_repositories
node_authservice -->|"creates users and baskets"| node_entities
node_app -->|"routes to"| node_adminui
node_admincontroller -->|"delegates"| node_adminservice
node_adminservice -->|"reads and writes"| node_repositories
node_productservice -->|"queries"| node_repositories
node_basketcontroller -->|"delegates"| node_basketservice
node_basketservice -->|"reads and writes"| node_repositories
node_favoritescontroller -.->|"service access unverified"| node_repositories
node_orders -->|"reads and writes"| node_repositories
node_repositories -->|"persists"| node_entities
node_basketui -.->|"API use unverified"| node_basketcontroller
node_favoritesui -.->|"API use unverified"| node_favoritescontroller
node_catalogui -.->|"API use unverified"| node_productservice

click node_app "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/App.jsx"
click node_search "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/SearchPage.jsx"
click node_filters "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/components/features/Filters/Filters.jsx"
click node_searchbar "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/components/features/Search/SearchBar.jsx"
click node_suggestions "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/hooks/useSearchSuggestions.js"
click node_basketui "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/BasketPage/BasketPage.jsx"
click node_favoritesui "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/FavoritePage/FavoritePage.jsx"
click node_loginui "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/LoginPage/LoginPage.jsx"
click node_profileui "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/ProfilePage/ProfilePage.jsx"
click node_authapi "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/api/authApi.js"
click node_authcontroller "https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/controller/AuthController.java"
click node_authservice "https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/AuthService.java"
click node_adminui "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/adminPage.jsx"
click node_catalogui "https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/components/features/ProductArea/ProductArea.jsx"
click node_productservice "https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/ProductService.java"
click node_admincontroller "https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/controller/AdminController.java"
click node_adminservice "https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/AdminService.java"
click node_basketcontroller "https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/controller/BasketController.java"
click node_basketservice "https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/BasketService.java"
click node_favoritescontroller "https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/controller/FavoritesController.java"
click node_orders "https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/UserOrderService.java"
click node_repositories "https://github.com/nedixcode/shoppetproject/tree/main/src/main/java/backend/shoppetproject/repository"
click node_entities "https://github.com/nedixcode/shoppetproject/tree/main/src/main/java/backend/shoppetproject/entity"

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_app,node_search,node_filters,node_searchbar,node_suggestions,node_basketui,node_favoritesui toneBlue
class node_loginui,node_profileui,node_authapi,node_authcontroller,node_authservice toneAmber
class node_adminui,node_catalogui,node_productservice,node_admincontroller,node_adminservice toneMint
class node_basketcontroller,node_basketservice,node_favoritescontroller,node_orders toneRose
class node_repositories,node_entities,node_shopper toneIndigo
```

## Components

### Storefront

- [App Routes](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Search Page](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/SearchPage.jsx): `frontend/src/pages/SearchPage.jsx`
- [Catalog Filters](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/components/features/Filters/Filters.jsx): `frontend/src/components/features/Filters/Filters.jsx`
- [Search Bar](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/components/features/Search/SearchBar.jsx): `frontend/src/components/features/Search/SearchBar.jsx`
- [Search Suggestions](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/hooks/useSearchSuggestions.js): `frontend/src/hooks/useSearchSuggestions.js`
- [Basket Page](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/BasketPage/BasketPage.jsx): `frontend/src/pages/BasketPage/BasketPage.jsx`
- [Favorites Page](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/FavoritePage/FavoritePage.jsx): `frontend/src/pages/FavoritePage/FavoritePage.jsx`

### Identity

- [Login and Registration](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/LoginPage/LoginPage.jsx): `frontend/src/pages/LoginPage/LoginPage.jsx`
- [Profile Page](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/ProfilePage/ProfilePage.jsx): `frontend/src/pages/ProfilePage/ProfilePage.jsx`
- [Auth API Client](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/api/authApi.js): `frontend/src/api/authApi.js`
- [Auth Controller](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/controller/AuthController.java): `src/main/java/backend/shoppetproject/controller/AuthController.java`
- [Auth Service](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/AuthService.java): `src/main/java/backend/shoppetproject/service/AuthService.java`

### Catalog and Admin

- [Admin Panel](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/pages/adminPage.jsx): `frontend/src/pages/adminPage.jsx`
- [Product Browsing](https://github.com/nedixcode/shoppetproject/blob/main/frontend/src/components/features/ProductArea/ProductArea.jsx): `frontend/src/components/features/ProductArea/ProductArea.jsx`
- [Product Service](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/ProductService.java): `src/main/java/backend/shoppetproject/service/ProductService.java`
- [Admin Controller](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/controller/AdminController.java): `src/main/java/backend/shoppetproject/controller/AdminController.java`
- [Admin Service](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/AdminService.java): `src/main/java/backend/shoppetproject/service/AdminService.java`

### Commerce

- [Basket Controller](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/controller/BasketController.java): `src/main/java/backend/shoppetproject/controller/BasketController.java`
- [Basket Service](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/BasketService.java): `src/main/java/backend/shoppetproject/service/BasketService.java`
- [Favorites Controller](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/controller/FavoritesController.java): `src/main/java/backend/shoppetproject/controller/FavoritesController.java`
- [Order Processing](https://github.com/nedixcode/shoppetproject/blob/main/src/main/java/backend/shoppetproject/service/UserOrderService.java): `src/main/java/backend/shoppetproject/service/UserOrderService.java`

### Backend Data

- [Data Repositories](https://github.com/nedixcode/shoppetproject/tree/main/src/main/java/backend/shoppetproject/repository): `src/main/java/backend/shoppetproject/repository`
- [Persistent Entities](https://github.com/nedixcode/shoppetproject/tree/main/src/main/java/backend/shoppetproject/entity): `src/main/java/backend/shoppetproject/entity`

### Other components

- **Shopper**

## Connections

- Shopper → App Routes: uses (evidence: `frontend/src/App.jsx`)
- App Routes → Search Page: routes to (evidence: `frontend/src/App.jsx`)
- App Routes → Catalog Filters: renders (evidence: `frontend/src/App.jsx`)
- App Routes → Product Browsing: renders (evidence: `frontend/src/App.jsx`)
- Search Page → Catalog Filters: renders (evidence: `frontend/src/pages/SearchPage.jsx`)
- Search Bar → Search Suggestions: uses (evidence: `frontend/src/components/features/Search/SearchBar.jsx`)
- App Routes → Basket Page: routes to (evidence: `frontend/src/App.jsx`)
- App Routes → Favorites Page: routes to (evidence: `frontend/src/App.jsx`)
- App Routes → Login and Registration: routes to (evidence: `frontend/src/App.jsx`)
- App Routes → Profile Page: routes to (evidence: `frontend/src/App.jsx`)
- Login and Registration → Auth API Client: API use unverified
- Auth Controller → Auth Service: delegates (evidence: `src/main/java/backend/shoppetproject/controller/AuthController.java`)
- Auth Service → Data Repositories: reads and writes (evidence: `src/main/java/backend/shoppetproject/service/AuthService.java`)
- Auth Service → Persistent Entities: creates users and baskets (evidence: `src/main/java/backend/shoppetproject/service/AuthService.java`)
- App Routes → Admin Panel: routes to (evidence: `frontend/src/App.jsx`)
- Admin Controller → Admin Service: delegates (evidence: `src/main/java/backend/shoppetproject/controller/AdminController.java`)
- Admin Service → Data Repositories: reads and writes (evidence: `src/main/java/backend/shoppetproject/service/AdminService.java`)
- Product Service → Data Repositories: queries (evidence: `src/main/java/backend/shoppetproject/service/ProductService.java`)
- Basket Controller → Basket Service: delegates (evidence: `src/main/java/backend/shoppetproject/controller/BasketController.java`)
- Basket Service → Data Repositories: reads and writes (evidence: `src/main/java/backend/shoppetproject/service/BasketService.java`)
- Favorites Controller → Data Repositories: service access unverified
- Order Processing → Data Repositories: reads and writes (evidence: `src/main/java/backend/shoppetproject/service/UserOrderService.java`)
- Data Repositories → Persistent Entities: persists (evidence: `src/main/java/backend/shoppetproject/repository/ProductRepository.java`)
- Basket Page → Basket Controller: API use unverified
- Favorites Page → Favorites Controller: API use unverified
- Product Browsing → Product Service: API use unverified
