# File Structure

> Directory layout of the Aegis companion plugin repository.

## Top-Level Structure

```
aegis/├── assets/                  # Admin CSS/JS sources + build/, video editor, WooCommerce multi-step├── config/                  # Bootstrap PHP configs (updater, license, blocks, patterns, integrations, …)├── docs/                    # Plugin documentation (excluded from release zip)├── languages/               # aegis.pot (plugin text domain; not the theme catalog)├── patterns/                # Block patterns (gated and always-on)├── public/                  # Shipped front-end CSS (css/co-authors-plus.css)├── scripts/                 # Dev verification scripts for `wp eval-file` (excluded from release zip)├── src/                     # PSR-4 PHP (namespace Aegis\Plugin\) + custom autoload├── templates/               # Admin page templates├── tools/                   # Developer tooling (excluded from release zip)├── aegis.php                # Plugin bootstrap: updater, theme gate, textdomain, feature configs├── uninstall.php            # Removes data only when "Delete data on uninstall" is enabled├── composer.json            # Dev: PHPCS / WPCS (not shipped)├── phpcs.xml├── package.json├── .distignore              # Release zip excludes (paired with .gitattributes export-ignore)├── BUILD.md                 # Build commands for theme, plugin, and Pro (not shipped)├── CHANGELOG.md             # Release history (not shipped)├── CONTRIBUTING.md├── DESIGN.md                # Admin design system: tokens and components (not shipped)├── README.md                # Repository overview (not shipped)└── readme.txt
```

Runtime PHP uses `src/autoload.php` — there is no production Composer `vendor/` in free-plugin release zips. See [Building Assets](https://www.atmostfear-entertainment.com/docs/aegis/plugins/dash/building-assets/).

## patterns/

| Directory | When registered |
| --- | --- |
| `patterns/slider/` | Slider block implied on |
| `patterns/modal/` | Modal block enabled |
| `patterns/contact/` | Plugin + theme active |
| `patterns/author/` | Co-Authors Plus active **and** the integration on |
| `patterns/woocommerce/` | **WooCommerce active** |
| `patterns/wishlist/` | **WooCommerce + TI Wishlist active** |

There is no `patterns/blog/`. Related Posts layouts (`blog-related-posts-*`) live in the theme and unregister when **Aegis → Blocks → Related Posts** is implied off. Do not duplicate them here.

Commerce patterns use theme slug convention (`template-page-cart`, etc.) via `\Aegis\Utilities\Pattern::register_from_file()`.

## src/ Modules

| Module | Role |
| --- | --- |
| `Admin/` | Menu, tabs, renderer, AJAX page loader, updater (plugin updates) |
| `Analytics/` | Tracker, Connectors panel |
| `Blocks/` | Map and Modal registration, `aegis_blocks` settings (all block toggles + Performance keys), `VideoSchema` |
| `Connectors/` | Connectors admin page (BunnyCDN section; enqueues `assets/js/bunnycdn-settings.js`) |
| `Conditionals/` | Evaluator, post-content renderer, Smart Logic, Conditionals admin, IntegrationsPanel (plugin extras on Integrations) |
| `Hooks/` | Hook patterns admin |
| `Injection/` | Hook injection, preview (including Co-Authors Plus wrap of `core/post-author` and `co-authors/block`) |
| `CoAuthors/` | Multi-author `core/post-author*` replace, optional Author Schema extra |
| `Integrations/` | Third-party toggles, `WPFusion.php`, `ACF.php`, `MetaBox.php`, `CodeBlockPro.php`, `SyntaxHighlighting.php`, `AffiliateWP.php`, `EasyDigitalDownloads.php`, `FluentBooking.php`, `FluentForms.php`, `GravityForms.php`, `NinjaForms.php`, `LearnDash.php`, `LifterLMS.php`, `SenseiLMS.php`, `AllInOneSEO.php`, `RankMath.php`, `SEOPress.php`, `Yoast.php`, `BunnyCDN.php` (Connectors SaaS helper), `WooCommerce.php` (`is_plugin_active()` / `is_enabled()`), and `WooCommerce/MultiStepCheckout.php` |
| `Map/` / `Modal/` | Map/Modal blocks; Static Maps style encoding (`Map/Styles.php`); Modals instance dashboard; `` shortcode (`Modal/Shortcode.php`) |
| `License/` | Free Get Pro / License upsell page (`aegis-license`) when Pro is inactive |
| `Patterns/` | `CommercePatternRegistrar` |
| `Performance/` | Frontend optimizations, Performance admin page |
| `Seo/` | Schema delegation manager and `Adapters/` (`AioseoAdapter`, `RankMathAdapter`, `YoastAdapter`, `SeopressAdapter`, `TsfAdapter`) |
| `Settings/` | Repository, export/import |
| `Snippets/` | Code snippets loader |
| `Utilities/` | `UserAgent` device/browser matching for conditional logic |
| `VisibilityPresets/` | Presets admin page |

## Config bootstrap order

`config/updater.php` loads **before** the theme gate, so updates work without the Aegis theme. The rest load from `aegis.php` after the theme gate passes — see [Architecture](https://www.atmostfear-entertainment.com/docs/aegis/plugins/dash/architecture/) for the full list. Notable:

- `config/license.php` — free License / Get Pro page (skipped when Aegis Pro is installed)
- `config/patterns.php` — always-on demo patterns
- `config/woocommerce.php` — `MultiStepCheckout` when `WooCommerce::is_enabled()`
- `config/woocommerce-patterns.php` — `CommercePatternRegistrar::init()`

## Next Steps

- [Architecture](https://www.atmostfear-entertainment.com/docs/aegis/plugins/dash/architecture/) — Technical architecture
- [Building Assets](https://www.atmostfear-entertainment.com/docs/aegis/plugins/dash/building-assets/) — Build commands
- [Theme File Structure](https://www.atmostfear-entertainment.com/docs/aegis/themes/theme/file-structure/)

---

Source: https://www.atmostfear-entertainment.com/docs/aegis/plugins/dash/file-structure/ · Updated 2026-11-25
