# Prophet Astroloji CMS - Mimari ve Sistem Analizi

Bu doküman, "Prophet" Astroloji & Tarot platformunun sistem mimarisini, veritabanı yapısını, Filament v5 tabanlı CMS yönetim modelini ve dinamik sayfa oluşturma (Page Section Builder) mantığını detaylandırmaktadır.

---

## 1. Sistem Mimarisi & Teknoloji Yığını

Uygulama, yüksek performanslı, sürdürülebilir ve kolay yönetilebilir bir yapıda tasarlanmıştır.

*   **Çekirdek Çerçeve (Core Framework):** Laravel 11.x & PHP 8.4
*   **Veritabanı Yönetimi (Database):** MySQL 8.4 (ServBay tabanlı yerel sunucu)
*   **İçerik Yönetim Paneli (Admin Portal):** Filament PHP v5 (Sınıfının en premium ve esnek yönetim paneli arayüzü)
*   **Arayüz Teknolojileri (Frontend Layout):** Blade Templates & Tailwind CSS (Stitch tasarımları birebir korunacak şekilde)
*   **İletişim ve Randevu Rezervasyonları:** Dinamik zaman dilimi (time slot) seçimi ve doğum haritası analizine özel detay formları.

---

## 2. Veritabanı İlişkisel Modelleme (ERD)

Sistemdeki tüm veriler ilişkisel bir veritabanı yapısında saklanır. Sayfa şablonları, menüler ve dinamik içerik blokları veritabanı üzerinden yüklenir.

```mermaid
erDiagram
    users {
        bigint id PK
        string name
        string email UK
        string password
        timestamp created_at
    }
    menus {
        bigint id PK
        string title
        string url
        integer order
        boolean is_active
        timestamp created_at
    }
    pages {
        bigint id PK
        string title
        string slug UK
        string meta_title
        text meta_description
        boolean is_active
        timestamp created_at
    }
    page_sections {
        bigint id PK
        bigint page_id FK
        string type
        json content
        integer order
        boolean is_active
        timestamp created_at
    }
    categories {
        bigint id PK
        string name
        string slug UK
        timestamp created_at
    }
    blog_posts {
        bigint id PK
        bigint category_id FK
        string title
        string slug UK
        text summary
        longtext content
        string featured_image
        timestamp published_at
        timestamp created_at
    }
    services {
        bigint id PK
        string title
        text description
        decimal price
        integer duration
        boolean is_active
        timestamp created_at
    }
    bookings {
        bigint id PK
        bigint service_id FK
        string name
        string email
        string phone
        date birth_date
        time birth_time
        string birth_place
        date booking_date
        string booking_time_slot
        text notes
        string status
        timestamp created_at
    }
    contacts {
        bigint id PK
        string name
        string phone
        string email
        string subject
        text message
        timestamp created_at
    }

    pages ||--o{ page_sections : "hasMany"
    categories ||--o{ blog_posts : "hasMany"
    services ||--o{ bookings : "hasMany"
```

---

## 3. Dinamik Sayfa Bölümleri (Page Sections) JSON Yapıları

Sayfaların tasarımı, `page_sections` tablosundaki `content` isimli JSON alanında saklanan esnek veri modelleri ile oluşturulur. Blade bileşenleri bu JSON verilerini okuyarak arayüze döker.

### A. Hero Banner (`type: hero`)
```json
{
  "title": "Kendine Dönüş Yolculuğunda...",
  "subtitle": "Yıldızların rehberliğinde kozmik uyum ve kehanet yolculuğunuz.",
  "button_text": "DANIŞMANLIK AL",
  "button_url": "/randevu"
}
```

### B. About Me (`type: about_me`)
```json
{
  "subtitle": "Yıldızların Rehberliğinde Yolculuğum",
  "image_url": "/assets/img/astrologer.jpg",
  "bio_text": "Astroloji ve tarot ile olan bağım derin bir ruhsal çağrı olarak başladı..."
}
```

### C. Services Grid (`type: services`)
```json
{
  "title": "Danışmanlıklarım",
  "description": "Evrenin rehberliğini hayatınıza taşıyan bireysel seanslar.",
  "cards": [
    {
      "title": "Yıldız Haritası Analizi",
      "subtitle": "Kozmik Plan",
      "description": "Doğum anınızdaki gezegen konumlarının analizi.",
      "icon": "person",
      "button_text": "Detaylı Bilgi",
      "button_url": "/randevu"
    }
  ]
}
```

### D. Testimonials (`type: testimonials`)
```json
{
  "title": "Felsefem ve Değerlerim",
  "items": [
    {
      "name": "Bireysel Yaklaşım",
      "text": "Her danışmanlık, kişinin benzersiz enerjisine özel şekillenir.",
      "avatar_url": null,
      "role": "İlke"
    }
  ]
}
```

---

## 4. Uygulama Dizin Yapısı ve Dosya Haritası

```
astrolojiyeni/
├── app/
│   ├── Filament/
│   │   └── Resources/
│   │       ├── Bookings/       <-- Randevu Kayıtları Yönetimi
│   │       ├── Categories/     <-- Blog Kategori Yönetimi
│   │       ├── BlogPosts/      <-- Blog Yazıları Yönetimi
│   │       ├── Menus/          <-- Header/Footer Menü Yönetimi
│   │       ├── Pages/          <-- Sayfalar & Sayfa Bölümleri Yönetimi
│   │       ├── Services/       <-- Sunulan Danışmanlık Hizmetleri
│   │       └── Contacts/       <-- İletişim Formu Kayıtları
│   └── Http/
│       └── Controllers/
│           ├── PageController.php
│           ├── BlogController.php
│           ├── BookingController.php
│           └── ContactController.php
├── database/
│   └── migrations/             <-- MySQL Tablo Tasarımları
├── docs/
│   └── architecture_and_system_analysis.md <-- Bu Doküman
├── resources/
│   └── views/
│       ├── layouts/
│       │   └── app.blade.php   <-- Ana Sayfa Düzeni (Header/Footer)
│       ├── components/
│       │   └── sections/       <-- Dinamik Arayüz Bileşenleri (Blade)
│       ├── blog/
│       │   ├── index.blade.php
│       │   └── show.blade.php
│       ├── booking/
│       │   ├── index.blade.php
│       │   └── success.blade.php
│       └── pages/
│           └── show.blade.php  <-- Sayfa Oluşturucu Core Arayüzü
└── routes/
    └── web.php                 <-- URL ve Denetleyici Haritası
```
