# HEALTHCARE MANAGEMENT SYSTEM ## cPanel Installation Guide --- ### ✅ REQUIREMENTS - cPanel hosting with PHP 8.2+ - MySQL database - ~100MB disk space --- ## 🚀 INSTALLATION (3 STEPS) ### STEP 1: Upload Files 1. Log in to **cPanel** 2. Open **File Manager** 3. Go to `public_html/` (or your subdomain folder) 4. Upload **ALL files** from the `upload_to_public_html/` folder 5. Make sure these files are in your root: - `setup.php` - `composer.json` - `healthcare_database.sql` - All folders: `app/`, `config/`, `database/`, `routes/`, `public/`, etc. --- ### STEP 2: Run Installer 1. Open your browser 2. Visit: `https://yourdomain.com/setup.php` 3. Fill in: - **Database Name** (from cPanel MySQL) - **Database Username** (from cPanel MySQL) - **Database Password** (from cPanel MySQL) - **Database Host** (usually `localhost`) - **Your Website URL** (e.g., `https://yourdomain.com`) - **Admin Email** 4. Click **"Start Installation"** 5. Wait **3-5 minutes** — it will: - Download Composer - Install all Laravel dependencies (vendor/) - Generate security keys - Create your .env file - Set permissions --- ### STEP 3: Import Database 1. Go to **cPanel → phpMyAdmin** 2. Select your database 3. Click **Import** 4. Choose `healthcare_database.sql` 5. Click **Go** ✅ Done! Your system is ready. --- ## 🔑 DEFAULT LOGINS | Role | Email | Password | |------|-------|----------| | Super Admin | admin@hospital.com | Admin@123! | | HR Admin | hr@hospital.com | Hr@123! | | Medical Director | director@hospital.com | Director@123! | | Doctor | dr.williams@hospital.com | Doctor@123! | | Nurse | nurse.martinez@hospital.com | Nurse@123! | | Receptionist | reception@hospital.com | Reception@123! | | Accountant | accounting@hospital.com | Account@123! | | Patient | john.smith@email.com | Patient@123! | **⚠️ CHANGE ALL PASSWORDS AFTER FIRST LOGIN** --- ## 🌐 ACCESS URLs | URL | What It Is | |-----|-----------| | `https://yourdomain.com/api/health` | API Health Check | | `https://yourdomain.com/api` | API Info | | `https://yourdomain.com/api/doctors` | List Doctors (Public) | --- ## 🔒 SECURITY CLEANUP (DO THIS!) After installation, delete these files: - `setup.php` - `composer.phar` (if created) - `healthcare_database.sql` (after importing) --- ## ❓ TROUBLESHOOTING **"Database connection failed"** → Check credentials in cPanel → MySQL. Try `127.0.0.1` instead of `localhost`. **"500 Error"** → Check `storage/logs/laravel.log`. Usually missing vendor/ or wrong permissions. **"404 Not Found"** → Make sure `.htaccess` exists in `public/` folder. Enable mod_rewrite. **"vendor/autoload.php missing"** → Re-run `setup.php` or install Composer locally and upload vendor/ folder. --- ## 📦 WHAT'S INCLUDED - ✅ Complete Laravel backend (all controllers, models, middleware) - ✅ 17 database tables with demo data - ✅ 50+ API endpoints - ✅ JWT Authentication + 2FA ready - ✅ 9 user roles - ✅ Public website (doctors, appointments, verification) - ✅ Admin dashboard with analytics - ✅ Staff & doctor portals - ✅ One-click installer (setup.php) --- **Built for cPanel. No Docker. No command line required.**