Stack overview
AnswerixAI is a single Laravel 12 application (Inertia 2 + React 19 frontend). A production deployment runs four processes from one codebase:
| Process | Command | Purpose |
|---|---|---|
| HTTP | PHP-FPM behind Nginx (or php artisan serve for dev) |
Dashboard, API, marketing site |
| Queue worker | php artisan queue:work |
Tracking runs, content briefs, site audits, readability generations |
| Scheduler | php artisan schedule:work (or a cron entry) |
Daily tracking, housekeeping sweeps |
| Reverb (optional) | php artisan reverb:start |
Realtime dashboard updates (falls back to polling when absent) |
Plus one external dependency:
- PostgreSQL 16 — the only supported database.
Prerequisites
- Linux host (or macOS for development)
- PHP 8.3+ with the usual Laravel extensions (
pdo_pgsql,mbstring,intl, …) - Composer 2, Node.js 20+ and npm
- PostgreSQL 16
- API keys for at least one AI provider (OpenAI, Anthropic, Google Gemini)
- A Cloro API key for web-engine scraping (ChatGPT web, Google AI Overview/Mode, Copilot, …)
Steps
-
Clone the repo and install dependencies
bashgit clone <your-repo-url> answerix cd answerix/laravel composer install --no-dev npm ci && npm run build -
Configure the environment
bashcp .env.example .env php artisan key:generateSet your PostgreSQL connection (
DB_*),APP_URL, at least one AI provider key, and Cloro credentials. See Env variables for the full reference. -
Run database migrations
bashphp artisan migrate --forceMigrations create every table, index, and the SQL aggregate functions the analytics pages rely on — no manual SQL required.
-
Start the processes
Use supervisor (or systemd) to keep the queue worker, scheduler, and Reverb running:
ini[program:answerix-queue] command=php /var/www/answerix/laravel/artisan queue:work --tries=3 autorestart=true [program:answerix-schedule] command=php /var/www/answerix/laravel/artisan schedule:work autorestart=true [program:answerix-reverb] command=php /var/www/answerix/laravel/artisan reverb:start autorestart=truePoint Nginx + PHP-FPM at
public/for HTTP. -
Create your first user — open
https://your-host/sign-upand register. Complete onboarding to create your organization and first brand.
Site Audit dependency: the audit engine falls back to headless Chrome (Browsershot/Puppeteer) when a page can't be fetched directly. Run npm install on the server (Chromium is ~170 MB) and set BROWSERSHOT_NODE_BINARY if the queue worker's PATH doesn't include Node.
Production hardening
For a real deployment behind a domain:
- Front the app with Cloudflare (proxied) or Caddy/Nginx for HTTPS
- Restrict origin ports with firewall rules to known IPs
- Set
APP_ENV=production,APP_DEBUG=false, and runphp artisan config:cache && php artisan route:cache - Ship
storage/logs/to a logging service or rotate with logrotate - Take regular PostgreSQL backups (
pg_dumpon a cron, or your provider's managed backups)
Local development
composer run dev # serves HTTP + queue + Vite together
Seed a populated demo dashboard with php artisan db:seed --class=DemoSeeder, then sign in with [email protected] / demo123.
Continue: Env variables →