# Installation (production)

## Server requirements
- PHP 8.3+
- MySQL / MariaDB
- Composer 2
- Required Laravel PHP extensions
- Domain/subdomain pointed to the server
- HTTPS certificate

## Install
1. Upload and extract this project outside the public web root when possible.
2. Run `composer install --no-dev --optimize-autoloader`.
3. Copy `.env.example` to `.env`.
4. Create a MySQL database and user in your hosting panel.
5. Put DB name/user/password and final APP_URL in `.env`.
6. Run `php artisan key:generate`.
7. Run `php artisan migrate --seed --force`.
8. Run `php artisan optimize`.
9. Point the domain/subdomain document root to this project's `/public` folder.
10. Make `storage` and `bootstrap/cache` writable by the web server.
11. Start a queue worker for background uploads/webhooks when live APIs are enabled.
12. Log in with `admin@example.com` / `ChangeMe123!` and IMMEDIATELY change this seeded password before production use.

## Domain example
If the app is `app.example.com`, the web server document root must be `/path/to/ashik-social-hub/public`, not the project root.

## API integration
Fill only server-side `.env` values. Never put app secrets in JavaScript or Blade templates. Implement current approved API calls inside `app/Services/*ApiService.php`.

## Before going live
- Change seeded admin credentials.
- APP_DEBUG=false.
- HTTPS only.
- Back up database.
- Configure cron/queue worker.
- Confirm Meta/Google webhook verification and permissions.
