Impact Life Executive Dashboard - Deployment Check
==================================================

[ ] 1. Create/configure the MySQL database in database.php.
[ ] 2. Import install.sql.
[ ] 3. Confirm PHP cURL is enabled.
[ ] 4. Open sync_settings.php.
[ ] 5. Enter/confirm the API base URL and endpoint paths.
[ ] 6. Enter the generated Bearer token (or use UPSTREAM_BEARER_TOKEN).
[ ] 7. Set Payments and Claims date ranges.
[ ] 8. Keep the sync interval at 10 minutes unless another interval is required.
[ ] 9. Test Payments endpoint.
[ ] 10. Test Claims endpoint.
[ ] 11. Click Sync Now and confirm records are inserted.
[ ] 12. Open target_settings.php and enter the management-approved monthly targets.
[ ] 13. Open dashboard.php and confirm Payments and Claims are displayed.
[ ] 14. Confirm the sync-health status reflects api_sync_settings and the latest successful sync.
[ ] 15. Confirm CEO alerts appear only after payment analytics reaches 100% and the Claims summary check completes.
[ ] 16. Confirm a Branch filter shows Claims Ratio as N/A because Claims has no branch field.
[ ] 17. Test full filtered Payments and Claims CSV exports.
[ ] 18. Install the cron command from CRON_SETUP.txt.
[ ] 19. Confirm api_sync_logs shows successful scheduled runs.
[ ] 20. Only after validation, optionally run remove_legacy_tables.sql to remove old tables.

Important:
- The upstream APIs are documented as GET requests with JSON request bodies.
- An HTML "Not Found" response means the upstream route/base URL is not resolving; the Sync Settings test buttons will display this clearly.


v16 note:
- Runtime cache JSON and populated HTTP debug logs are intentionally excluded from the deployment package.
- See V16_DEPLOYMENT_NOTES.txt for the purpose-fit changes.


v17 timeout-protection checks:
- Run upgrade_sync_v17.sql on an existing v16 database (optional if sync_settings.php can ALTER the settings table).
- Recommended defaults: initial batch 60 min, minimum batch 5 min, timeout 90 sec, max response 12 MB, retries 2.
- Keep cron_sync.php running from CLI. Manual historical imports may take many small requests but are resumable/deduplicated through UPSERT.
- A failed large slice should be followed by smaller SUCCESS slices in Sync Logs; this is expected adaptive recovery.
