Skip to content

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/tenancy handles 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.

  • AI handles Muse, agents, prompt orchestration, and tooling
  • Social manages social and Postiz integrations
  • Marketing covers campaign and automation behavior
  • Commerce handles 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.

PathPurpose in devPurpose in production
changeslog/VitePress sourceExcluded from main and release ZIPs
public/docs/Built documentation outputServed live at /docs
storage/Runtime logs, uploads, cachesCreated and preserved on the server
install/First-install assets and scriptsPresent only until first setup completes
database/Migrations and seedersRequired 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.

  1. Work happens on local-dev-* branches.
  2. GitHub creates a filtered production PR into main.
  3. main produces a clean release ZIP with built frontend assets and built docs.
  4. 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];