# aminurislamarnob/storesuite architecture

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

- Interactive diagram: https://gitdiagram.com/aminurislamarnob/storesuite
- Repository: https://github.com/aminurislamarnob/storesuite

## Overview

1. This repository is a WordPress plugin for WooCommerce store management, centered around a “StoreSuite” frontend/admin experience. The runtime is PHP inside WordPress/WooCommerce, with a significant JavaScript build for interactive dashboards, forms, and analytics.

2. The main bootstrap path is `storesuite.php` and `includes/StoreSuite.php`, which connect the plugin into WordPress and wire up the subsystem controllers, assets, shortcodes, rewrite rules, and templates. `includes/Main.php`, `includes/functions.php`, `includes/Installer.php`, and `includes/Upgrader.php` provide the core lifecycle and compatibility setup.

3. UI rendering is split between server-side templates and bundled client assets. PHP templates live in `templates/`, while CSS/JS lives in `assets/` for runtime delivery and `src/` for source code that is compiled into those assets. This matters because most screens are not purely React apps; many are WordPress-rendered pages enhanced by JS.

4. The primary user-facing entry point appears to be a dashboard shell rendered through shortcodes and templates. `includes/Shortcodes/Dashboard.php`, `includes/Shortcodes/Shortcodes.php`, `includes/DashboardMenu.php`, and `templates/dashboard*.php` define the layout, menu, branding, and page composition for the store-management experience.

5. Product management is a major subsystem with its own controller/manager/hook split: `includes/Product/ProductController.php`, `ProductManager.php`, `ProductHooks.php`, `ProductBulkEdit.php`, `ProductQuickEdit.php`, `ProductExportController.php`, `ProductExporter.php`, `ProductAI.php`, `ProductImageAI.php`, and `VariationAjax.php`. The flow is: admin/frontend actions hit controllers or AJAX handlers, managers encapsulate WooCommerce data operations, and templates in `templates/products/` render forms, tables, modals, quick edit, export, bulk edit, and variation UI.

6. Orders and coupons follow the same pattern. `includes/Order/*` and `includes/Coupon/*` contain controllers/managers/hooks for order creation, editing, filtering, and bulk coupon actions, with corresponding templates in `templates/orders/` and `templates/coupons/`. This suggests the plugin is acting as an alternate operational console over core WooCommerce entities.

7. Taxonomy and catalog-structure management is separated into dedicated controllers: product categories, tags, brands, and attributes live under `includes/ProductCategory/`, `includes/ProductTag/`, `includes/ProductBrand/`, and `includes/ProductAttribute/`. Their templates under `templates/categories/`, `templates/tags/`, `templates/brands/`, and `templates/attributes/` show that these are first-class management screens, not just incidental admin forms.

8. Analytics is its own substantial subsystem and is implemented as a React-style app under `src/analytics/`, with server-side integration in `includes/Analytics/`. The PHP side includes assets loading, controller logic, REST permissions, settings, and WooCommerce Admin bootstrap; the JS side contains report pages, tables, filters, charts, error boundaries, and layout composition. Data flows from WooCommerce/WP data sources into analytics reports, then into report tables and charts in the dashboard UI.

9. There is also a separate dashboard-oriented JS app under `src/dashboard/`, with components for store performance, recent orders, quick actions, leaderboards, charts, and a date range picker. Shared settings/state live in `src/context/SettingsContext.js` and `src/Components/`, indicating a client-side UI layer that consumes server-provided settings and report data.

10. Cross-cutting infrastructure supports these screens: `includes/Assets.php`, `includes/Admin/Settings.php`, `includes/Analytics/Assets.php`, and `includes/Dashboard/Assets.php` manage asset registration and configuration; `includes/REST/SettingsController.php` exposes settings via REST; `includes/Cache.php`, `includes/HandlePaginations.php`, `includes/ListTable/`, and `includes/Helper.php` support data fetching, paging, and reusable table actions. `includes/Rewrites.php` and `includes/TemplateParts.php` help route requests and assemble page fragments.

11. The front-end behavior is augmented by multiple dedicated scripts in `assets/frontend/` and `assets/admin/`, including product forms, variation handling, order views, coupon bulk actions, taxonomy lists, and general dashboard behavior. This indicates a mixed architecture where WordPress templates provide structure and the JS layer handles richer interactions and asynchronous updates.

12. Build and delivery are conventional for a plugin with modern assets: PHP dependencies are managed by Composer, JS dependencies by npm, and `webpack.config.js` plus `bin/build.sh` produce distributable assets. The GitHub Actions workflows handle plugin asset updates, deployment, and PHP linting, showing a release pipeline oriented around WordPress.org/plugin packaging.

