Architecture
This section describes how the application is structured and how the main subsystems interact.
High-Level Diagram
graph TD
A[HTTP Request] --> B{Website Context}
B -->|mintocom| C[Mintocom Controllers]
B -->|mintoapartments| D[Mintoapartments Controllers]
B -->|mintoapartmentreit| E[Mintoapartmentreit Controllers]
B -->|backend| F[Admin Controllers]
F --> G[CMS UI + Builder]
F --> H[Assets + Forms + Reports]
C --> I[Dictionary Content]
D --> I
E --> I
I --> J[Blade Views]
G --> K[builder_sections / content_blocks]
H --> L[Files / Slideshows / Forms]
J --> M[Media URLs via S3MediaManager]
Routing and Site Context
- The front controller chooses which site routes to load based on environment and host names in routes/web.php.
- App\Services\Website::getWebsiteCode() maps hosts to site codes (mintocom, mintoapartments, mintoapartmentreit).
CMS Admin
- Admin routes are grouped in routes/web/backend.php and split by module under routes/web/backend/.
- Admin UI is Metronic-based; theme helpers live in app/Core/Adapters/Theme.php.
Content Storage
- Most CMS content lives in Dictionary and is accessed through per-model Dictionary_* relations.
- HTML content is versioned in content_version (app/Models/ContentVersions.php).
Page Builder
- The builder is powered by VvvebJS assets (resources/assets/pagebuilder/, resources/assets/vendor/vvvebjs/).
- Builder sections are stored in builder_sections and managed via /assets/builder/sections routes.
- Reusable blocks map to content_blocks (save path implemented, retrieval partially implemented).
Media and Assets
- Files are stored in Files and rendered via helper URLs; uploads use App\Models\Legacy\S3MediaManager.
- Slideshows are stored in Slideshows and SlideshowsItems and rendered by the model (app/Models/Slideshows.php).
Security and Permissions
- Authentication uses standard Laravel mechanisms.
- Roles and permissions use Spatie (app/Models/Roles.php, app/Models/Permissions.php).
- Only UserPolicy is defined in app/Policies/UserPolicy.php.