15
نموذجاً للبيانات
SaaS · 2024 - 2025 · دون ذكر اسم العميل
نظام خلفي واحد يخدم مواقع كثيرة لعملاء مختلفين، ويحدّد كل موقع بنفسه أنواع محتواه وصلاحيات فريقه واشتراكه.
15
نموذجاً للبيانات
99
مساراً في الواجهة البرمجية
3 + 5
Permission model
roles plus per-resource grants
3
Architecture rewrites
each narrower and more capable
المشكلة
An agency running websites for many clients was maintaining a separate backend per site. Every client wanted different content types, their own editors with their own permissions, and their own billing. A codebase per client means every fix has to be applied everywhere.
الحلّ المعتمد
One centralised backend where content structure is data rather than code. A client defines a collection with its own fields from the dashboard and starts storing rows immediately, with no migration and no deploy. Each site is a tenant with its own users, per-resource permission grants, trilingual content, and an independent subscription with invoicing and gateway payment.
بنية النظام
Schema as data: collections declare their fields, items store shapes against them. Three roles plus five per-resource grant lists, so permissions are per-collection rather than global. Full subscription lifecycle with invoice generation and gateway integration.
ومع كل قرار ثمنه
القرار الذي لا يُذكر ثمنه مجرّد تفضيل شخصي.
01
السبب
فكرة المنتج كلّها أن يعرّف العملاء أنواع محتواهم بأنفسهم. وحفظ تعريفات الحقول كبيانات هو ما يسمح بإضافة عميل جديد دون نشر نسخة جديدة من النظام.
الثمن
لا يمكن إنشاء فهارس لحقول المحتوى، لأن أسماءها غير معروفة مسبقاً. كما يجب بناء التحقّق من أن كل قيمة تطابق نوعها المعلَن داخل التطبيق، بدل الاعتماد على قاعدة البيانات في ذلك.
02
السبب
الاشتراك والفاتورة يُنشآن قبل الاتصال ببوابة الدفع. فإذا فشلت البوابة، يجب إلغاء الاثنين، وإلا بقي اشتراك معلّق لا تقابله أي دفعة.
الثمن
عمليّتان للتراجع بدل معاملة واحدة. وهذا ثمن التعامل مع نظام خارجي لا يعرف شيئاً عن معاملاتك.
03
السبب
A payment gateway that stops responding must fail fast rather than hold a request open, because the retry path is safe and the hung path is not.
الثمن
A slow but successful response can be abandoned, which webhook reconciliation resolves.
النتيجة
A new client site onboards without touching the codebase. One deployment serves all of them, so a fix ships once instead of per site.