# alsakkaf-dev/startyx architecture

> Architecture diagram of the GitHub repository alsakkaf-dev/startyx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alsakkaf-dev/startyx
- Repository: https://github.com/alsakkaf-dev/startyx

## Overview

أونيكس ERP — بتروسبيشل هو أساساً مرجع تصفّح وإعدادات محلي، لا ينفّذ عمليات ERP بحسب README. يقدّم تصفّح الشاشات التشغيلية، وثيقةً للدليل المحاسبي والفجوات، ولوحة إعدادات تحفظ محلياً. توجد أيضاً شيفرة خادم منفصلة لمحركات الترحيل وواجهات API؛ أعرضها كفرع مستقل ولا أوصلها بتدفّق الواجهة، إذ يصف README التطبيق بأنه بلا خادم. روابط الواجهة مستندة إلى توثيق الصفحات، وروابط الخادم إلى الاستيرادات والاستدعاءات الظاهرة؛ لم تُفحص مصادر أخرى.

Main entry points: [`server/src/presentation/http-server.ts`](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/presentation/http-server.ts) (خادم HTTP), [`assets/js/app.js`](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/app.js) (واجهة التطبيق), [`settings.html`](https://github.com/alsakkaf-dev/startyx/blob/main/settings.html) (لوحة الإعدادات), [`assets/js/settings.js`](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/settings.js) (واجهة الإعدادات)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["التصفّح التشغيلي"]
  node_home["الصفحة الرئيسية<br/>[index.html]"]
  node_app["واجهة التطبيق<br/>[app.js]"]
  node_data["بيانات الأشجار<br/>[data.js]"]
  node_tree["شجرة الأنظمة<br/>[tree.js]"]
  node_screen["معاينة الشاشة<br/>[screen-ui.js]"]
  node_search["البحث والتنقّل<br/>[nav.js]"]
end

subgraph group_configuration["الإعدادات والمرجع"]
  node_settings["لوحة الإعدادات<br/>[settings.html]"]
  node_settingsui["واجهة الإعدادات<br/>[settings.js]"]
  node_schema["مخطط الإعدادات<br/>[settings-schema.js]"]
  node_store["حفظ محلي<br/>[store.js]"]
  node_localstorage[("localStorage")]
  node_reference["وثيقة المرجع<br/>[reference.html]"]
  node_referenceui["عرض المرجع<br/>[reference.js]"]
end

subgraph group_backend["خدمة ERP"]
  node_server["خادم HTTP<br/>[http-server.ts]"]
  node_postlive["تنسيق الترحيل<br/>[post-live.ts]"]
  node_db["مصدر قاعدة البيانات<br/>[db.ts]"]
  node_postgres[("تخزين PostgreSQL<br/>[postgres.ts]")]
  node_masters["إدارة البيانات الأساسية<br/>[masters.ts]"]
  node_documents["استعلام المستندات<br/>[documents.ts]"]
end

subgraph group_engines["محركات الأعمال"]
  node_posting["محرك الترحيل<br/>[posting.ts]"]
  node_tax["محرك الضرائب<br/>[tax.ts]"]
  node_period["الفترة والإقفال<br/>[period-and-lock.ts]"]
end

node_user(("مستخدم"))

node_user -->|"يفتح"| node_home
node_user -->|"يدخل عبر المستخدم"| node_settings
node_home -->|"يعرض"| node_app
node_app -->|"يقرأ"| node_data
node_app -->|"يعرض"| node_tree
node_app -->|"يعرض المعاينة"| node_screen
node_app -->|"يوجّه البحث"| node_search
node_settings -->|"يعرض"| node_settingsui
node_settingsui -->|"يقرأ التعريفات"| node_schema
node_settingsui -->|"يحفظ ويستعيد"| node_store
node_store -->|"يقرأ ويكتب"| node_localstorage
node_settings -->|"يفتح الوثيقة"| node_reference
node_reference -->|"يعرض"| node_referenceui
node_server -->|"يحصل على الاتصال"| node_db
node_server -->|"يستعلم"| node_documents
node_server -->|"يدير البيانات"| node_masters
node_server -->|"يحسب الضريبة"| node_tax
node_server -->|"يفوّض الترحيل"| node_postlive
node_postlive -->|"ينفّذ الترحيل"| node_posting
node_posting -->|"يحسب ضريبة السطر"| node_tax
node_posting -->|"يتحقق من الفترة"| node_period
node_postgres -->|"يستخدم واجهة الاتصال"| node_db

click node_home "https://github.com/alsakkaf-dev/startyx/blob/main/index.html"
click node_app "https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/app.js"
click node_data "https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/data.js"
click node_tree "https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/tree.js"
click node_screen "https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/screen-ui.js"
click node_search "https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/nav.js"
click node_settings "https://github.com/alsakkaf-dev/startyx/blob/main/settings.html"
click node_settingsui "https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/settings.js"
click node_schema "https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/settings-schema.js"
click node_store "https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/store.js"
click node_reference "https://github.com/alsakkaf-dev/startyx/blob/main/reference.html"
click node_referenceui "https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/reference.js"
click node_server "https://github.com/alsakkaf-dev/startyx/blob/main/server/src/presentation/http-server.ts"
click node_postlive "https://github.com/alsakkaf-dev/startyx/blob/main/server/src/application/post-live.ts"
click node_db "https://github.com/alsakkaf-dev/startyx/blob/main/server/src/infrastructure/db.ts"
click node_postgres "https://github.com/alsakkaf-dev/startyx/blob/main/server/src/infrastructure/postgres.ts"
click node_posting "https://github.com/alsakkaf-dev/startyx/blob/main/server/src/engines/posting.ts"
click node_tax "https://github.com/alsakkaf-dev/startyx/blob/main/server/src/engines/tax.ts"
click node_period "https://github.com/alsakkaf-dev/startyx/blob/main/server/src/engines/period-and-lock.ts"
click node_masters "https://github.com/alsakkaf-dev/startyx/blob/main/server/src/application/masters.ts"
click node_documents "https://github.com/alsakkaf-dev/startyx/blob/main/server/src/application/documents.ts"

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_app,node_data,node_tree,node_screen,node_search toneBlue
class node_settings,node_settingsui,node_schema,node_store,node_localstorage,node_reference,node_referenceui toneAmber
class node_server,node_postlive,node_db,node_postgres,node_masters,node_documents toneMint
class node_posting,node_tax,node_period toneRose
class node_user toneIndigo
```

## Components

### التصفّح التشغيلي

- [الصفحة الرئيسية](https://github.com/alsakkaf-dev/startyx/blob/main/index.html): `index.html`
- [واجهة التطبيق](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/app.js): `assets/js/app.js`
- [بيانات الأشجار](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/data.js): `assets/js/data.js`
- [شجرة الأنظمة](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/tree.js): `assets/js/tree.js`
- [معاينة الشاشة](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/screen-ui.js): `assets/js/screen-ui.js`
- [البحث والتنقّل](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/nav.js): `assets/js/nav.js`

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

- [لوحة الإعدادات](https://github.com/alsakkaf-dev/startyx/blob/main/settings.html): `settings.html`
- [واجهة الإعدادات](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/settings.js): `assets/js/settings.js`
- [مخطط الإعدادات](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/settings-schema.js): `assets/js/settings-schema.js`
- [حفظ محلي](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/store.js): `assets/js/store.js`
- **localStorage**
- [وثيقة المرجع](https://github.com/alsakkaf-dev/startyx/blob/main/reference.html): `reference.html`
- [عرض المرجع](https://github.com/alsakkaf-dev/startyx/blob/main/assets/js/reference.js): `assets/js/reference.js`

### خدمة ERP

- [خادم HTTP](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/presentation/http-server.ts): `server/src/presentation/http-server.ts`
- [تنسيق الترحيل](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/application/post-live.ts): `server/src/application/post-live.ts`
- [مصدر قاعدة البيانات](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/infrastructure/db.ts): `server/src/infrastructure/db.ts`
- [تخزين PostgreSQL](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/infrastructure/postgres.ts): `server/src/infrastructure/postgres.ts`
- [إدارة البيانات الأساسية](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/application/masters.ts): `server/src/application/masters.ts`
- [استعلام المستندات](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/application/documents.ts): `server/src/application/documents.ts`

### محركات الأعمال

- [محرك الترحيل](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/engines/posting.ts): `server/src/engines/posting.ts`
- [محرك الضرائب](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/engines/tax.ts): `server/src/engines/tax.ts`
- [الفترة والإقفال](https://github.com/alsakkaf-dev/startyx/blob/main/server/src/engines/period-and-lock.ts): `server/src/engines/period-and-lock.ts`

### Other components

- **مستخدم**

## Connections

- مستخدم → الصفحة الرئيسية: يفتح
- مستخدم → لوحة الإعدادات: يدخل عبر المستخدم
- الصفحة الرئيسية → واجهة التطبيق: يعرض
- واجهة التطبيق → بيانات الأشجار: يقرأ
- واجهة التطبيق → شجرة الأنظمة: يعرض
- واجهة التطبيق → معاينة الشاشة: يعرض المعاينة
- واجهة التطبيق → البحث والتنقّل: يوجّه البحث
- لوحة الإعدادات → واجهة الإعدادات: يعرض
- واجهة الإعدادات → مخطط الإعدادات: يقرأ التعريفات
- واجهة الإعدادات → حفظ محلي: يحفظ ويستعيد
- حفظ محلي → localStorage: يقرأ ويكتب
- لوحة الإعدادات → وثيقة المرجع: يفتح الوثيقة
- وثيقة المرجع → عرض المرجع: يعرض
- خادم HTTP → مصدر قاعدة البيانات: يحصل على الاتصال
- خادم HTTP → استعلام المستندات: يستعلم
- خادم HTTP → إدارة البيانات الأساسية: يدير البيانات
- خادم HTTP → محرك الضرائب: يحسب الضريبة
- خادم HTTP → تنسيق الترحيل: يفوّض الترحيل
- تنسيق الترحيل → محرك الترحيل: ينفّذ الترحيل
- محرك الترحيل → محرك الضرائب: يحسب ضريبة السطر
- محرك الترحيل → الفترة والإقفال: يتحقق من الفترة
- تخزين PostgreSQL → مصدر قاعدة البيانات: يستخدم واجهة الاتصال
