How aminurislamarnob/storesuite works
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: StoreSuite.php StoreSuite core · dashboard.php Templates · script.js Admin assets · webpack.config.js Build pipeline
Components 22
Bootstrap & Core
Plugin entry, lifecycle, routing, shared helpers, and WordPress integration.
- StoreSuite plugin · Main plugin bootstrap file that registers the plugin with WordPress.
storesuite.php - StoreSuite core · Wires subsystems, shortcodes, assets, rewrites, and templates into WordPress.
includes/StoreSuite.php - Main lifecycle · Core initialization and compatibility setup for the plugin runtime.
includes/Main.php - Installer · Handles install-time setup and activation behavior.
includes/Installer.php - Upgrader · Manages plugin upgrade compatibility and migration steps.
includes/Upgrader.php - Shared helpers · Common helper functions and reusable infrastructure used across subsystems.
includes/functions.php
Store Management
Operational controllers and templates for WooCommerce entities.
- Products · Product management controllers, managers, hooks, bulk actions, export, AI, and variations.
includes/Product/ProductController.php - Orders · Order management controllers, hooks, and order creation/edit flows.
includes/Order/OrderController.php - Coupons · Coupon management and bulk-edit operations.
includes/Coupon/CouponController.php - Taxonomies · 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 · Server-side analytics controller, settings, permissions, and WooCommerce Admin bootstrap.
includes/Analytics/Controller.php - Analytics app · Client-side analytics reports, filters, tables, charts, and layout composition.
src/analytics/index.js - Dashboard 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 · Primary store-management page composition rendered through shortcodes and templates.
includes/Shortcodes/Dashboard.php - Shortcodes · Registers frontend and dashboard shortcodes.
includes/Shortcodes/Shortcodes.php - Dashboard menu · Builds the store-management navigation and menu structure.
includes/DashboardMenu.php - Templates · Server-rendered page fragments for dashboard and management screens.
templates/dashboard.php - Asset loader · Registers and localizes shared CSS/JS assets for the plugin.
includes/Assets.php - Settings context · Shared client-side settings and state consumed by dashboard and settings components.
src/context/SettingsContext.js - Admin assets · 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 · Webpack and shell build flow used to produce distributable plugin assets.
webpack.config.js - GitHub Actions · Automated workflows for asset updates, deployment, and PHP linting.
.github/workflows/deploy.yml
Connections 28
- 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.