Skip to content

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 config

Where to make common changes ​

TaskLocation
Add/modify a REST endpointapp/Http/Routes/api.php + a controller in app/Http/Controllers/
Add a platformapp/Services/Platforms/{Reviews,Feeds,Chats}/ (extend a base class)
Query or store dataapp/Models/ (ORM)
React to a WordPress eventapp/Hooks/Handlers/
Change the schemanew migration in database/Migrations/ + bump WPSOCIALREVIEWS_DB_VERSION
Admin UIresources/admin/ (Vue)
Front-end template/outputapp/Views/ + resources/public/
Global helperboot/globals.php

WP Social Ninja Developer Documentation