# leventewolf/bookshop architecture

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

- Interactive diagram: https://gitdiagram.com/leventewolf/bookshop
- Repository: https://github.com/leventewolf/bookshop

## Overview

Bookshop is a React/Redux storefront backed by an Express API and Oracle. The main shopper flow is browsing catalog and product details, adding products to basket or wishlist, then checking out; account registration, profile/purchase history, and administrator storage/product management are separate capabilities. Edges reflect calls visible in excerpts or routes explicitly shown there; broader catalog and account subsystems are retained where documented by the source index, but their unsampled internals are not inferred.

Main entry points: [`client/src/App.js`](https://github.com/leventewolf/bookshop/blob/master/client/src/App.js) (Route shell), [`server/src/routes/router.js`](https://github.com/leventewolf/bookshop/blob/master/server/src/routes/router.js) (API routes), [`client/src/components/ProductPage.jsx`](https://github.com/leventewolf/bookshop/blob/master/client/src/components/ProductPage.jsx) (Product details), [`server/src/dao/main_dao.js`](https://github.com/leventewolf/bookshop/blob/master/server/src/dao/main_dao.js) (Catalog and commerce DAO)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["Route shell<br/>[App.js]"]
  node_catalog["Catalog pages"]
  node_home["Home features"]
  node_product_detail["Product details<br/>[ProductPage.jsx]"]
  node_product_templates["Product views"]
  node_redux["Redux store<br/>[store.js]"]
end

subgraph group_commerce["Shopping"]
  node_basket["Basket<br/>[Basket.jsx]"]
  node_wishlist["Wishlist<br/>[Wishlist.jsx]"]
  node_basket_actions["Basket state actions<br/>[basketActions.js]"]
  node_wishlist_actions["Wishlist state actions<br/>[wishlistActions.js]"]
end

subgraph group_accounts["Accounts"]
  node_user_interface["Account screens"]
  node_profile["Profile and purchases<br/>[Profile.jsx]"]
  node_user_api["User API client<br/>[userAPI.js]"]
  node_storages["Storage management<br/>[Storages.tsx]"]
end

subgraph group_service["API service"]
  node_http["HTTP client<br/>[http-common.js]"]
  node_server["Express app<br/>[app.js]"]
  node_routes["API routes<br/>[router.js]"]
end

subgraph group_persistence["Oracle data"]
  node_dao["Catalog and commerce DAO<br/>[main_dao.js]"]
  node_oracle[("Oracle database")]
  node_db_config["Oracle connection config<br/>[db.js]"]
end

node_visitor(("Shopper"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_basket
node_app -->|"routes to"| node_wishlist
node_app -->|"routes to"| node_product_detail
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_storages
node_catalog -->|"uses"| node_product_templates
node_product_detail -->|"renders"| node_product_templates
node_product_detail -->|"fetches product"| node_routes
node_product_templates -->|"dispatches"| node_basket_actions
node_basket -.->|"submits checkout"| node_routes
node_wishlist -.->|"loads wishlist"| node_routes
node_user_interface -->|"uses"| node_user_api
node_user_api -->|"sends requests"| node_http
node_profile -.->|"loads profile"| node_routes
node_storages -.->|"requests storage data"| node_routes
node_app -->|"uses state"| node_redux
node_server -->|"mounts"| node_routes
node_routes -->|"dispatches requests"| node_dao
node_dao -->|"queries"| node_oracle
node_dao -->|"loads config"| node_db_config

click node_app "https://github.com/leventewolf/bookshop/blob/master/client/src/App.js"
click node_catalog "https://github.com/leventewolf/bookshop/tree/master/client/src/components/products"
click node_home "https://github.com/leventewolf/bookshop/tree/master/client/src/components/home"
click node_product_detail "https://github.com/leventewolf/bookshop/blob/master/client/src/components/ProductPage.jsx"
click node_product_templates "https://github.com/leventewolf/bookshop/blob/master/client/src/components/templates/TemplateProducts.jsx"
click node_basket "https://github.com/leventewolf/bookshop/blob/master/client/src/components/Basket.jsx"
click node_wishlist "https://github.com/leventewolf/bookshop/blob/master/client/src/components/Wishlist.jsx"
click node_basket_actions "https://github.com/leventewolf/bookshop/blob/master/client/src/redux/actions/basketActions.js"
click node_wishlist_actions "https://github.com/leventewolf/bookshop/blob/master/client/src/redux/actions/wishlistActions.js"
click node_user_interface "https://github.com/leventewolf/bookshop/tree/master/client/src/components/user"
click node_profile "https://github.com/leventewolf/bookshop/blob/master/client/src/components/user/Profile.jsx"
click node_user_api "https://github.com/leventewolf/bookshop/blob/master/client/src/api/userAPI.js"
click node_storages "https://github.com/leventewolf/bookshop/blob/master/client/src/components/storages/Storages.tsx"
click node_redux "https://github.com/leventewolf/bookshop/blob/master/client/src/redux/store.js"
click node_http "https://github.com/leventewolf/bookshop/blob/master/client/src/http-common.js"
click node_server "https://github.com/leventewolf/bookshop/blob/master/server/app.js"
click node_routes "https://github.com/leventewolf/bookshop/blob/master/server/src/routes/router.js"
click node_dao "https://github.com/leventewolf/bookshop/blob/master/server/src/dao/main_dao.js"
click node_db_config "https://github.com/leventewolf/bookshop/blob/master/server/config/db.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_app,node_catalog,node_home,node_product_detail,node_product_templates,node_redux toneBlue
class node_basket,node_wishlist,node_basket_actions,node_wishlist_actions toneAmber
class node_user_interface,node_profile,node_user_api,node_storages toneMint
class node_http,node_server,node_routes toneRose
class node_dao,node_oracle,node_db_config,node_visitor toneIndigo
```

## Components

### Storefront

- [Route shell](https://github.com/leventewolf/bookshop/blob/master/client/src/App.js): `client/src/App.js`
- [Catalog pages](https://github.com/leventewolf/bookshop/tree/master/client/src/components/products): `client/src/components/products`
- [Home features](https://github.com/leventewolf/bookshop/tree/master/client/src/components/home): `client/src/components/home`
- [Product details](https://github.com/leventewolf/bookshop/blob/master/client/src/components/ProductPage.jsx): `client/src/components/ProductPage.jsx`
- [Product views](https://github.com/leventewolf/bookshop/blob/master/client/src/components/templates/TemplateProducts.jsx): `client/src/components/templates/TemplateProducts.jsx`
- [Redux store](https://github.com/leventewolf/bookshop/blob/master/client/src/redux/store.js): `client/src/redux/store.js`

### Shopping

- [Basket](https://github.com/leventewolf/bookshop/blob/master/client/src/components/Basket.jsx): `client/src/components/Basket.jsx`
- [Wishlist](https://github.com/leventewolf/bookshop/blob/master/client/src/components/Wishlist.jsx): `client/src/components/Wishlist.jsx`
- [Basket state actions](https://github.com/leventewolf/bookshop/blob/master/client/src/redux/actions/basketActions.js): `client/src/redux/actions/basketActions.js`
- [Wishlist state actions](https://github.com/leventewolf/bookshop/blob/master/client/src/redux/actions/wishlistActions.js): `client/src/redux/actions/wishlistActions.js`

### Accounts

- [Account screens](https://github.com/leventewolf/bookshop/tree/master/client/src/components/user): `client/src/components/user`
- [Profile and purchases](https://github.com/leventewolf/bookshop/blob/master/client/src/components/user/Profile.jsx): `client/src/components/user/Profile.jsx`
- [User API client](https://github.com/leventewolf/bookshop/blob/master/client/src/api/userAPI.js): `client/src/api/userAPI.js`
- [Storage management](https://github.com/leventewolf/bookshop/blob/master/client/src/components/storages/Storages.tsx): `client/src/components/storages/Storages.tsx`

### API service

- [HTTP client](https://github.com/leventewolf/bookshop/blob/master/client/src/http-common.js): `client/src/http-common.js`
- [Express app](https://github.com/leventewolf/bookshop/blob/master/server/app.js): `server/app.js`
- [API routes](https://github.com/leventewolf/bookshop/blob/master/server/src/routes/router.js): `server/src/routes/router.js`

### Oracle data

- [Catalog and commerce DAO](https://github.com/leventewolf/bookshop/blob/master/server/src/dao/main_dao.js): `server/src/dao/main_dao.js`
- **Oracle database**
- [Oracle connection config](https://github.com/leventewolf/bookshop/blob/master/server/config/db.js): `server/config/db.js`

### Other components

- **Shopper**

## Connections

- Shopper → Route shell: opens (evidence: `client/src/App.js`)
- Route shell → Catalog pages: routes to (evidence: `client/src/App.js`)
- Route shell → Home features: routes to (evidence: `client/src/App.js`)
- Route shell → Basket: routes to (evidence: `client/src/App.js`)
- Route shell → Wishlist: routes to (evidence: `client/src/App.js`)
- Route shell → Product details: routes to (evidence: `client/src/App.js`)
- Route shell → Profile and purchases: routes to (evidence: `client/src/App.js`)
- Route shell → Storage management: routes to (evidence: `client/src/App.js`)
- Catalog pages → Product views: uses (evidence: `client/src/components/products/Books.tsx`)
- Product details → Product views: renders (evidence: `client/src/components/ProductPage.jsx`)
- Product details → API routes: fetches product (evidence: `client/src/components/ProductPage.jsx`)
- Product views → Basket state actions: dispatches (evidence: `client/src/components/templates/TemplateProducts.jsx`)
- Basket → API routes: submits checkout
- Wishlist → API routes: loads wishlist
- Account screens → User API client: uses (evidence: `client/src/components/user/Register.jsx`)
- User API client → HTTP client: sends requests (evidence: `client/src/api/userAPI.js`)
- Profile and purchases → API routes: loads profile
- Storage management → API routes: requests storage data
- Route shell → Redux store: uses state (evidence: `client/src/index.js`)
- Express app → API routes: mounts (evidence: `server/app.js`)
- API routes → Catalog and commerce DAO: dispatches requests (evidence: `server/src/routes/router.js`)
- Catalog and commerce DAO → Oracle database: queries (evidence: `server/src/dao/main_dao.js`)
- Catalog and commerce DAO → Oracle connection config: loads config (evidence: `server/src/dao/main_dao.js`)
