Skip to main content

Directory Structure

Scottsdale Mint uses the Roots.io Bedrock WordPress framework, which reorganizes the standard WordPress directory layout for improved security, maintainability, and environment separation.


Root Directoryโ€‹

scottsdalemint/            โ† Repository root (NOT the web root)
โ”œโ”€โ”€ AGENTS.md โ† AI agent & developer reference (read this first)
โ”œโ”€โ”€ auth.json โ† Private Packagist auth (NEVER COMMIT)
โ”œโ”€โ”€ bitbucket-pipelines.yml โ† CI/CD pipeline
โ”œโ”€โ”€ composer.json โ† ALL plugins, WordPress core, and themes defined here
โ”œโ”€โ”€ composer.lock โ† Locked dependency versions
โ”œโ”€โ”€ patches.lock.json โ† Composer patch lock file
โ”œโ”€โ”€ README.md โ† Project README
โ”œโ”€โ”€ UPDATE.md โ† Update notes and changelog
โ”œโ”€โ”€ wp-cli.yml โ† WP-CLI path and URL configuration
โ”œโ”€โ”€ ymir.yml โ† Ymir (AWS Lambda) hosting configuration
โ”œโ”€โ”€ .env โ† Local secrets (NEVER COMMIT โ€” in .gitignore)
โ”œโ”€โ”€ .env.example โ† Template for .env
โ”œโ”€โ”€ config/
โ”‚ โ”œโ”€โ”€ application.php โ† Main WordPress config (all env vars consumed here)
โ”‚ โ”œโ”€โ”€ class-config-helper.php โ† Plugin disabler utility class
โ”‚ โ””โ”€โ”€ environments/
โ”‚ โ”œโ”€โ”€ development.php โ† Development-specific overrides
โ”‚ โ”œโ”€โ”€ local.php โ† Local/Herd-specific overrides
โ”‚ โ”œโ”€โ”€ staging.php โ† Staging-specific overrides
โ”‚ โ””โ”€โ”€ production.php โ† Production-specific overrides
โ”œโ”€โ”€ docs/ โ† This Docusaurus documentation site
โ”œโ”€โ”€ nfusion/
โ”‚ โ””โ”€โ”€ live-price-chart/ โ† NFusion spot price chart widget (standalone Webpack build)
โ”œโ”€โ”€ patches/ โ† Patch files applied to third-party plugins via Composer
โ”‚ โ”œโ”€โ”€ 0001-Dev-CryptoWoo-Disable-Requests.patch
โ”‚ โ”œโ”€โ”€ 0001-Dev-Walmart-patch-missing-required-properties.patch
โ”‚ โ”œโ”€โ”€ 2FA-fix-path-in-twilio.patch
โ”‚ โ”œโ”€โ”€ Kount-Remove-Unecessary-Logging.patch
โ”‚ โ””โ”€โ”€ [other patches]
โ”œโ”€โ”€ scenario-testing/ โ† Jest + Puppeteer end-to-end checkout tests
โ”œโ”€โ”€ tools/
โ”‚ โ”œโ”€โ”€ db-sync/ โ† Database sync tool (prod/staging โ†’ local)
โ”‚ โ”œโ”€โ”€ nfusion-import/ โ† NFusion product catalog CSV import scripts
โ”‚ โ””โ”€โ”€ s3-sync/ โ† S3 media file sync tools
โ”œโ”€โ”€ vendor/ โ† Composer PHP packages (DO NOT EDIT)
โ””โ”€โ”€ vendor-static/ โ† Static vendor packages (Wonolog/Monolog)

web/ โ€” The Web Rootโ€‹

The web/ directory is the document root that the web server points to. Only files inside web/ are publicly accessible.

