# Askeri Platform - Production Checklist

## ✅ Sistem Hazırlığı

### Gereksinimler
- [ ] PHP 8.2+
- [ ] MySQL 5.7+ / MariaDB 10.3+
- [ ] Composer
- [ ] Node.js & NPM
- [ ] mod_rewrite (Apache) veya Nginx konfigürasyonu

### Hosting Seçimi
- [ ] cPanel hosting seçildi
- [ ] Paket: Linux + PHP 8.2+ + MySQL
- [ ] Domain ve SSL sertifikası

---

## 🗂️ Dosya Yapısı

```
public_html/                    ← Apache root
├── index.php                   ← Laravel entry point
├── .htaccess                   ← URL rewrite
└── [Laravel public assets]

parent_dir/                     ← cPanel hesap kök dizini
├── .env                        ← Production config
├── artisan
├── app/
├── bootstrap/
├── config/
├── database/
├── resources/
├── routes/
├── storage/
├── vendor/
├── composer.json
└── composer.lock
```

---

## 📝 .env.production Template

```env
APP_NAME="Askeri Platform"
APP_ENV=production
APP_KEY=base64:NooSVFZ2PuuFdt2RW4TmXt3xpNwpjISSKCoPXfG4J4Y=
APP_DEBUG=false
APP_TIMEZONE=Europe/Istanbul
APP_URL=https://siteniz.com

APP_LOCALE=tr
APP_FALLBACK_LOCALE=tr

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=site_askeriplatform
DB_USERNAME=site_user
DB_PASSWORD=GUVENLI_SIFRE_BURAYA

CACHE_DRIVER=database
SESSION_DRIVER=database
QUEUE_CONNECTION=database
LOG_CHANNEL=stack
LOG_LEVEL=warning

FILESYSTEM_DISK=local
```

---

## 🔐 Güvenlik Ayarları

### 1. .env Dosyası Yetkisi
```bash
chmod 640 .env
```

### 2. Storage Dizini
```bash
chmod -R 775 storage bootstrap/cache
```

### 3. Public Dizini
```bash
chmod -R 755 public
```

---

## 📦 Deployment Komutları

```bash
# 1. Dependencies
composer install --optimize-autoloader --no-dev

# 2. Assets
npm run build

# 3. Database
php artisan migrate --force

# 4. Cache
php artisan config:cache
php artisan route:cache
php artisan view:cache

# 5. Storage Link
php artisan storage:link

# 6. Permissions
chmod -R 775 storage bootstrap/cache
chmod -R 755 public
chmod 640 .env
```

---

## 🧪 Test Kontrol Listesi

### Homepage
- [ ] Ana sayfa açılıyor
- [ ] Hero banner görünüyor
- [ ] Meta tags render ediliyor
- [ ] CSS/JS assets yükleniyor

### Admin Panel
- [ ] /admin erişilebilir
- [ ] Login çalışıyor
- [ ] Dashboard açılıyor
- [ ] Widget editor çalışıyor

### Modüller
- [ ] Forum aktif ve çalışıyor
- [ ] Blog aktif ve çalışıyor
- [ ] Chat aktif ve çalışıyor
- [ ] Library aktif ve çalışıyor
- [ ] Interview aktif ve çalışıyor

### Performans
- [ ] Site 3 saniyeden hızlı açılıyor
- [ ] Database sorguları optimize
- [ ] Cache aktif
- [ ] Assets minified

---

## 🚨 Yaygın Sorunlar & Çözümler

### "Application Error"
```bash
php artisan cache:clear
php artisan view:clear
php artisan config:clear
```

### Database Connection Error
- .env DB_HOST, DB_USERNAME, DB_PASSWORD kontrol et
- cPanel → MySQL Databases → kullanıcı yetkilerini kontrol et

### 404 Not Found
- .htaccess public/ dizininde var mı kontrol et
- mod_rewrite aktif mı kontrol et

### Permission Denied (Storage)
```bash
chmod -R 775 storage bootstrap/cache
chown -R nobody:nobody storage bootstrap/cache
```

### Assets Not Loading
```bash
npm run build
php artisan view:clear
```

---

## 📞 İletişim ve Destek

**Proje Dökümentasyonu:**
- DEPLOYMENT.md - Bu dosya
- PROJECT_AUDIT.md - Proje analizi
- IMPROVEMENT_RECOMMENDATIONS.md - İyileştirmeler

**Hosting Desteği:**
- Natro: 0850 200 00 50
- Turhost: 0850 200 00 50

**Laravel Dokümantasyon:**
- https://laravel.com/docs/deployment
- https://laravel.com/docs/configuration
