System Health Diagnostics (doctor)
- Introduction
- Running Diagnostics
- Diagnostic Checklist
- Automated Remediation Guidance
- CI/CD Automated Verification
Introduction
Deploying e-commerce applications without verifying underlying system dependencies, native PHP extensions, and database permissions can lead to unexpected runtime outages.
The Reyhan Doctor command is an enterprise diagnostic tool that evaluates every infrastructure component before you launch or deploy your store.
Running Diagnostics
You can invoke the doctor command via the root orchestrator binary or Artisan:
./reyhan doctor
# or
php artisan reyhan:doctorDiagnostic Checklist
Reyhan Doctor executes deep checks across all critical operational vectors:
✔ PHP Runtime: PHP 8.4.2 detected
✔ Required Extensions: pdo_pgsql, redis, intl, gd, bcmath, curl, pcntl verified
✔ Relational Database: PostgreSQL 17 connected (pg_trgm & GIN available)
✔ In-Memory & Queues: Redis 7 ping responsive (0.3ms latency)
✔ Storage Permissions: storage/app and storage/framework writable
✔ Filesystem Symlink: public/storage symlink valid
✔ Encryption Cipher: APP_KEY configured properlyAutomated Remediation Guidance
If a failure is detected, Reyhan Doctor outputs actionable instructions to resolve the issue immediately:
✖ Redis Connectivity: Connection refused at 127.0.0.1:6379
-> Remediation: Start the Redis server service:
sudo systemctl start redis-server
-> Verify credentials in .env (REDIS_HOST, REDIS_PORT)CI/CD Automated Verification
You can include ./reyhan doctor in your CI/CD test pipelines. The command returns an exit code of 0 on success and 1 on failure, allowing automated deployment gates to halt if requirements are unmet.