Codebase Reference
This document provides a high-level reference map of the key directories, models, services, commands, and pages within the AIOHM platform codebase.
Directory Structure
| Directory | Description |
|---|---|
app/ | Core application code. |
app/Console/Commands | Custom Artisan commands. |
app/Domains | Business logic modules (AI, Commerce, etc.). |
app/Filament | All code related to the Filament admin panel. |
app/Http | Controllers, Middleware, and Requests. |
app/Jobs | Queued jobs for background processing. |
app/Livewire | Interactive, dynamic frontend components. |
app/Models | Eloquent models representing database tables. |
app/Services | Business logic service classes. |
config/ | Application configuration files. |
database/ | Migrations, seeders, and factories. |
docs/ | All documentation for the VitePress site. |
routes/ | All web and API route definitions. |
Key Components
Below is a list of key classes and components discovered during the system scan.
Core Models (app/Models/)
User.php: The central user model.Brand.php: Represents a tenant.Lead.php: For capturing potential customers.WorkflowTemplate.php: Stores reusable workflow structures.WorkflowCampaign.php: An instantiated, running workflow.ExecutionLog.php: Logs the results of workflow executions.ContentTemplate.php: For creating reusable content snippets.MCPServer.php: Defines a Model Context Protocol server.
Core Services (app/Services/)
TenantAiConfigManager.php: Manages AI configurations on a per-tenant basis.WordPressApiService.php: Handles all interactions with the WordPress API.PostizIntegrationService.php: The bridge to the Postiz API for social media scheduling.LeadDiscoveryService.php: Services related to finding and capturing new leads.DemoTenantProvisioner.php: Handles the automatic creation of new demo tenants.RagEngine.php: The core of the Retrieval-Augmented Generation AI system.
Filament Pages (app/Filament/Pages/)
Muse.php: The main M.U.S.E. AI interaction page.LeadsHome.php: The dashboard for viewing captured leads.WorkflowBuilder.php: The visual editor for creating and managing workflows.PostScheduler.php: UI for scheduling social media posts.ImageGallery.php: Manages generated and uploaded images.WordPressContent.php: Interface for managing WordPress content.Connections.php: Page for managing third-party integrations.
Artisan Commands (app/Console/Commands/)
tenants:manage: A tool for creating, deleting, and managing tenants.make:admin: Creates a new admin user for a specified tenant.workflow:run {id}: Manually triggers a specific workflow.docs:scan: A utility to scan the codebase for documentation.db:seed: Seeds the database with initial data, including workflow templates.schedule:run: Executes all scheduled tasks, including workflows.postiz:fetch-integrations: Fetches social media integrations from Postiz.
