# svstec/elite-centre architecture

> Architecture diagram of the GitHub repository svstec/elite-centre, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/svstec/elite-centre
- Repository: https://github.com/svstec/elite-centre

## Overview

مركز النخبة تطبيق طلاب Flutter مع واجهة API بـ Node.js. يبدأ المسار من الطالب في التطبيق، الذي يستخدم API للكتالوج وتسجيل الدخول والبيانات الخاصة؛ ويتحقق الخادم من هوية Google ويعالج تسجيل الطالب قبل إتاحة الاشتراك. وتغطي الفروع الرئيسية إدارة الطلاب والعلامات والمجتمع والإشعارات، مع SQLite لحفظ بيانات التشغيل. وصلات التطبيق وميزات الإدارة موثقة في README؛ تفاصيل بعض تنفيذ Flutter والربط الداخلي للإدارة لم تُعرض، لذا تُرسم تلك الروابط بحذر.

Main entry points: [`flutter_app/lib/main.dart`](https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/main.dart) (تطبيق الطلاب), [`server/api.js`](https://github.com/svstec/elite-centre/blob/main/server/api.js) (واجهة الخادم), [`server/admin-api.js`](https://github.com/svstec/elite-centre/blob/main/server/admin-api.js) (API الإدارة), [`server/community-store.js`](https://github.com/svstec/elite-centre/blob/main/server/community-store.js) (بيانات المجتمع)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["تطبيق الهاتف"]
  node_flutter["تطبيق الطلاب<br/>[main.dart]"]
  node_auth_ui["واجهات الدخول<br/>[auth_screens.dart]"]
  node_home_ui["الرئيسية<br/>[home_screen.dart]"]
  node_student_ui["شاشات الطالب"]
  node_api_client["عميل API<br/>[api_client.dart]"]
  node_cache["ذاكرة API<br/>[api_cache.dart]"]
  node_google_auth["دخول Google"]
  node_messaging["خدمة الإشعارات"]
end

subgraph group_server["خدمات API"]
  node_api["واجهة الخادم<br/>[api.js]"]
  node_identity["التحقق من الهوية<br/>[firebase-auth.js]"]
  node_registration["حالة التسجيل"]
  node_catalog["كتالوج المقررات<br/>[catalog.json]"]
end

subgraph group_admin["الإدارة والمجتمع"]
  node_admin_api["API الإدارة<br/>[admin-api.js]"]
  node_marks["استيراد العلامات<br/>[marks-import.js]"]
  node_community["بيانات المجتمع<br/>[community-store.js]"]
end

subgraph group_storage["البيانات والتخزين"]
  node_runtime["تهيئة البيانات<br/>[runtime-data.js]"]
  node_store[("مخزن SQLite<br/>[sqlite-store.js]")]
end

node_student(("الطالب"))

node_student -->|"يستخدم"| node_flutter
node_flutter -.->|"يعرض"| node_auth_ui
node_flutter -.->|"يعرض"| node_home_ui
node_flutter -.->|"يعرض"| node_student_ui
node_flutter -.->|"يطلب بيانات"| node_api_client
node_flutter -->|"يسجل عبر Google"| node_google_auth
node_flutter -->|"يستقبل إشعارات"| node_messaging
node_flutter -.->|"يستخدم ذاكرة"| node_cache
node_api_client -->|"يرسل طلبات"| node_api
node_api -->|"يتحقق من الهوية"| node_identity
node_api -.->|"يحدد حالة التسجيل"| node_registration
node_api -->|"يوجه طلبات الإدارة"| node_admin_api
node_admin_api -.->|"يفحص ملفات العلامات"| node_marks
node_api -->|"يقرأ ويحدّث"| node_community
node_admin_api -->|"يحدّث البيانات"| node_community
node_api -->|"يحمّل الكتالوج"| node_catalog
node_api -->|"يقرأ ويكتب"| node_store
node_api -->|"يهيئ البيانات"| node_runtime
node_runtime -->|"يرحّل البيانات"| node_store
node_community -->|"يقرأ ويكتب"| node_store

click node_flutter "https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/main.dart"
click node_auth_ui "https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/screens/auth_screens.dart"
click node_home_ui "https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/screens/home_screen.dart"
click node_student_ui "https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/screens/student_screens.dart"
click node_api_client "https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/data/api_client.dart"
click node_cache "https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/data/api_cache.dart"
click node_google_auth "https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/data/google_auth_service.dart"
click node_messaging "https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/data/firebase_messaging_service.dart"
click node_api "https://github.com/svstec/elite-centre/blob/main/server/api.js"
click node_identity "https://github.com/svstec/elite-centre/blob/main/server/firebase-auth.js"
click node_registration "https://github.com/svstec/elite-centre/blob/main/server/google-student-registration.js"
click node_admin_api "https://github.com/svstec/elite-centre/blob/main/server/admin-api.js"
click node_marks "https://github.com/svstec/elite-centre/blob/main/server/marks-import.js"
click node_community "https://github.com/svstec/elite-centre/blob/main/server/community-store.js"
click node_catalog "https://github.com/svstec/elite-centre/blob/main/server/catalog.json"
click node_runtime "https://github.com/svstec/elite-centre/blob/main/server/runtime-data.js"
click node_store "https://github.com/svstec/elite-centre/blob/main/server/sqlite-store.js"

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_flutter,node_auth_ui,node_home_ui,node_student_ui,node_api_client,node_cache,node_google_auth,node_messaging toneBlue
class node_api,node_identity,node_registration,node_catalog toneAmber
class node_admin_api,node_marks,node_community toneMint
class node_runtime,node_store toneRose
class node_student toneIndigo
```

## Components

### تطبيق الهاتف

- [تطبيق الطلاب](https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/main.dart): `flutter_app/lib/main.dart`
- [واجهات الدخول](https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/screens/auth_screens.dart): `flutter_app/lib/screens/auth_screens.dart`
- [الرئيسية](https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/screens/home_screen.dart): `flutter_app/lib/screens/home_screen.dart`
- [شاشات الطالب](https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/screens/student_screens.dart): `flutter_app/lib/screens/student_screens.dart`
- [عميل API](https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/data/api_client.dart): `flutter_app/lib/data/api_client.dart`
- [ذاكرة API](https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/data/api_cache.dart): `flutter_app/lib/data/api_cache.dart`
- [دخول Google](https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/data/google_auth_service.dart): `flutter_app/lib/data/google_auth_service.dart`
- [خدمة الإشعارات](https://github.com/svstec/elite-centre/blob/main/flutter_app/lib/data/firebase_messaging_service.dart): `flutter_app/lib/data/firebase_messaging_service.dart`

### خدمات API

- [واجهة الخادم](https://github.com/svstec/elite-centre/blob/main/server/api.js): `server/api.js`
- [التحقق من الهوية](https://github.com/svstec/elite-centre/blob/main/server/firebase-auth.js): `server/firebase-auth.js`
- [حالة التسجيل](https://github.com/svstec/elite-centre/blob/main/server/google-student-registration.js): `server/google-student-registration.js`
- [كتالوج المقررات](https://github.com/svstec/elite-centre/blob/main/server/catalog.json): `server/catalog.json`

### الإدارة والمجتمع

- [API الإدارة](https://github.com/svstec/elite-centre/blob/main/server/admin-api.js): `server/admin-api.js`
- [استيراد العلامات](https://github.com/svstec/elite-centre/blob/main/server/marks-import.js): `server/marks-import.js`
- [بيانات المجتمع](https://github.com/svstec/elite-centre/blob/main/server/community-store.js): `server/community-store.js`

### البيانات والتخزين

- [تهيئة البيانات](https://github.com/svstec/elite-centre/blob/main/server/runtime-data.js): `server/runtime-data.js`
- [مخزن SQLite](https://github.com/svstec/elite-centre/blob/main/server/sqlite-store.js): `server/sqlite-store.js`

### Other components

- **الطالب**

## Connections

- الطالب → تطبيق الطلاب: يستخدم (evidence: `README.md`)
- تطبيق الطلاب → واجهات الدخول: يعرض
- تطبيق الطلاب → الرئيسية: يعرض
- تطبيق الطلاب → شاشات الطالب: يعرض
- تطبيق الطلاب → عميل API: يطلب بيانات
- تطبيق الطلاب → دخول Google: يسجل عبر Google (evidence: `README.md`)
- تطبيق الطلاب → خدمة الإشعارات: يستقبل إشعارات (evidence: `README.md`)
- تطبيق الطلاب → ذاكرة API: يستخدم ذاكرة
- عميل API → واجهة الخادم: يرسل طلبات (evidence: `README.md`)
- واجهة الخادم → التحقق من الهوية: يتحقق من الهوية (evidence: `server/api.js`)
- واجهة الخادم → حالة التسجيل: يحدد حالة التسجيل (evidence: `server/api.js`)
- واجهة الخادم → API الإدارة: يوجه طلبات الإدارة (evidence: `server/api.js`)
- API الإدارة → استيراد العلامات: يفحص ملفات العلامات
- واجهة الخادم → بيانات المجتمع: يقرأ ويحدّث (evidence: `server/api.js`)
- API الإدارة → بيانات المجتمع: يحدّث البيانات (evidence: `server/admin-api.js`)
- واجهة الخادم → كتالوج المقررات: يحمّل الكتالوج (evidence: `README.md`)
- واجهة الخادم → مخزن SQLite: يقرأ ويكتب (evidence: `server/api.js`)
- واجهة الخادم → تهيئة البيانات: يهيئ البيانات (evidence: `server/api.js`)
- تهيئة البيانات → مخزن SQLite: يرحّل البيانات (evidence: `server/runtime-data.js`)
- بيانات المجتمع → مخزن SQLite: يقرأ ويكتب (evidence: `server/community-store.js`)
