Appearance
Directory Structure
A map of the core plugin (wp-social-reviews). Pro mirrors the relevant parts of this layout, and the TikTok plugin is intentionally much smaller.
wp-social-reviews/
├── wp-social-reviews.php # Main plugin file — defines constants, requires boot/app.php
├── boot/
│ ├── app.php # Creates Application, registers activation, fires bootstrap hooks
│ └── globals.php # Framework-independent global helpers (loaded first)
├── config/
│ ├── app.php # App config incl. rest_namespace / rest_version
│ └── database.php # Database config
├── app/
│ ├── Http/
│ │ ├── Controllers/ # REST controllers
│ │ ├── Routes/
│ │ │ ├── routes.php # Loader — requires api.php
│ │ │ └── api.php # All REST endpoints (policy-authorized)
│ │ └── Policies/ # Authorization policies (AdminPolicy, PlatformPolicy, …)
│ ├── Services/
│ │ ├── Platforms/
│ │ │ ├── Reviews/ # Review platform integrations (BaseReview + platforms)
│ │ │ ├── Feeds/ # Feed platform integrations (+ CacheHandler)
│ │ │ └── Chats/ # Chat widget integrations
│ │ └── Helper.php # Aliased as GlobalHelper / ServicesHelper
│ ├── Models/ # Eloquent-like models (Review, Cache, ReviewForm, …)
│ ├── Hooks/
│ │ └── Handlers/ # WordPress hook handlers (Activation, Deactivation, …)
│ └── Views/ # PHP template files
├── database/
│ └── Migrations/ # Schema migrations (classmap autoloaded)
├── resources/
│ ├── admin/ # Vue 3 + Vuex + Vue Router + Element Plus admin SPA
│ │ └── main.js # Registers global $get/$post/$put/$del/$patch REST helpers
│ ├── public/ # Public-facing vanilla JS
│ └── scss/ # SASS stylesheets
├── tests/ # PHPUnit tests (test-*.php)
├── vendor/wpfluent/ # The WPFluent framework
└── webpack.mix.js # Laravel Mix build configWhere to make common changes
| Task | Location |
|---|---|
| Add/modify a REST endpoint | app/Http/Routes/api.php + a controller in app/Http/Controllers/ |
| Add a platform | app/Services/Platforms/{Reviews,Feeds,Chats}/ (extend a base class) |
| Query or store data | app/Models/ (ORM) |
| React to a WordPress event | app/Hooks/Handlers/ |
| Change the schema | new migration in database/Migrations/ + bump WPSOCIALREVIEWS_DB_VERSION |
| Admin UI | resources/admin/ (Vue) |
| Front-end template/output | app/Views/ + resources/public/ |
| Global helper | boot/globals.php |

