# Installation

The application is designed for shared hosting (cPanel) and local servers. Composer is required only when building from source. A packaged release already includes the `vendor` directory.

## Requirements

- PHP 8.2.x (do not use PHP 8.3+ as the declared platform)
- Extensions: bcmath, ctype, curl, dom, fileinfo, json, mbstring, openssl, pdo, pdo_mysql, tokenizer, xml, zip
- MySQL 8.x
- Writable: `storage/`, `bootstrap/cache/`

## Web installer

1. Upload the project files to the web root (or point the document root to `public/`).
2. Open `https://your-domain/install`.
3. Complete the steps:
   - Welcome
   - System requirements and PHP extensions
   - Folder permissions
   - Database configuration and connection test
   - Application configuration
   - Administrator account
   - Migrations and seed (roles, permissions, settings, version)
4. After success, `storage/installed` is created and `APP_INSTALLED=true` is written to `.env`.
5. The installer cannot run again.

## Safety

- Installation runs `php artisan migrate --force`, **never** `migrate:fresh`.
- If the database already contains application tables, you must confirm before continuing.
- Existing business data is not deleted.

## First login

Use the administrator account created in the installer. Default UI language is Arabic. Switch language from the top bar.
