DEPLOY NOTES

1) Copy secure_home_files/app_config.php to:
   /home/kenmeyering/s3/app_config.php

2) Edit the real DB passwords and AWS credentials there.
   Then lock it down:
   chmod 600 /home/kenmeyering/s3/app_config.php

3) Upload all PHP files in this package into your web app folder.
   Keep your existing S3.php in place. This package does NOT include S3.php.

4) Run schema_updates.sql in phpMyAdmin.

5) Recommended cron setup:
   */5 * * * * /usr/local/bin/php /path/to/getS3Logs.php >/dev/null 2>&1
   */10 * * * * /usr/local/bin/php /path/to/getCloudFrontLogs.php >/dev/null 2>&1

WHY THIS VERSION USES LESS BANDWIDTH

- one S3 cron for all enabled sites
- one CloudFront cron for all enabled sites
- per-site scan watermarks:
  last_s3_scan_utc
  last_cloudfront_scan_utc
- overlap windows:
  S3: 90 minutes
  CloudFront: 12 hours
- no more one-cron-per-site model

SITE TABLE FLAGS

- is_active: master switch
- show_in_ui: controls dropdown visibility
- s3_logging_enabled: S3 ingester will process site if on
- cloudfront_logging_enabled: CloudFront ingester will process site if on

NOTES

- This version removes any dependency on S3Keys.php.
- Everything reads secrets from /home/kenmeyering/s3/app_config.php
- Keep your existing S3.php for now. Next modernization step is replacing it with the AWS SDK for PHP.
