# 🚀 NRT SA - Deployment Checklist

## ✅ Pre-Deployment Checklist

### 📁 Files to Upload
- [ ] All Laravel files (excluding vendor/, node_modules/, .git/)
- [ ] `.env.production` (rename to `.env` after upload)
- [ ] `public/.htaccess` (for URL rewriting)
- [ ] `database/nrt_sa.sql` (for database import)

### 🗄️ Database Setup
- [ ] Create MySQL database in cPanel
- [ ] Import `database/nrt_sa.sql`
- [ ] Note database credentials:
  - Database name: `_____________`
  - Username: `_____________`
  - Password: `_____________`
  - Host: `localhost`

### ⚙️ Environment Configuration
- [ ] Rename `.env.production` to `.env`
- [ ] Update database credentials in `.env`:
  ```env
  DB_DATABASE=your_database_name
  DB_USERNAME=your_database_user
  DB_PASSWORD=your_database_password
  ```
- [ ] Update `APP_URL` to your subdomain URL
- [ ] Set `APP_ENV=production`
- [ ] Set `APP_DEBUG=false`

### 📂 File Permissions
- [ ] Set directory permissions to 755:
  ```bash
  chmod 755 storage/
  chmod 755 bootstrap/cache/
  chmod 755 public/
  ```
- [ ] Set file permissions to 644:
  ```bash
  chmod 644 storage/logs/laravel.log
  chmod 644 .env
  ```

### 🔧 Laravel Commands (via SSH/cPanel Terminal)
- [ ] Generate application key:
  ```bash
  php artisan key:generate
  ```
- [ ] Clear and cache configuration:
  ```bash
  php artisan config:clear
  php artisan config:cache
  ```
- [ ] Cache routes and views:
  ```bash
  php artisan route:cache
  php artisan view:cache
  ```
- [ ] Create storage link:
  ```bash
  php artisan storage:link
  ```

## 🧪 Testing Checklist

### 🌐 Public Website
- [ ] Home page loads correctly
- [ ] All navigation links work
- [ ] Vehicle images display properly
- [ ] Booking form functions correctly
- [ ] Contact form submits successfully
- [ ] Newsletter signup works
- [ ] Responsive design on mobile/tablet

### 🔧 Admin Panel
- [ ] Admin login works: `/admin/login`
- [ ] Dashboard displays statistics
- [ ] Fleet management functions
- [ ] Booking management works
- [ ] Message management functions
- [ ] Newsletter management works
- [ ] Image uploads work properly

### 📧 Email Configuration (Optional)
- [ ] Configure SMTP settings in `.env`
- [ ] Test contact form email delivery
- [ ] Test newsletter functionality

## 🔍 Troubleshooting

### Common Issues
- **500 Error**: Check file permissions and .env configuration
- **Database Connection**: Verify database credentials
- **Images Not Loading**: Check storage link and file permissions
- **Admin Login Issues**: Verify admin credentials and session configuration

### Log Files to Check
- [ ] cPanel error logs
- [ ] Laravel logs: `storage/logs/laravel.log`
- [ ] PHP error logs

## 📞 Support Information

### Admin Access
- **URL**: `https://your-subdomain.com/admin/login`
- **Email**: `admin@nrtsa.co.za`
- **Password**: `admin123`

### Important Files
- `.env` - Environment configuration
- `public/.htaccess` - URL rewriting
- `storage/app/public/` - File uploads
- `database/nrt_sa.sql` - Database structure

### Contact Information
- **Technical Support**: Check logs and documentation
- **Database Issues**: Verify credentials and connection
- **File Permissions**: Ensure proper 755/644 permissions

## 🎉 Deployment Complete!

Once all items are checked, your NRT SA website should be fully functional on cPanel hosting.

### Final Verification
- [ ] Website loads without errors
- [ ] Admin panel accessible
- [ ] All forms working
- [ ] Images displaying correctly
- [ ] Mobile responsive design
- [ ] Database operations working

---

**NRT SA** - Ready for production! 🚗✨ 
