Skip to content

Getting Started Guide

Welcome to the AIOHM Platform! This guide will walk you through setting up your local development environment and introduce you to the core concepts of the platform.

🚀 Developer Quick Start

Follow these steps to get the project running on your local machine.

1. Prerequisites

Ensure you have the following installed on your system:

  • PHP 8.2+
  • Composer
  • Node.js & npm
  • MySQL (or another compatible database)

2. Installation

Clone the repository and install the dependencies.

bash
# Install PHP dependencies
composer install

# Install frontend dependencies
npm install

3. Environment Setup

Configure your local environment variables.

bash
# Copy the example environment file
cp .env.example .env

# Generate a new application key
php artisan key:generate

Next, open the .env file and configure your database connection details (DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD).

4. Database Migration

Run the migrations to set up the database schema for the central application.

bash
# Run central migrations
php artisan migrate

Note: Tenant-specific migrations are handled automatically by the platform.

5. Running the Development Server

The project includes a single command to start all necessary development services concurrently.

bash
# Start the dev server (web, queue, and vite)
composer dev

Your local development environment is now running! The application will be available at the URL provided by the php artisan serve command (usually http://127.0.0.1:8000).

Core Architectural Concepts

Understanding these concepts is key to working with the platform.

  • Multi-Tenancy: The platform is built on a multi-tenant architecture using the stancl/tenancy package. Each tenant (or "Brand") has its own isolated database and file storage.
  • Domain-Driven Design: The application's business logic is organized into modules within the app/Domains directory (AI, Commerce, Marketing, Social).
  • Filament Admin Panel: The entire administrative backend is built using Filament. UI components, pages, and resources are located in the app/Filament directory.
  • Dynamic Super Admin: The "super admin" tenant is not hardcoded. It is defined in config/tenants.php under the super_admin_tenant key, making the platform's top-level administration configurable per environment.

✅ Running Tests

The project uses PHPUnit for testing. You can run the full test suite with a single command:

bash
composer test

🛠️ Essential Artisan Commands

Here are some of the most useful Artisan commands for daily development:

CommandDescription
php artisan tinkerRun an interactive REPL to experiment with application code.
php artisan migrateRun database migrations.
php artisan make:filament-resource {name}Scaffold a new Filament resource for a model.
php artisan tenants:manageA tool for managing tenants (creating, deleting, etc.).
php artisan fetch:ai-modelsLists available models from your configured AI providers.

📚 Next Steps

Now that you're set up, here are some recommended next steps:

Released under the MIT License.