# Pure PHP Web Installer

This package does **not** require Laravel, Composer, Node.js, Docker, or command-line installation.

Requirements:
- PHP 8.2+
- MySQL/MariaDB
- PHP extensions: PDO MySQL, cURL, JSON, mbstring, fileinfo, ZipArchive recommended
- A web server such as Apache/LiteSpeed/Nginx

## cPanel installation

1. Create a MySQL database and database user in cPanel.
2. Upload this ZIP and extract it.
3. Best setup: set your domain document root to the `public` folder.
4. Ensure these directories are writable by PHP:
   - `config/`
   - `storage/`
   - `storage/workflows/`
5. Open:
   `https://YOUR-DOMAIN/install/`
6. Enter database, admin, and AI backend settings.
7. Click **Install ItnaAI**.
8. Login with the admin account you created.
9. Delete or leave locked the installer. It creates `storage/install.lock`.

## AI server

Shared hosting usually cannot run Ollama or ComfyUI. Run them on RunPod/VPS and enter
their secure/private URLs during installation.

Never expose raw Ollama or ComfyUI ports directly to customers.

## FLUX image workflow

Export your working ComfyUI workflow in API format. Replace the positive prompt text
with exactly:

`{{PROMPT}}`

Save the file as:

`storage/workflows/flux_api.json`

## Payments

Payment gateway code is included as scaffolding, but real production payments must
be validated with the official provider validation/search API before balances are credited.
