# alkawty/sha3af-book architecture

> Architecture diagram of the GitHub repository alkawty/sha3af-book, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alkawty/sha3af-book
- Repository: https://github.com/alkawty/sha3af-book

## Overview

مكتبة شغف موقع عربي لاستكشاف الكتب والمؤلفين، وتنزيل الكتب، وإنشاء الحسابات ونشر الكتب. المسار الأساسي يبدأ بتصفح الصفحة الرئيسية أو البحث، ثم فتح كتاب أو تنزيله؛ كما توفر المنظومة التسجيل ومراجعة الطلبات، وإدارة الحسابات والملفات الشخصية. يوضح الرسم الوحدات الأساسية، مع تمييز بعض الروابط غير المؤكدة لأن مصادرها لم تُعرض. الربط بملف مخطط قاعدة البيانات وواجهات الصفحات غير المقتبسة استدلالي، لا توثيق لمساراتها الداخلية.

Main entry points: [`Website/index.php`](https://github.com/alkawty/sha3af-book/blob/main/Website/index.php) (استعراض المكتبة), [`Website/actions/auth_register.php`](https://github.com/alkawty/sha3af-book/blob/main/Website/actions/auth_register.php) (تسجيل الحساب), [`Website/includes/db.php`](https://github.com/alkawty/sha3af-book/blob/main/Website/includes/db.php) (اتصال قاعدة البيانات), [`Website/includes/site_header.php`](https://github.com/alkawty/sha3af-book/blob/main/Website/includes/site_header.php) (رأس الموقع والتنقل)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["كتالوج الكتب"]
  node_home["استعراض المكتبة<br/>[index.php]"]
  node_searchui["واجهة البحث"]
  node_searchaction["بحث الكتب<br/>[site_search.php]"]
  node_categories["تصفح الأقسام<br/>[categories.php]"]
  node_authors["تصفح المؤلفين<br/>[authors.php]"]
  node_bookdetail["تفاصيل الكتاب<br/>[book.php]"]
  node_download["تنزيل الكتاب<br/>[download_book.php]"]
end

subgraph group_accounts["الحسابات والهوية"]
  node_register["تسجيل الحساب<br/>[auth_register.php]"]
  node_login["تسجيل الدخول<br/>[auth_login.php]"]
  node_settings["إعدادات الحساب"]
  node_profile["الملف الشخصي<br/>[user_profile.php]"]
  node_avatar["رفع الصورة الشخصية<br/>[upload_avatar.php]"]
end

subgraph group_publishing["النشر والمراجعة"]
  node_publish["إرسال كتاب للنشر"]
  node_approval["قرار مراجعة التسجيل"]
  node_telegram["بوت مراجعة الطلبات<br/>[Bot.py]"]
end

subgraph group_platform["طبقة الموقع والبيانات"]
  node_dbconn["اتصال قاعدة البيانات<br/>[db.php]"]
  node_helpers["مساعدات التطبيق<br/>[app_helpers.php]"]
  node_header["رأس الموقع والتنقل<br/>[site_header.php]"]
  node_telegramhelpers["تكامل تيليجرام"]
  node_database[("مخطط البيانات<br/>[Database.sql]")]
end

node_visitor(("زائر أو قارئ"))

node_visitor -.->|"يفتح"| node_home
node_home -->|"يستعلم عن الكتب"| node_dbconn
node_home -->|"يضمّن الرأس"| node_header
node_home -->|"يعرض نافذة البحث"| node_searchui
node_searchui -->|"يرسل استعلامًا"| node_searchaction
node_visitor -.->|"يتصفح"| node_categories
node_visitor -.->|"يتصفح"| node_authors
node_visitor -.->|"يفتح كتابًا"| node_bookdetail
node_bookdetail -.->|"يطلب التنزيل"| node_download
node_visitor -.->|"يرسل طلب تسجيل"| node_register
node_register -->|"يرسل طلب المراجعة"| node_telegramhelpers
node_register -.->|"ينشئ طلبًا معلّقًا"| node_telegram
node_visitor -.->|"يسجل الدخول"| node_login
node_visitor -.->|"يدير الحساب"| node_settings
node_visitor -.->|"يعرض الملف"| node_profile
node_header -->|"يرسل تغيير الصورة"| node_avatar
node_visitor -.->|"يرسل كتابًا"| node_publish
node_telegram -.->|"يعالج القرار"| node_approval
node_dbconn -->|"يستدعي المساعدات"| node_helpers
node_header -->|"يستدعي المساعدات"| node_helpers
node_telegramhelpers -->|"يستدعي المساعدات"| node_helpers
node_dbconn -.->|"يتصل بالمخطط"| node_database

click node_home "https://github.com/alkawty/sha3af-book/blob/main/Website/index.php"
click node_searchui "https://github.com/alkawty/sha3af-book/blob/main/Website/includes/site_search_modal.php"
click node_searchaction "https://github.com/alkawty/sha3af-book/blob/main/Website/actions/site_search.php"
click node_categories "https://github.com/alkawty/sha3af-book/blob/main/Website/pages/categories.php"
click node_authors "https://github.com/alkawty/sha3af-book/blob/main/Website/pages/authors.php"
click node_bookdetail "https://github.com/alkawty/sha3af-book/blob/main/Website/pages/book.php"
click node_download "https://github.com/alkawty/sha3af-book/blob/main/Website/actions/download_book.php"
click node_register "https://github.com/alkawty/sha3af-book/blob/main/Website/actions/auth_register.php"
click node_login "https://github.com/alkawty/sha3af-book/blob/main/Website/actions/auth_login.php"
click node_settings "https://github.com/alkawty/sha3af-book/blob/main/Website/actions/auth_account_actions.php"
click node_profile "https://github.com/alkawty/sha3af-book/blob/main/Website/pages/user_profile.php"
click node_avatar "https://github.com/alkawty/sha3af-book/blob/main/Website/actions/upload_avatar.php"
click node_publish "https://github.com/alkawty/sha3af-book/blob/main/Website/actions/publish_book_submit.php"
click node_approval "https://github.com/alkawty/sha3af-book/blob/main/Website/pages/approval_decision.php"
click node_telegram "https://github.com/alkawty/sha3af-book/blob/main/Website/telegram-bot-ready/Bot.py"
click node_dbconn "https://github.com/alkawty/sha3af-book/blob/main/Website/includes/db.php"
click node_helpers "https://github.com/alkawty/sha3af-book/blob/main/Website/includes/app_helpers.php"
click node_header "https://github.com/alkawty/sha3af-book/blob/main/Website/includes/site_header.php"
click node_telegramhelpers "https://github.com/alkawty/sha3af-book/blob/main/Website/includes/telegram_helpers.php"
click node_database "https://github.com/alkawty/sha3af-book/blob/main/DataBase/Database.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_searchui,node_searchaction,node_categories,node_authors,node_bookdetail,node_download toneBlue
class node_register,node_login,node_settings,node_profile,node_avatar toneAmber
class node_publish,node_approval,node_telegram toneMint
class node_dbconn,node_helpers,node_header,node_telegramhelpers,node_database toneRose
class node_visitor toneIndigo
```

## Components

### كتالوج الكتب

- [استعراض المكتبة](https://github.com/alkawty/sha3af-book/blob/main/Website/index.php): `Website/index.php`
- [واجهة البحث](https://github.com/alkawty/sha3af-book/blob/main/Website/includes/site_search_modal.php): `Website/includes/site_search_modal.php`
- [بحث الكتب](https://github.com/alkawty/sha3af-book/blob/main/Website/actions/site_search.php): `Website/actions/site_search.php`
- [تصفح الأقسام](https://github.com/alkawty/sha3af-book/blob/main/Website/pages/categories.php): `Website/pages/categories.php`
- [تصفح المؤلفين](https://github.com/alkawty/sha3af-book/blob/main/Website/pages/authors.php): `Website/pages/authors.php`
- [تفاصيل الكتاب](https://github.com/alkawty/sha3af-book/blob/main/Website/pages/book.php): `Website/pages/book.php`
- [تنزيل الكتاب](https://github.com/alkawty/sha3af-book/blob/main/Website/actions/download_book.php): `Website/actions/download_book.php`

### الحسابات والهوية

- [تسجيل الحساب](https://github.com/alkawty/sha3af-book/blob/main/Website/actions/auth_register.php): `Website/actions/auth_register.php`
- [تسجيل الدخول](https://github.com/alkawty/sha3af-book/blob/main/Website/actions/auth_login.php): `Website/actions/auth_login.php`
- [إعدادات الحساب](https://github.com/alkawty/sha3af-book/blob/main/Website/actions/auth_account_actions.php): `Website/actions/auth_account_actions.php`
- [الملف الشخصي](https://github.com/alkawty/sha3af-book/blob/main/Website/pages/user_profile.php): `Website/pages/user_profile.php`
- [رفع الصورة الشخصية](https://github.com/alkawty/sha3af-book/blob/main/Website/actions/upload_avatar.php): `Website/actions/upload_avatar.php`

### النشر والمراجعة

- [إرسال كتاب للنشر](https://github.com/alkawty/sha3af-book/blob/main/Website/actions/publish_book_submit.php): `Website/actions/publish_book_submit.php`
- [قرار مراجعة التسجيل](https://github.com/alkawty/sha3af-book/blob/main/Website/pages/approval_decision.php): `Website/pages/approval_decision.php`
- [بوت مراجعة الطلبات](https://github.com/alkawty/sha3af-book/blob/main/Website/telegram-bot-ready/Bot.py): `Website/telegram-bot-ready/Bot.py`

### طبقة الموقع والبيانات

- [اتصال قاعدة البيانات](https://github.com/alkawty/sha3af-book/blob/main/Website/includes/db.php): `Website/includes/db.php`
- [مساعدات التطبيق](https://github.com/alkawty/sha3af-book/blob/main/Website/includes/app_helpers.php): `Website/includes/app_helpers.php`
- [رأس الموقع والتنقل](https://github.com/alkawty/sha3af-book/blob/main/Website/includes/site_header.php): `Website/includes/site_header.php`
- [تكامل تيليجرام](https://github.com/alkawty/sha3af-book/blob/main/Website/includes/telegram_helpers.php): `Website/includes/telegram_helpers.php`
- [مخطط البيانات](https://github.com/alkawty/sha3af-book/blob/main/DataBase/Database.sql): `DataBase/Database.sql`

### Other components

- **زائر أو قارئ**

## Connections

- زائر أو قارئ → استعراض المكتبة: يفتح
- استعراض المكتبة → اتصال قاعدة البيانات: يستعلم عن الكتب (evidence: `Website/index.php`)
- استعراض المكتبة → رأس الموقع والتنقل: يضمّن الرأس (evidence: `Website/index.php`)
- استعراض المكتبة → واجهة البحث: يعرض نافذة البحث (evidence: `Website/index.php`)
- واجهة البحث → بحث الكتب: يرسل استعلامًا (evidence: `Website/includes/site_search_modal.php`)
- زائر أو قارئ → تصفح الأقسام: يتصفح
- زائر أو قارئ → تصفح المؤلفين: يتصفح
- زائر أو قارئ → تفاصيل الكتاب: يفتح كتابًا
- تفاصيل الكتاب → تنزيل الكتاب: يطلب التنزيل
- زائر أو قارئ → تسجيل الحساب: يرسل طلب تسجيل
- تسجيل الحساب → تكامل تيليجرام: يرسل طلب المراجعة (evidence: `Website/actions/auth_register.php`)
- تسجيل الحساب → بوت مراجعة الطلبات: ينشئ طلبًا معلّقًا
- زائر أو قارئ → تسجيل الدخول: يسجل الدخول
- زائر أو قارئ → إعدادات الحساب: يدير الحساب
- زائر أو قارئ → الملف الشخصي: يعرض الملف
- رأس الموقع والتنقل → رفع الصورة الشخصية: يرسل تغيير الصورة (evidence: `Website/includes/site_header.php`)
- زائر أو قارئ → إرسال كتاب للنشر: يرسل كتابًا
- بوت مراجعة الطلبات → قرار مراجعة التسجيل: يعالج القرار
- اتصال قاعدة البيانات → مساعدات التطبيق: يستدعي المساعدات (evidence: `Website/includes/db.php`)
- رأس الموقع والتنقل → مساعدات التطبيق: يستدعي المساعدات (evidence: `Website/includes/site_header.php`)
- تكامل تيليجرام → مساعدات التطبيق: يستدعي المساعدات (evidence: `Website/includes/telegram_helpers.php`)
- اتصال قاعدة البيانات → مخطط البيانات: يتصل بالمخطط