Main entry points: [`includes/StoreSuite.php`](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/StoreSuite.php) (StoreSuite core), [`templates/dashboard.php`](https://github.com/aminurislamarnob/storesuite/blob/develop/templates/dashboard.php) (Templates), [`assets/frontend/script.js`](https://github.com/aminurislamarnob/storesuite/blob/develop/assets/frontend/script.js) (Admin assets), [`webpack.config.js`](https://github.com/aminurislamarnob/storesuite/blob/develop/webpack.config.js) (Build pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bootstrap["Bootstrap & Core"]
  node_storesuite_php["StoreSuite plugin<br/>bootstrap entry<br/>[storesuite.php]"]
  node_storesuite_core["StoreSuite core<br/>plugin core<br/>[StoreSuite.php]"]
  node_main_lifecycle["Main lifecycle<br/>lifecycle setup<br/>[Main.php]"]
  node_installer["Installer<br/>install/upgrade<br/>[Installer.php]"]
  node_upgrader["Upgrader<br/>upgrade flow<br/>[Upgrader.php]"]
  node_shared_helpers["Shared helpers<br/>utilities<br/>[functions.php]"]
end

subgraph group_catalog["Store Management"]
  node_products["Products<br/>catalog module"]
  node_orders["Orders<br/>order module"]
  node_coupons["Coupons<br/>coupon module"]
  node_taxonomies["Taxonomies<br/>catalog taxonomy"]
end

subgraph group_analytics["Analytics"]
  node_analytics_php["Analytics backend<br/>analytics integration<br/>[Controller.php]"]
  node_analytics_app["Analytics app<br/>react app<br/>[index.js]"]
  node_dashboard_app["Dashboard app<br/>react app<br/>[index.js]"]
end

subgraph group_ui["UI Layer"]
  node_dashboard_shell["Dashboard shell<br/>shortcode shell<br/>[Dashboard.php]"]
  node_shortcodes["Shortcodes<br/>shortcode router<br/>[Shortcodes.php]"]
  node_dashboard_menu["Dashboard menu<br/>navigation<br/>[DashboardMenu.php]"]
  node_templates["Templates<br/>php views<br/>[dashboard.php]"]
  node_assets_php["Asset loader<br/>asset registration<br/>[Assets.php]"]
  node_shared_context["Settings context<br/>client state<br/>[SettingsContext.js]"]
  node_admin_assets["Admin assets<br/>frontend scripts<br/>[script.js]"]
end

subgraph group_delivery["Build & Release"]
  node_build_release["Build pipeline<br/>tooling<br/>[webpack.config.js]"]
  node_workflows["GitHub Actions<br/>release CI<br/>[deploy.yml]"]
end

node_storesuite_php -->|"bootstraps"| node_storesuite_core
node_storesuite_core -->|"initializes"| node_main_lifecycle
node_storesuite_core -->|"installs"| node_installer
node_storesuite_core -->|"upgrades"| node_upgrader
node_storesuite_core -->|"uses"| node_shared_helpers
node_storesuite_core -->|"registers"| node_shortcodes
node_storesuite_core -->|"builds"| node_dashboard_menu
node_storesuite_core -->|"enqueues"| node_assets_php
node_shortcodes -->|"renders"| node_dashboard_shell
node_dashboard_shell -->|"composes"| node_templates
node_templates -->|"includes"| node_dashboard_menu
node_products -->|"renders"| node_templates
node_orders -->|"renders"| node_templates
node_coupons -->|"renders"| node_templates
node_taxonomies -->|"renders"| node_templates
node_products -->|"interacts"| node_admin_assets
node_orders -->|"interacts"| node_admin_assets
node_coupons -->|"interacts"| node_admin_assets
node_taxonomies -->|"interacts"| node_admin_assets
node_analytics_php -->|"feeds"| node_analytics_app
node_analytics_app -->|"consumes"| node_shared_context
node_dashboard_app -->|"consumes"| node_shared_context
node_assets_php -->|"registers"| node_analytics_php
node_assets_php -->|"registers"| node_dashboard_app
node_build_release -->|"produces"| node_admin_assets
node_build_release -->|"produces"| node_analytics_app
node_build_release -->|"produces"| node_dashboard_app
node_workflows -->|"runs"| node_build_release

click node_storesuite_php "https://github.com/aminurislamarnob/storesuite/blob/develop/storesuite.php"
click node_storesuite_core "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/StoreSuite.php"
click node_main_lifecycle "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Main.php"
click node_installer "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Installer.php"
click node_upgrader "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Upgrader.php"
click node_shared_helpers "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/functions.php"
click node_dashboard_shell "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Shortcodes/Dashboard.php"
click node_shortcodes "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Shortcodes/Shortcodes.php"
click node_dashboard_menu "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/DashboardMenu.php"
click node_templates "https://github.com/aminurislamarnob/storesuite/blob/develop/templates/dashboard.php"
click node_assets_php "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Assets.php"
click node_products "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Product/ProductController.php"
click node_orders "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Order/OrderController.php"
click node_coupons "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Coupon/CouponController.php"
click node_taxonomies "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/ProductCategory/CategoryController.php"
click node_analytics_php "https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Analytics/Controller.php"
click node_analytics_app "https://github.com/aminurislamarnob/storesuite/blob/develop/src/analytics/index.js"
click node_dashboard_app "https://github.com/aminurislamarnob/storesuite/blob/develop/src/dashboard/index.js"
click node_shared_context "https://github.com/aminurislamarnob/storesuite/blob/develop/src/context/SettingsContext.js"
click node_admin_assets "https://github.com/aminurislamarnob/storesuite/blob/develop/assets/frontend/script.js"
click node_build_release "https://github.com/aminurislamarnob/storesuite/blob/develop/webpack.config.js"
click node_workflows "https://github.com/aminurislamarnob/storesuite/blob/develop/.github/workflows/deploy.yml"

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_storesuite_php,node_storesuite_core,node_main_lifecycle,node_installer,node_upgrader,node_shared_helpers toneBlue
class node_products,node_orders,node_coupons,node_taxonomies toneAmber
class node_analytics_php,node_analytics_app,node_dashboard_app toneMint
class node_dashboard_shell,node_shortcodes,node_dashboard_menu,node_templates,node_assets_php,node_shared_context,node_admin_assets toneRose
class node_build_release,node_workflows toneIndigo
```

## Components

### Bootstrap & Core

Plugin entry, lifecycle, routing, shared helpers, and WordPress integration.

- [StoreSuite plugin](https://github.com/aminurislamarnob/storesuite/blob/develop/storesuite.php): bootstrap entry · Main plugin bootstrap file that registers the plugin with WordPress. · `storesuite.php`
- [StoreSuite core](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/StoreSuite.php): plugin core · Wires subsystems, shortcodes, assets, rewrites, and templates into WordPress. · `includes/StoreSuite.php`
- [Main lifecycle](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Main.php): lifecycle setup · Core initialization and compatibility setup for the plugin runtime. · `includes/Main.php`
- [Installer](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Installer.php): install/upgrade · Handles install-time setup and activation behavior. · `includes/Installer.php`
- [Upgrader](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Upgrader.php): upgrade flow · Manages plugin upgrade compatibility and migration steps. · `includes/Upgrader.php`
- [Shared helpers](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/functions.php): utilities · Common helper functions and reusable infrastructure used across subsystems. · `includes/functions.php`

### Store Management

Operational controllers and templates for WooCommerce entities.

- [Products](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Product/ProductController.php): catalog module · Product management controllers, managers, hooks, bulk actions, export, AI, and variations. · `includes/Product/ProductController.php`
- [Orders](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Order/OrderController.php): order module · Order management controllers, hooks, and order creation/edit flows. · `includes/Order/OrderController.php`
- [Coupons](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Coupon/CouponController.php): coupon module · Coupon management and bulk-edit operations. · `includes/Coupon/CouponController.php`
- [Taxonomies](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/ProductCategory/CategoryController.php): catalog taxonomy · Category, tag, brand, and attribute management screens. · `includes/ProductCategory/CategoryController.php`

### Analytics

Server-side analytics integration and the client app that renders reports.

- [Analytics backend](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Analytics/Controller.php): analytics integration · Server-side analytics controller, settings, permissions, and WooCommerce Admin bootstrap. · `includes/Analytics/Controller.php`
- [Analytics app](https://github.com/aminurislamarnob/storesuite/blob/develop/src/analytics/index.js): react app · Client-side analytics reports, filters, tables, charts, and layout composition. · `src/analytics/index.js`
- [Dashboard app](https://github.com/aminurislamarnob/storesuite/blob/develop/src/dashboard/index.js): react app · Client-side dashboard experience for performance, orders, actions, and charts. · `src/dashboard/index.js`

### UI Layer

Shared front-end and dashboard JavaScript plus templates and assets.

- [Dashboard shell](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Shortcodes/Dashboard.php): shortcode shell · Primary store-management page composition rendered through shortcodes and templates. · `includes/Shortcodes/Dashboard.php`
- [Shortcodes](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Shortcodes/Shortcodes.php): shortcode router · Registers frontend and dashboard shortcodes. · `includes/Shortcodes/Shortcodes.php`
- [Dashboard menu](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/DashboardMenu.php): navigation · Builds the store-management navigation and menu structure. · `includes/DashboardMenu.php`
- [Templates](https://github.com/aminurislamarnob/storesuite/blob/develop/templates/dashboard.php): php views · Server-rendered page fragments for dashboard and management screens. · `templates/dashboard.php`
- [Asset loader](https://github.com/aminurislamarnob/storesuite/blob/develop/includes/Assets.php): asset registration · Registers and localizes shared CSS/JS assets for the plugin. · `includes/Assets.php`
- [Settings context](https://github.com/aminurislamarnob/storesuite/blob/develop/src/context/SettingsContext.js): client state · Shared client-side settings and state consumed by dashboard and settings components. · `src/context/SettingsContext.js`
- [Admin assets](https://github.com/aminurislamarnob/storesuite/blob/develop/assets/frontend/script.js): frontend scripts · Bundled admin and frontend scripts for product forms, orders, coupons, taxonomies, and dashboards. · `assets/frontend/script.js`

### Build & Release

Tooling and workflows for packaging and distributing the plugin.

- [Build pipeline](https://github.com/aminurislamarnob/storesuite/blob/develop/webpack.config.js): tooling · Webpack and shell build flow used to produce distributable plugin assets. · `webpack.config.js`
- [GitHub Actions](https://github.com/aminurislamarnob/storesuite/blob/develop/.github/workflows/deploy.yml): release CI · Automated workflows for asset updates, deployment, and PHP linting. · `.github/workflows/deploy.yml`

## Connections

- StoreSuite plugin → StoreSuite core: bootstraps · Main plugin file loads the core plugin class.
- StoreSuite core → Main lifecycle: initializes · Core wiring delegates lifecycle and compatibility setup.
- StoreSuite core → Installer: installs · Core registers activation/install behavior.
- StoreSuite core → Upgrader: upgrades · Core wires upgrade and migration handling.
- StoreSuite core → Shared helpers: uses · Core relies on shared helpers and common utilities.
- StoreSuite core → Shortcodes: registers · Core exposes dashboard and frontend shortcodes.
- StoreSuite core → Dashboard menu: builds · Core connects navigation for the dashboard shell.
- StoreSuite core → Asset loader: enqueues · Core exposes shared assets to WordPress.
- Shortcodes → Dashboard shell: renders · Shortcodes map to the dashboard page shell.
- Dashboard shell → Templates: composes · Server-rendered templates assemble the dashboard UI.
- Templates → Dashboard menu: includes · Templates incorporate the dashboard navigation and layout.
- Products → Templates: renders · Product management screens are rendered through templates.
- Orders → Templates: renders · Order management screens are rendered through templates.
- Coupons → Templates: renders · Coupon management screens are rendered through templates.
- Taxonomies → Templates: renders · Taxonomy management screens are rendered through templates.
- Products → Admin assets: interacts · Product screens depend on bundled frontend/admin scripts.
- Orders → Admin assets: interacts · Order screens use JavaScript enhancements for interaction.
- Coupons → Admin assets: interacts · Coupon bulk and editing flows use bundled scripts.
- Taxonomies → Admin assets: interacts · Taxonomy management screens use frontend/admin scripts.
- Analytics backend → Analytics app: feeds · PHP integration provides data and settings to the analytics app.
- Analytics app → Settings context: consumes · Analytics UI consumes shared settings and client state.
- Dashboard app → Settings context: consumes · Dashboard UI consumes shared settings and client state.
- Asset loader → Analytics backend: registers · Asset loader supports the analytics backend and frontend bundle registration.
- Asset loader → Dashboard app: registers · Asset loader supports the dashboard client bundle.
- Build pipeline → Admin assets: produces · Build tooling compiles source JavaScript into distributable assets.
- Build pipeline → Analytics app: produces · Build tooling compiles the analytics client app.
- Build pipeline → Dashboard app: produces · Build tooling compiles the dashboard client app.
- GitHub Actions → Build pipeline: runs · CI workflows execute packaging and build steps.
