# MetaApp Deployment Script for cPanel
# Upload this entire folder to your cPanel public_html or subdomain directory

## Steps to Deploy:

### 1. Upload Files
Upload all files from this folder to your cPanel public_html directory

### 2. Configure Database
- Create a MySQL database in cPanel
- Note the database name, username, and password
- Import the database.sql file using phpMyAdmin

### 3. Update .env for Production
Edit the `.env` file with your production settings:

```env
APP_NAME="Maven Group"
APP_ENV=production
APP_KEY=base64:YOUR_APP_KEY_HERE
APP_DEBUG=false
APP_URL=https://your-domain.com

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_database_user
DB_PASSWORD=your_database_password

MAIL_MAILER=smtp
MAIL_HOST=smtp.your-provider.com
MAIL_PORT=587
MAIL_USERNAME=your-email@domain.com
MAIL_PASSWORD=your-email-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@mavengroup.in
MAIL_FROM_NAME="Maven Group"

# Meta API Configuration
META_ACCESS_TOKEN=your_meta_access_token
META_AD_ACCOUNT_ID=your_ad_account_id
META_APP_ID=your_app_id
META_APP_SECRET=your_app_secret
META_DEMO_MODE=false

# Email notifications
NOTIFICATION_EMAILS="kavitha@mavengroup.in,koushik@mavengroup.in"
```

### 4. Generate New App Key
After uploading, run this command via SSH or Terminal:
```bash
php artisan key:generate
```

### 5. Set Permissions
```bash
chmod -R 755 storage
chmod -R 755 bootstrap/cache
chmod 644 .env
```

### 6. Configure Scheduler (For Auto Sync)
Add this cron job via cPanel:
```bash
* * * * * cd /path/to/your/domain && php artisan schedule:run >> /dev/null 2>&1
```

### 7. Database Conversion (SQLite to MySQL)
The included database.sql file is in MySQL-compatible format.
Import it using phpMyAdmin in your cPanel.

---

## cPanel Requirements:
- PHP 8.1 or higher
- MySQL 5.7+ or MariaDB 10.3+
- Composer (or install dependencies locally)

## Files Included:
- Full Laravel application code
- database.sql - Exported database with all data
- vendor/ - Dependencies (already installed)

## Support:
For issues, check Laravel logs in storage/logs/