web/
โ”œโ”€โ”€ index.php โ† WordPress bootstrap (standard)
โ”œโ”€โ”€ wp-config.php โ† Loads config/application.php; handles CloudFront/Cloudflare IP
โ”œโ”€โ”€ robots.txt โ† Search engine crawl rules
โ”œโ”€โ”€ google0763189db8ee5157.html โ† Google Search Console verification
โ”œโ”€โ”€ wp/ โ† WordPress core (DO NOT EDIT โ€” Composer-managed)
โ”‚ โ”œโ”€โ”€ wp-admin/
โ”‚ โ”œโ”€โ”€ wp-includes/
โ”‚ โ””โ”€โ”€ [standard WP core files]
โ”œโ”€โ”€ app/ โ† Equivalent to wp-content/
โ”‚ โ”œโ”€โ”€ mu-plugins/ โ† Must-use plugins (auto-loaded before all others)
โ”‚ โ”œโ”€โ”€ plugins/ โ† All plugins (Composer-managed)
โ”‚ โ”œโ”€โ”€ themes/ โ† All themes (Composer-managed)
โ”‚ โ””โ”€โ”€ uploads/ โ† Media uploads (S3 in production via Ymir)
โ””โ”€โ”€ tools/ โ† Web-accessible admin/developer tools

web/app/ โ€” The WordPress Content Directoryโ€‹

This replaces the standard wp-content/ directory. The constant WP_CONTENT_DIR points here.

mu-plugins/ โ€” Must-Use Pluginsโ€‹

Must-use plugins are automatically loaded on every request, before regular plugins. They cannot be deactivated through the WordPress admin.

mu-plugins/
โ”œโ”€โ”€ a-suma-perfmatters-filters.php โ† Overrides Perfmatters cache path
โ”œโ”€โ”€ bedrock-plugin-disabler/ โ† Allows disabling plugins via config (not DB)
โ”œโ”€โ”€ disable-deprecation.php โ† Suppresses deprecated feature notices
โ”œโ”€โ”€ disable-woocommerce-block.php โ† Disables WooCommerce block editor features
โ”œโ”€โ”€ perfmatters_mu.php โ† Perfmatters performance monitoring
โ””โ”€โ”€ wonolog.php โ† Structured JSON logging setup (Wonolog + Monolog)

plugins/ โ€” All Pluginsโ€‹

All plugins are installed via Composer. Key custom plugins:

plugins/
โ”œโ”€โ”€ scottsdale-ach-gateway/ โ† Custom ACH payment gateway (Plaid + iTransact)
โ”œโ”€โ”€ suma-woo-emails/ โ† Custom WooCommerce transaction emails
โ”œโ”€โ”€ suma-woo-order-tracking/ โ† Customer order tracking page
โ”œโ”€โ”€ suma-patches/ โ† Site-specific patches and environment overrides
โ”œโ”€โ”€ suma-dealer-locator/ โ† Google Maps dealer finder
โ”œโ”€โ”€ suma-faqs/ โ† FAQ management
โ”œโ”€โ”€ sumatra-utilities/ โ† Shared utility library (Rhino Group)
โ”œโ”€โ”€ sumatra-logger/ โ† Custom structured logging integration
โ”œโ”€โ”€ wc-admin-precious-metals-data/ โ† Admin analytics (ounces sold, daily report)
โ”œโ”€โ”€ back-in-stock-notifications-for-klaviyo/ โ† Klaviyo back-in-stock forms
โ”œโ”€โ”€ reserved-stock-pro/ โ† Inventory reservation during checkout
โ”œโ”€โ”€ woo-custom-related-products/ โ† Custom related product logic
โ””โ”€โ”€ [40+ third-party plugins]

themes/ โ€” Themesโ€‹

themes/
โ””โ”€โ”€ suma-elementor/ โ† The only active theme (v2.3.0)
โ”œโ”€โ”€ style.css โ† Theme header declaration
โ”œโ”€โ”€ functions.php โ† Theme bootstrap
โ”œโ”€โ”€ inc/ โ† All PHP classes (50+ classes)
โ”œโ”€โ”€ dist/ โ† Compiled CSS and JS (from Webpack Mix)
โ”œโ”€โ”€ src/ โ† SCSS and JavaScript source files
โ”œโ”€โ”€ template-parts/ โ† Reusable PHP template fragments
โ”œโ”€โ”€ woocommerce/ โ† WooCommerce template overrides
โ”œโ”€โ”€ cryptowoo/ โ† CryptoWoo template overrides
โ””โ”€โ”€ suma-dealer-locator/ โ† Dealer locator templates

The suma-elementor Theme inc/ Deep Diveโ€‹

The theme's inc/ directory contains all PHP business logic:

