v1.0 Dashboard Public Profile GitHub
Local + Staging + Production GitHub Actions

Deployment Guide

KaiVox runs on three environments: local development (Laragon on Windows), staging (kaivox-test.omajestic.com), and production (kaivoxai.com). GitHub Actions automates staging and production deploys.

Local Development Setup

Requirements

RequirementVersionNotes
PHP8.2Use D:\xampp\php82\php.exe — NOT the system PHP (which may be 7.4)
MySQL8.xDatabase: kaivox_ai, user: root, pass: root
Composer2.xFor PHP dependencies
Node.js18+For Vite asset compilation
LaragonAnyProvides local domain http://kaivox-ai.test/
Always use D:\xampp\php82\php.exe artisan for artisan commands. If your system PATH has an older PHP, plain php artisan will fail with PHP version errors.

First-Time Local Setup

  1. Clone the repo and install dependencies
    composer install
    npm install
  2. Copy and configure .env
    copy .env.example .env
    # Then edit .env — set DB credentials, OPENAI_API_KEY, etc.
  3. Generate app key
    D:\xampp\php82\php.exe artisan key:generate
  4. Run migrations and seeders
    D:\xampp\php82\php.exe artisan migrate
    D:\xampp\php82\php.exe artisan db:seed
  5. Link storage and build assets
    D:\xampp\php82\php.exe artisan storage:link
    npm run build
  6. Run the queue worker (for emails/jobs)
    D:\xampp\php82\php.exe artisan queue:work

Staging Deploy (kaivox-test.omajestic.com)

Pushing to the test branch triggers GitHub Actions which deploys to the Hostinger staging server.

GitHub Actions workflow files are already built at .github/workflows/deploy-staging.yml and deploy-production.yml. Only the Hostinger SSH configuration and GitHub Secrets need to be added once.

One-Time Staging Setup

  1. Create GitHub repository Create a private repo at GitHub. Push local code:
    git remote add origin https://github.com/your-user/kaivox-ai.git
    git push -u origin main
    git checkout -b test
    git push origin test
  2. Add GitHub Secrets In GitHub repo → Settings → Secrets → Actions, add:
    Secret NameValue
    STAGING_SSH_KEYPrivate SSH key for Hostinger
    STAGING_HOSTkaivox-test.omajestic.com or server IP
    STAGING_USERHostinger SSH username
    STAGING_PATH/home/u123456789/public_html
  3. Set up staging server (SSH in once)
    ssh user@kaivox-test.omajestic.com
    
    # Verify PHP 8.2 is set in Hostinger control panel
    php -v
    
    # Create MySQL database in Hostinger control panel
    # Note the DB name, user, password
    
    # Upload .env with staging values (real DB creds, test payment keys, etc.)
    # Then run first deploy manually:
    composer install --no-dev --optimize-autoloader
    php artisan key:generate
    php artisan migrate --force
    php artisan config:cache
    php artisan storage:link
  4. Set up Laravel scheduler on Hostinger In Hostinger cron jobs, add:
    * * * * * php /path/to/public_html/artisan schedule:run >> /dev/null 2>&1

CI/CD Flow

You push to 'test' branch
        ↓
GitHub Actions: deploy-staging.yml runs
        ↓
SSH into Hostinger → git pull → composer install → php artisan migrate --force
        ↓
App live at kaivox-test.omajestic.com

You push to 'main' branch
        ↓
GitHub Actions: deploy-production.yml runs
        ↓
SSH into production server → git pull → composer install → php artisan migrate --force
        ↓
App live at kaivoxai.com

Production Deploy (kaivoxai.com)

Same pattern as staging. Add production secrets (PROD_SSH_KEY, PROD_HOST, PROD_USER, PROD_PATH) to GitHub Secrets. Pushing to main triggers the production workflow.

Never push directly to main in a hurry. Test on staging first. The staging and production databases are separate — a migration error on production could be hard to reverse.

Artisan Commands to Run on Every Deploy

# Required after every code deploy:
composer install --no-dev --optimize-autoloader
php artisan migrate --force
php artisan config:cache
php artisan route:cache
php artisan view:cache

# Required only when new storage files are expected:
php artisan storage:link

# Required only when seeding fresh data:
php artisan db:seed --class=SuperAdminSeeder

# Phone number billing (runs daily via scheduler — no manual trigger needed):
php artisan phone-numbers:bill

Environment-Specific .env Values

KeyLocalStagingProduction
APP_ENVlocalstagingproduction
APP_DEBUGtruefalsefalse
APP_URLhttp://kaivox-ai.testhttps://kaivox-test.omajestic.comhttps://kaivoxai.com
STRIPE_KEYpk_test_...pk_test_...pk_live_...
MAIL_MAILERlogsmtpsmtp
QUEUE_CONNECTIONdatabasedatabasedatabase

Post-Deploy Verification Checklist

  • Visit the app URL — homepage loads
  • Log in as Super Admin at /super-admin/login
  • Register a test tenant and complete onboarding
  • Make a test voice call (Vobiz webhook pointing to deployed URL)
  • Book a test appointment — verify it appears in the calendar
  • Send a test SMS (check Twilio delivery)
  • Top up wallet with a Stripe test card (4242 4242 4242 4242)
  • Verify emails send (check Hostinger SMTP — no port blocking on server)
  • Check /p/{slug} public profile loads correctly