نظام تشغيل SwanArt الخاص — وثيقة استثمارية تفصيلية
SwanArt Proprietary Operating System — Investor-Grade Deep Dive
ملخص تنفيذي
Executive Summary
تمتلك SwanArt نظام تشغيل رقمي متكامل ومُبنى داخلياً (Proprietary Operating System) يُدير دورة العمل الكاملة لشركة فنون وديكور — من لحظة استلام طلب العميل وحتى التسليم والمحاسبة. هذا ليس نموذجاً تجريبياً ولا أداة مكتبية، بل ست منظومات إنتاجية حيّة تعمل على بنية تحتية حديثة موزّعة عالمياً، وتُدير اليوم أكثر من 40,000 سجل تشغيلي فعلي. SwanArt owns a fully integrated, internally built proprietary operating system that runs the company's entire workflow — from the moment a customer order arrives, through design, printing, workshop fabrication, dispatch, delivery, and accounting. This is not a prototype or an off-the-shelf tool: it is six live production systems running on a modern, globally distributed infrastructure, today managing more than 40,000 real operational records.
النقاط الجوهرية التي تجعل هذا النظام أصلاً تقنياً قابلاً للدفاع: Core points that make this system a defensible technology asset:
- ست منظومات إنتاجية حيّة تُغطّي الإدارة الداخلية، موقع العملاء، بوابة التوظيف، الواجهة الخلفية (API)، متجر ديكور متميّز، ونظام ERP محاسبي. Six live production systems spanning internal management, customer site, recruitment, backend API, a premium décor store, and an ERP accounting deployment.
- بنية حافة عالمية (Edge) على Cloudflare بزمن استجابة أقل من 100 مللي ثانية عبر أكثر من 300 مدينة. Globally distributed Cloudflare edge infrastructure delivering sub-100ms responses across 300+ cities.
- عمق تشغيلي مُثبت بالأرقام: 1,165 طلباً في نافذة 90 يوماً، 3,458 عميلاً دافعاً، حضور في 15 من 18 محافظة، ومعدل إتمام طلبات يبلغ 83.8%. Proven operational depth: 1,165 orders in a 90-day window, 3,458 paying customers, presence in 15 of 18 governorates, and an 83.8% completion rate.
- قابلية التكرار مُثبتة: أُعيد استخدام البنية نفسها لتسليم نظام ERP كامل لشركة طاقة شمسية — دليل عملي على أن النظام منتَج قابل للتعميم وليس حلاً لمرة واحدة. Repeatability proven: the same infrastructure was reused to deliver a full ERP for a solar-energy company — practical evidence the system is a generalizable product, not a one-off.
1. المنصة والنطاق
1. The Platform & Scale
1.1 المنظومات الإنتاجية الحيّة
1.1 Live Production Systems
النظام ليس تطبيقاً واحداً، بل عائلة من المنظومات المترابطة، كلٌّ منها في الإنتاج الفعلي ويخدم وظيفة محدّدة: The system is not a single app but a family of interconnected systems, each in live production serving a specific function:
| المنظومة / System | النطاق / Domain | الوظيفة / Function |
|---|---|---|
| تطبيق الإدارة الداخلية / Internal Management App | swanord26 |
لوحات التشغيل الكاملة (مبيعات، تصميم، ورشة، توزيع، إدارة، موارد بشرية) — Full operational dashboards |
| موقع العملاء وبوابة التوظيف / Customer Site & Recruitment | swanart.org |
واجهة العملاء، التقييمات، التوظيف — Public-facing customer & hiring portal |
| الواجهة الخلفية / Backend API Worker | swan-api |
منطق الأعمال والخدمات على الحافة — Edge business logic & services |
| متجر SwanDeco للديكور المتميّز / Premium Décor Store | swandeciq.com |
متجر إلكتروني متخصص — Specialized e-commerce store |
| نشر Odoo ERP المحاسبي / Odoo ERP Deployment | edu-swanart |
المحاسبة وتخطيط موارد المؤسسة — Accounting & ERP |
| وحدة التحكم الإدارية / Management Console | — | إشراف ورؤية شاملة — Centralized oversight |
دليل قابلية التكرار: أُعيد استخدام البنية التحتية ذاتها لتسليم نظام ERP متكامل لشركة في قطاع الطاقة الشمسية، ما يُثبت أن النظام منتَج معماري قابل للتعميم عبر قطاعات مختلفة. Repeatability proof: the same infrastructure was reused to deliver a complete ERP for a solar-energy company, proving the system is a generalizable architectural product across sectors.
1.2 مقاييس النطاق والبيانات
1.2 Scale & Data Metrics
| المقياس / Metric | القيمة / Value |
|---|---|
| جداول قاعدة البيانات / Database tables (Cloudflare D1) | 58 جدولاً / 58 SQL tables |
| حجم قاعدة البيانات / Database size | ~28 MB |
| زمن الاستجابة / Response time | أقل من 100ms / sub-100ms |
| التغطية الجغرافية / Geographic reach | 300+ مدينة / 300+ cities |
| السجلات التشغيلية الحيّة / Live operational records | 40,000+ |
| مهام ورشة موقّتة / Timed workshop tasks | 20,747 |
| سجلات تدقيق / Audit-log records | 13,317 |
| إشعارات لحظية / Real-time notifications | 3,809 |
| تصاميم مفهرسة / Indexed designs | 744 |
1.3 مؤشرات الأعمال
1.3 Business Indicators
| المؤشر / Indicator | القيمة / Value |
|---|---|
| الطلبات في 90 يوماً / Orders (90-day window) | 1,165 |
| العملاء الدافعون / Paying customers | 3,458 |
| التغطية / Coverage | 15 من 18 محافظة / 15 of 18 governorates |
| معدل الطلبات اليومي / Daily order rate | ~17 طلباً/يوم / ~17 orders/day |
| معدل إتمام الطلبات / Order-completion rate | 83.8% |
2. الحزمة التقنية
2. Technology Stack
بُني النظام بالكامل على حزمة تقنية حديثة وموزّعة على الحافة (Serverless Edge)، ما يمنحه أداءً عالياً وتكلفة تشغيلية منخفضة وقابلية توسّع تلقائية. The system is built entirely on a modern serverless edge stack, delivering high performance, low operating cost, and automatic scalability.
| الطبقة / Layer | التقنيات / Technologies |
|---|---|
| الواجهة الأمامية / Frontend | React 19 + TypeScript + Vite + Tailwind، ثنائية اللغة (RTL/LTR)، PWA |
| الواجهة الخلفية / Backend | Cloudflare Pages Functions / Workers (Serverless Edge, TypeScript) |
| قاعدة البيانات / Database | Cloudflare D1 (SQLite) |
| تخزين الكائنات / Object Storage | Cloudflare R2 (الأصول، الملفات الخاصة، الوسائط، التدقيق) |
| التخزين المؤقت والأقفال / Caching & Locks | Workers KV (تحديد المعدّل، التخزين المؤقت، الأقفال) |
2.1 المصادقة والأمان
2.1 Authentication & Security
الأمان في SwanArt مُعامَل كميزة جوهرية لا كإضافة لاحقة. خضع النظام لعملية تحصين (Hardening Pass) رفعت درجة جاهزية الإنتاج من 52 إلى 88 من 100، والموقع العام والواجهة الخلفية مُحصّنان وجاهزان للإنتاج. Security at SwanArt is treated as a core feature, not an afterthought. The system underwent a hardening pass that raised its production-readiness score from 52 to 88/100; the public site and API are hardened and production-ready.
طبقات الأمان المُطبّقة: Implemented security layers:
- مصادقة متعددة الطبقات / Multi-layer auth: PIN + بصمة WebAuthn الحيوية + JWT + صلاحيات أدوار دقيقة (granular role permissions).
- تسعير من جانب الخادم / Server-side pricing: منع التلاعب بالأسعار من العميل.
- تحديد المعدّل / Rate limiting: حماية من إساءة الاستخدام والهجمات.
- رؤوس أمان كاملة / Full security headers: HSTS، CSP، X-Frame-Options DENY.
- استعلامات SQL مُعاملة / Parameterized SQL: لا حقن SQL (no injection).
- كتابات D1 ذرّية / Atomic D1 writes: ضمان سلامة البيانات.
- روابط R2 خاصة موقّعة / Signed private R2 URLs: وصول محكوم للملفات الحسّاسة.
- سجل تدقيق غير قابل للتعديل / Immutable audit log: مسار مساءلة كامل (13,317 سجلاً).
2.2 التكاملات الخارجية
2.2 External Integrations
| التكامل / Integration | الاستخدام / Use |
|---|---|
| Google Drive | مجلد ملفات لكل طلب — per-order file folders |
| Telegram | بوت ورشة ثنائي الاتجاه عبر مُرحِّل — two-way workshop bot via relay |
| Google Gemini AI | تعبئة تلقائية + OCR — autofill + OCR |
| Odoo (XML-RPC) | المحاسبة — accounting |
| GitHub | نشر تلقائي — auto-deploy |
3. الوحدات التشغيلية
3. Operational Modules
النظام مُقسّم إلى لوحات تحكم متخصصة، كلٌّ منها مُصمّم لدور وظيفي محدّد، وتتدفّق البيانات بينها بسلاسة عبر دورة حياة الطلب. The system is divided into specialized dashboards, each designed for a specific functional role, with data flowing seamlessly between them across the order lifecycle.
3.1 لوحة المبيعات
3.1 Sales Dashboard
أبرز ابتكار في هذه الوحدة هو التعبئة التلقائية بالذكاء الاصطناعي: يلتقط مندوب المبيعات صورة لمحادثة واتساب أو يكتب جملة واحدة، فيقوم Gemini بملء نموذج الطلب بالكامل تلقائياً. The standout innovation here is AI autofill: a salesperson photographs a WhatsApp chat or types one sentence, and Gemini fills the entire order form automatically.
- أثر قابل للقياس / Measurable impact: وقت إدخال الطلب انخفض من 15 دقيقة إلى دقيقتين — أي ما يعادل 8 أضعاف القدرة الاستيعابية للإدخال (~8× intake capacity).
- حاسبة سعر اللوحات / Canvas price calculator: الحجم + الإطار.
- حاسبة ورق الجدران / Wallpaper calculator: السعر لكل متر مربع.
- أعلام المعرض/الهدايا لكل لوحة / Per-canvas gallery/gift flags.
- ترقيم تلقائي للطلبات / Automatic order numbering.
- إنشاء تلقائي لمجلد Google Drive / Automatic Drive folder creation.
- تصميم يُركّز على الجوّال / Mobile-first field sales.
3.2 لوحة المصمّم
3.2 Designer Dashboard
- طوابير العمل / Work queues: غير مؤكّد / مؤكّد / قيد التصميم / جاهز للطباعة (unconfirmed / confirmed / in-design / ready-to-print).
- المطالبة بالطلب / Claim-an-order: يلتقط المصمّم الطلب لمسؤوليته.
- رفع الملفات / File uploads: ملف الاختبار، الإعدادات، ملف التصميم، نموذج ما قبل الطباعة (test / settings / design file / pre-print mockup).
- ميزة المطابقة البصرية للتصاميم / Design Visual Match (تُشرح بالتفصيل أدناه).
3.3 المطابقة البصرية للتصاميم — ميزة جوهرية
3.3 Design Visual Match — A Core Differentiator
هذه واحدة من أقوى الميزات التقنية في النظام. قبل أن يبدأ المصمّم إعادة تصميم لوحة مطلوبة، يُجري النظام بحثاً بصرياً ثنائي المستوى للكشف عمّا إذا كان التصميم موجوداً بالفعل (في المكتبة الجاهزة أو في طلب سابق) — ما يوفّر الوقت، ويُمكّن إعادة الاستخدام، ويمنع الازدواجية. This is one of the system's strongest technical features. Before a designer re-creates a requested painting, the system performs a two-tier visual search to detect whether the design already exists (in the ready library or a past order) — saving time, enabling reuse, and avoiding duplication.
المستوى الأول — التجزئة الإدراكية / Tier 1 — Perceptual Hashing: - يستخدم dHash + aHash بطول 64-بت ومسافة Hamming للكشف عن المطابقات شبه التامّة. Uses 64-bit dHash + aHash with Hamming distance for near-exact matches. - متين أمام اختلافات الإضاءة والصيغ، بما في ذلك ملفات الطباعة TIFF. Robust to lighting and format differences, including TIFF print files.
المستوى الثاني — تضمينات CLIP بالذكاء الاصطناعي / Tier 2 — AI CLIP Embeddings: - يستخدم تضمينات CLIP مع تشابه جيب التمام (cosine similarity) للمطابقات الدلالية. Uses CLIP embeddings with cosine similarity for semantic matches. - يلتقط حالات القصّ وإعادة التلوين وإعادة التصميم، وكذلك صور "الماكيت" (mockup) حيث تكون اللوحة جزءاً من صورة غرفة — وتُعالَج عبر قصّ الصور (image crops). Captures crops, recolors, redesigns, and "mockup" images where the painting is part of a room photo — handled via image crops.
الوضع الحالي / Current status:
| المقياس / Metric | القيمة / Value |
|---|---|
| تصاميم مفهرسة / Designs indexed | 3,073 |
| تصاميم بمتجهات ذكاء اصطناعي / Designs with AI vectors | 1,910 |
| طلبات مُغطّاة / Orders covered | 2,838 |
| عتبة المطابقة / Match threshold | 90% |
| النتائج المُعادة / Results returned | أعلى 8 مطابقات مع نسبة ثقة / top 8 with confidence % |
3.4 لوحة الورشة وبوت Telegram
3.4 Workshop Dashboard & Telegram Bot
عند وصول الطلب إلى الورشة، تنفجر كل لوحة تلقائياً إلى 8 مهام موقّتة بالدقيقة، ويُدير البوت عبر Telegram التواصل ثنائي الاتجاه مع فريق الورشة. When an order reaches the workshop, each painting automatically explodes into 8 timed tasks, and the Telegram bot manages two-way communication with the workshop team.
المهام الثماني / The 8 Workshop Tasks:
| # | المهمة / Task |
|---|---|
| 1 | قصّ الإطار / Frame cutting |
| 2 | تجميع الإطار / Frame assembly |
| 3 | شدّ القماش / Canvas stretching |
| 4 | قصّ الحدود / Border cutting |
| 5 | تجميع الحدود / Border assembly |
| 6 | صورة الطلب / Order photo |
| 7 | التغليف / Packaging |
| 8 | صورة التغليف / Packaging photo |
آلية العمل / Workflow: - يدفع البوت صور العميل + ملخّصاً + 8 رسائل مهام، كلٌّ منها مع زر "مطالبة" (claim button). The bot pushes customer photos + a summary + 8 task messages, each with a claim button. - نقرة واحدة تُحدّث الحالة لحظياً على الموقع. One tap updates live status on the site. - كل مهمة موقّتة بالدقيقة (20,747 مهمة موقّتة)، وهذه البيانات تُغذّي الرواتب تلقائياً (automatic payroll). Every task is timed to the minute (20,747 timed tasks), feeding automatic payroll. - التخطّي الذكي التلقائي / Smart auto-skip: يتخطّى مهام الإطار للوحات بلا إطار، ومهام القماش للملصقات وورق الجدران، ويُقلّص طلبات التركيب في الموقع إلى مهمة واحدة. Skips frame tasks for frameless items, canvas tasks for posters/wallpaper, and collapses on-site-installation orders to one task. - نظام المخالفات / Violations system: قفل + حلّ على مرحلتين + 3 مستويات خطورة. يُعلّم الطلب الخاطئ، ويقفل لوحة الموظف المسؤول بشريط تنبيه حتى يُصحَّح ويُؤكَّد. Lock + 2-stage resolution + 3 severity levels: flags an erroneous order and locks the responsible employee's dashboard with a banner until fixed and confirmed.
3.5 لوحة التوزيع
3.5 Dispatcher Dashboard
- تعرض الطلبات الجاهزة للتحضير فقط / shows only ready-to-prepare orders.
- اختيار شركة الشحن / pick shipping company.
- استخراج رقم التتبّع بـ OCR من صورة الإيصال / OCR extraction of the tracking number from a receipt photo.
- طباعة بطاقة الطلب (PDF/WhatsApp) / print an order card.
- رفع صورة الإتمام ووسم الطلب كمكتمل / upload a completion photo & mark complete.
3.6 لوحة الإدارة/المالك
3.6 Admin/Owner Dashboard
- 6 بطاقات مؤشرات أداء / 6 KPI cards: صافي المبيعات، صافي الربح، المكتمل، قيد التنفيذ، المتأخّر، السنوي (net sales, net profit, completed, in-progress, overdue, annual).
- تصدير Excel/CSV / Excel/CSV export.
- حاسبة مالية / financial calculator.
- رؤية شاملة عبر الشركة / full company-wide visibility.
3.7 وحدة الموارد البشرية وتخطيط الخلافة
3.7 HR & Succession Module
- الموظفون / Employees: 25 موظفاً (24 نشطاً) / 25 employees (24 active).
- الحضور / Attendance: خدمة ذاتية عبر PIN مع فرض بصمة حيوية اختياري / self-service via PIN with optional biometric enforcement.
- طلبات الإجازة / Leave requests.
- الرواتب / Payroll: محسوبة على أيام العمل الفعلية (باستثناء الجمعة/السبت)، يوم عمل قياسي 8 ساعات، عمل إضافي ×1.5 / computed on actual working days (excl. Fri/Sat), 8-hour standard day, overtime ×1.5.
- الشهادات / Certifications: تنبيهات انتهاء قبل 60 يوماً / 60-day expiry alerts.
- تخطيط الخلافة / Succession planning: مناصب حرجة بمستويات حرجيّة + مرشحون داخليون/خارجيون مُقيَّمون (جاهز/قريباً/قيد التطوير) + علم "معرّض للخطر" لأي منصب حرج بلا خليفة جاهز / critical positions with criticality levels + internal/external candidates rated (ready/soon/develop) + an "at-risk" flag for any critical role with no ready successor.
بعض الوحدات الفرعية مبنية وتنتظر إدخال البيانات (الرواتب الأساسية، خطط الخلافة) — قيد الإكمال / to-complete. Some sub-modules are built and awaiting data entry (base salaries, succession plans).
3.8 وحدة المخزون
3.8 Inventory Module
- عناصر الإطارات والقماش، حركات المخزون، إعدادات تكلفة ذكية / frames/canvas items, stock movements, smart cost settings.
- الإطارات مُقيَّمة حالياً بـ ~46.8 مليون دينار عراقي / frames currently valued ~46.8M IQD.
- قيد الإكمال / to-complete: يحتاج إدخال التكلفة لكل متر مربع لحساب التكلفة المادية الحقيقية لكل طلب / needs cost-per-m² entry to compute true per-order material cost.
3.9 وحدات تشغيلية إضافية حيّة
3.9 Additional Live Operational Modules
- نظام تقييم العملاء / Customer ratings system: صفحة
/rate— حيّة / live. - بوابة التوظيف / Recruitment portal: مُزامَنة مع الموارد البشرية عبر الكتابة المزدوجة / synced to HR via dual-write.
- مركز عمليات Notion / Notion "Operations Hub": 5–6 قواعد بيانات (صحة النظام، الحوادث، إجراءات التشغيل القياسية SOPs، التقييمات، عملاء VIP) تُغذّى بتقرير صحة آلي يومي (cron الساعة 08:03) / fed by a daily automated health report (cron at 08:03).
- Pen Master: لعبة تدريبية أصلية لقلم بيزييه (Bézier-pen) للمصمّمين، مبنية على Paper.js / an original Bézier-pen training game for designers, built on Paper.js.
- لوحة التشخيص / Diagnose dashboard: إصلاحات ذاتية لجودة البيانات / self-service data-quality fixes.
- نظام المعرض / Gallery system: 371 لوحة جاهزة كـكتالوج رقمي (PM-XXX)، اختيار بالسلّة، والمباع يُحجَز تلقائياً / 371 ready-made paintings as a digital catalog (PM-XXX), cart selection, sold→auto-reserved.
4. دورة حياة الطلب
4. Order Lifecycle
يتتبّع النظام كل طلب من البداية إلى النهاية عبر سلسلة مترابطة، بحيث لا تسقط أي خطوة ولا تُفقد أي بيانات. The system tracks every order end-to-end across a connected chain, so no step is dropped and no data is lost.
المبيعات → التصميم → الطباعة → الورشة → التوزيع → التسليم → محاسبة Odoo
Sales → Design → Print → Workshop → Dispatch → Delivery → Odoo accounting
كل انتقال بين المراحل يُسجَّل في سجل التدقيق غير القابل للتعديل، ويُولّد إشعارات لحظية، ويُحدّث مؤشرات الأداء في لوحة المالك آنياً. Each stage transition is recorded in the immutable audit log, generates real-time notifications, and updates the owner dashboard KPIs instantly.
5. لماذا هذا أصل تقني قابل للدفاع
5. Why This Is a Defensible Asset
هذا النظام يُمثّل خندقاً تنافسياً حقيقياً (a real competitive moat) لعدّة أسباب موضوعية: This system represents a genuine competitive moat for several objective reasons:
- عمق تشغيلي يصعب تكراره / Hard-to-replicate operational depth: 40,000+ سجل حيّ، 58 جدولاً، و13,317 سجل تدقيق تُمثّل سنوات من المنطق التشغيلي المُرمَّز — معرفة مؤسسية مُحوّلة إلى كود. 40,000+ live records, 58 tables, and 13,317 audit records represent years of codified operational logic — institutional knowledge turned into code.
- ميزات ذكاء اصطناعي مُنتِجة / Production-grade AI features: التعبئة التلقائية (8× قدرة الإدخال) والمطابقة البصرية ثنائية المستوى ليست عروضاً تجريبية بل أدوات تعمل يومياً على بيانات حقيقية. Autofill (8× intake) and two-tier visual matching are not demos but tools running daily on real data.
- بنية حافة قابلة للتوسّع منخفضة التكلفة / Scalable, low-cost edge architecture: الاستجابة دون 100ms عبر 300+ مدينة دون خوادم تقليدية، ما يعني هوامش تشغيل عالية وتوسّعاً تلقائياً. Sub-100ms across 300+ cities with no traditional servers means high operating margins and automatic scaling.
- أمان مُحصَّن ومُدقَّق / Hardened, audited security: ارتفاع جاهزية الإنتاج من 52 إلى 88/100، مع سجل تدقيق غير قابل للتعديل وضوابط وصول دقيقة. Production-readiness raised from 52 to 88/100, with an immutable audit log and granular access controls.
- قابلية التكرار المُثبتة / Proven repeatability: إعادة استخدام البنية لتسليم ERP لشركة طاقة شمسية يُحوّل النظام من تكلفة داخلية إلى منتَج قابل للترخيص. Reusing the architecture to deliver an ERP for a solar company turns the system from an internal cost into a licensable product.
- تكامل عمودي كامل / Full vertical integration: من التقاط الطلب إلى المحاسبة في Odoo، يُغطّي النظام سلسلة القيمة بأكملها داخل منصة واحدة مملوكة بالكامل. From order capture to Odoo accounting, the system covers the entire value chain within a single fully owned platform.
الخلاصة: نظام تشغيل SwanArt ليس برمجية مساعِدة، بل العمود الفقري الرقمي للشركة وأصل ملكية فكرية قابل للتوسّع والترخيص والدفاع. *Bottom line: the SwanArt operating system is not auxiliary softwar