inc/
โ”œโ”€โ”€ class-theme.php โ€” Main entrypoint, loads all classes
โ”œโ”€โ”€ class-woocommerce.php โ€” 760+ lines of WC hooks and filters
โ”œโ”€โ”€ class-admin.php โ€” WP admin customizations
โ”œโ”€โ”€ class-frontend.php โ€” Frontend scripts, head/body injection
โ”œโ”€โ”€ class-customizer.php โ€” WordPress Customizer integration
โ”œโ”€โ”€ class-elementor.php โ€” Elementor extension registration
โ”œโ”€โ”€ class-elementor-widgets.php โ€” Custom widget registration
โ”œโ”€โ”€ class-user.php โ€” User account / role management
โ”œโ”€โ”€ class-post.php โ€” Post type utilities
โ”œโ”€โ”€ class-pricing.php โ€” Global pricing manager
โ”œโ”€โ”€ class-pricing-tools.php โ€” Pricing calculation utilities
โ”œโ”€โ”€ class-trends.php โ€” Historical pricing trend data
โ”œโ”€โ”€ class-medoo.php โ€” Medoo database wrapper
โ”œโ”€โ”€ class-klaviyo.php โ€” Klaviyo API integration
โ”œโ”€โ”€ class-yotpo.php โ€” Yotpo reviews integration
โ”œโ”€โ”€ class-settings.php โ€” Theme settings/option keys
โ”œโ”€โ”€ class-translations.php โ€” Translation/i18n utilities
โ”œโ”€โ”€ endpoints/ โ€” REST API endpoint classes (18+ endpoints)
โ”œโ”€โ”€ product/ โ€” Product pricing, stock, visibility classes
โ”œโ”€โ”€ checkout/ โ€” Checkout customization + Kount Pre-Auth
โ”œโ”€โ”€ order/ โ€” Order handling classes
โ”œโ”€โ”€ email/ โ€” Email-related helpers
โ”œโ”€โ”€ account/ โ€” My Account page customizations
โ”œโ”€โ”€ cart/ โ€” Shopping cart logic
โ”œโ”€โ”€ apps/ โ€” Mobile app helpers
โ”œโ”€โ”€ yith/ โ€” YITH plugin integrations
โ”œโ”€โ”€ tags/ โ€” Custom Elementor dynamic tags
โ”œโ”€โ”€ widgets/ โ€” Custom Elementor widget classes
โ”œโ”€โ”€ skins/ โ€” Custom Elementor widget skin variations
โ”œโ”€โ”€ traits/ โ€” PHP traits reused across classes
โ””โ”€โ”€ integration/
โ”œโ”€โ”€ class-algolia.php โ€” Algolia CURL/referer configuration
โ”œโ”€โ”€ class-translate-press.php โ€” TranslatePress integration
โ”œโ”€โ”€ class-kount-ens-endpoint.php โ€” Kount fraud decision callback
โ””โ”€โ”€ class-walmart.php โ€” Walmart Marketplace integration

Key Bedrock Conventionsโ€‹

Standard WP PathBedrock PathNotes
/wp-content//web/app/WP_CONTENT_DIR
/wp-content/plugins//web/app/plugins/Managed by Composer
/wp-content/themes//web/app/themes/Managed by Composer
/wp-content/uploads//web/app/uploads/S3 in production
/wp-config.php/web/wp-config.phpLoads config/application.php
WordPress core/web/wp/Composer-managed, do NOT edit
Admin URL/wp/wp-admin/Note the /wp/ prefix

Adding New Filesโ€‹

WhatWhereHow
New pluginweb/app/plugins/new-plugin/Add to composer.json, run composer require
New themeweb/app/themes/new-theme/Add to composer.json
WordPress core updateweb/wp/ (auto)Update version in composer.json, run composer update
New patchpatches/new-patch.patchAdd entry in composer.json under extra.patches
New MU pluginweb/app/mu-plugins/Create PHP file directly (no Composer entry needed)
New Elementor widgetweb/app/themes/suma-elementor/inc/widgets/Create class file, register in class-elementor-widgets.php
New REST endpointweb/app/themes/suma-elementor/inc/endpoints/Create class extending base, register in class-theme.php