# cPanel Setup Guide

## 1. Create Database

In cPanel, create a MySQL database and user, then add the user to the database with all privileges.

## 2. Import Schema

Use phpMyAdmin to import `sql/schema.sql`.

## 3. Configure App

Copy `config.example.php` to `config.php` and edit database credentials, SAM.gov API key, and client profile.

## 4. Upload Files

Upload the full folder to your hosting account, for example:

```text
/home/YOURACCOUNT/opportunityintel/
```

For quick testing, browse to:

```text
https://yourdomain.com/opportunityintel/public/index.php
```

## 5. Run Collector Manually

```bash
php /home/YOURACCOUNT/opportunityintel/cron/collect_sam.php
```

## 6. Add Cron

```bash
/usr/local/bin/php /home/YOURACCOUNT/opportunityintel/cron/collect_sam.php
```

Suggested daily schedule:

```text
15 6 * * *
```

## 7. Check Logs

```text
storage/logs/app.log
```

## First Goal

The first win is seeing SAM.gov records appear in source_records, opportunities, events, and event_scores.
