Neden: Fiyatlar değişkendir, yasal sorumluluk doğurur.
Neden: Yanlış teknik bilgi yasal sorumluluk, müşteri memnuniyetsizliği doğurur.
İki senaryo:
Shop modülündeki ürünler için AI ile güvenli ve otomatik bilingual (TR + EN) içerik üretimi:
Akson Mili Kapağı - 414 ürünü için üretilen içerik:
User Input (Product ID)
↓
Mevcut İçerik Kontrolü (ShopProduct->body)
↓ VARSA ↓ YOKSA
Mevcut İçeriği Al Sadece Title+Category Al
Teknik Detayları Çıkar Genel Tanıtım Yap
↓ ↓
OpenAI GPT-4 (Content Generation)
- Fiyat VERİLMEZ
- Teknik detay sadece mevcut varsa
- Google SEO keywords ekle
↓
Content Parsing (Title, Specs, Body, FAQ, Tags)
↓
Leonardo AI (2 Context Görsel - Async)
- Görsel 1: Kullanım ortamı
- Görsel 2: Teknik çizim (sallantılı)
↓
Image Embedding (Body içine otomatik)
↓
SEO Tag Injection (alt, title, loading)
↓
Database Save (ShopProduct model)
↓
Cache Clear + OPcache Reset
| Bileşen | Teknoloji | Açıklama |
|---|---|---|
| AI Content Generation | OpenAI GPT-4 | Bilingual content (TR + EN), fiyat/teknik detay kuralları |
| AI Image Generation | Leonardo AI (Lucid Origin) | 2 context görsel (ortam + çizim) |
| API Prompt Enhancement | AIPromptEnhancer Service | Görsel promptları optimize eder |
| DB Storage | ShopProduct Model | Tenant-aware database |
| DB Media Storage | MediaLibraryItem Model | AI görselleri metadata ile saklar |
| UI Admin Interface | Livewire Component | Tek buton: "Generate AI Content" |
Dosya: Modules/Shop/app/Services/ShopProductAIContentService.php
Sorumluluk: Ürün bilgilerinden GPT-4 ile GÜVENLİ bilingual content üretimi
generateFullContent($productId, $options) - Ana metodextractExistingContent($product) - Mevcut içerikten teknik detay çıkarbuildSafePrompt($data, $hasExistingContent) - Fiyat/teknik detay kurallarıvalidateContent($content) - Fiyat/teknik detay kontrolü
// EĞER MEVCUT İÇERİK VARSA:
"Improve and expand this existing content:
{$existingBody}
RULES:
- KEEP all technical specifications (dimensions, weight, voltage, etc.)
- EXPAND general description
- ADD SEO keywords: {$seoKeywords}
- Pattern: v4 HTML structure
- DO NOT mention price
- Bilingual: TR + EN"
// EĞER MEVCUT İÇERİK YOKSA:
"Generate product content from title and category:
Title: {$title}
Category: {$category}
RULES:
- General description only (what it is, where it's used)
- NO specific technical details (no dimensions, weight, voltage)
- NO price information
- Use phrases: 'contact us for details', 'call for specifications'
- SEO keywords: {$seoKeywords}
- Pattern: v4 HTML structure
- Bilingual: TR + EN"
Dosya: Modules/Shop/app/Services/ShopProductImageGenerator.php
Sorumluluk: Leonardo AI ile 2 CONTEXT görsel üret
// Görsel 1: Kullanım Ortamı (GENEL)
$prompt1 = "Professional industrial environment photo,
{$category} being used in workshop setting,
technician working, tools and equipment visible,
cinematic lighting, professional scene,
NO specific product focus, general context";
// Görsel 2: Teknik Çizim (SALLANTI)
$prompt2 = "Technical blueprint illustration style,
{$category} schematic drawing,
engineering aesthetic, dark blue background,
white and orange lines, CAD style,
generic technical diagram, NOT exact product";
Dosya: Modules/Shop/app/Http/Livewire/Admin/ProductAIContentGenerator.php
UI: Admin > Shop > Products > Manage > "Generate AI Content" button
Dosya: Modules/Shop/app/Jobs/GenerateProductImagesJob.php
Neden: Leonardo AI 20-30 saniye sürebilir, kullanıcı beklemez
Dosya: Modules/Shop/app/Services/ContentValidator.php
Sorumluluk: Üretilen içeriği kurallarla kontrol et
public function validate($content, $hasExistingContent): array
{
$errors = [];
// Fiyat kontrolü
if ($this->containsPrice($content)) {
$errors[] = 'Content contains price information';
}
// Teknik detay kontrolü
if (!$hasExistingContent && $this->containsTechnicalSpecs($content)) {
$errors[] = 'Content contains specific technical details';
}
return $errors;
}
Dosya: Mevcut AI credit system kullan
Akson Mili Kapağı örneğindeki pattern:
// MEVCUT İÇERİK VARSA (teknik detay çıkar):
[
{"label": "Malzeme", "value": "Döküm Çelik"},
{"label": "Boyut", "value": "150mm"},
{"label": "Ağırlık", "value": "2.5 kg"},
{"label": "Kaplama", "value": "Toz Boya"}
]
// MEVCUT İÇERİK YOKSA (genel bilgi):
[
{"label": "Kategori", "value": "Forklift Yedek Parça"},
{"label": "Kullanım Alanı", "value": "Endüstriyel Ekipman"},
{"label": "Uyumluluk", "value": "Tüm Forklift Tipleri"},
{"label": "Bilgi", "value": "Detay için arayın"}
]
// NOT: icon field KULLANMA (template parse hatası verir)
Her ürün için 30 keyword (15 TR + 15 EN):
<a href='{$imageUrl}' class='glightbox block rounded-xl overflow-hidden border-2 border-gray-200 dark:border-gray-700 hover:border-blue-500 transition-all'>
<img
src='{$imageUrl}'
alt='Forklift {$productTitle} Kullanım Ortamı - Endüstriyel Ekipman'
title='{$productTitle} montaj görseli - {$category}'
class='w-full aspect-square rounded-xl object-cover'
loading='lazy'
>
</a>
Sistem multi-tenant! Her tenant farklı sektör:
Her dosya işleminden sonra:
sudo chown tuufi.com_:psaserv /path/to/file
sudo chmod 644 /path/to/file
Content update sonrası mutlaka:
php artisan view:clear
php artisan responsecache:clear
curl -s -k https://ixtif.com/opcache-reset.php
Primary specs ve FAQ data'da icon field KULLANMA!
Blade template parse hatası verir. Sadece label/value ve question/answer kullan.
"Tüm ürünlere uygula" seçeneği:
| Sıra | Dosya/Bileşen | Süre | Bağımlılık |
|---|---|---|---|
| 1 | ContentValidator.php | 1 saat | - |
| 2 | ShopProductAIContentService.php | 3 saat | OpenAI API, AIPromptEnhancer, Validator |
| 3 | ShopProductImageGenerator.php | 2 saat | LeonardoAIService, MediaLibraryItem |
| 4 | GenerateProductImagesJob.php | 1 saat | Queue, ImageGenerator |
| 5 | ProductAIContentGenerator Livewire | 4 saat | ContentService, ImageGenerator, Validator |
| 6 | Test + Debug | 3 saat | Tüm bileşenler |
⏱️ Toplam Tahmini Süre: 14-16 saat
| Dosya | Açıklama |
|---|---|
/var/www/vhosts/tuufi.com/httpdocs/public/readme/2025/11/27/product-331-fixed/ai-content-v5.json |
Akson Mili Kapağı content örneği (final) - MEVCUT İÇERİK YOKTU |
Modules/MediaManagement/app/Http/Livewire/Admin/AiImageGeneratorComponent.php |
Leonardo AI entegrasyonu örneği |
app/Services/Media/LeonardoAIService.php |
Leonardo API service |
Modules/AI/app/Services/AIPromptEnhancer.php |
Prompt enhancement (GPT-4) |
Modules/Shop/resources/views/themes/ixtif/show.blade.php |
Product detail template (GLightbox mevcut) |