Platform Architecture
This document is the production-facing architecture overview for the AIOHM Platform.
Core Stack
- Laravel 12 provides routing, jobs, configuration, and application structure
- Filament 3 powers the admin interface
stancl/tenancyhandles tenant isolation- Vite and VitePress build the frontend and public documentation surfaces
Tenant Model
The platform is built around tenant isolation.
- Central application concerns such as authentication and global coordination live in the central app
- Tenant data stays separated at the database and storage level
- Tenant-specific files are stored under
storage/tenants/{tenant_id}at runtime
Domain-Driven Layout
Business logic is grouped under app/Domains.
AIhandles Muse, agents, prompt orchestration, and toolingSocialmanages social and Postiz integrationsMarketingcovers campaign and automation behaviorCommercehandles billing and commerce-related flows
This keeps the codebase easier to grow without collapsing into one giant services layer.
Service Layer
Complex integrations and coordination logic live in dedicated services.
- Controllers stay thin
- Reusable workflows stay testable
- External APIs are wrapped behind internal platform services
Production File Model
The production release is intentionally smaller than a dev checkout.
| Path | Purpose in dev | Purpose in production |
|---|---|---|
changeslog/ | VitePress source | Excluded from main and release ZIPs |
public/docs/ | Built documentation output | Served live at /docs |
storage/ | Runtime logs, uploads, caches | Created and preserved on the server |
install/ | First-install assets and scripts | Present only until first setup completes |
database/ | Migrations and seeders | Required for install and future upgrades |
Documentation Contract
The public site always serves documentation from public/docs/.
- Dev branches keep the raw VitePress source in
changeslog/ - GitHub builds
public/docs/from that source - Production never depends on the raw VitePress workspace being present
Release Flow
The release flow is designed to keep main production-safe.
- Work happens on
local-dev-*branches. - GitHub creates a filtered production PR into
main. mainproduces a clean release ZIP with built frontend assets and built docs.- VPS deployment pulls the latest release package instead of a dev checkout.
High-Level Diagram
mermaid
graph TD;
A[local-dev-* branch] --> B[GitHub filtered production PR];
B --> C[main];
C --> D[GitHub release ZIP];
D --> E[VPS deployment script];
E --> F[Live platform];