Database Documentation

Management System — Documentation

Technical and operational documentation for the Coptic Aid Foundation internal management system.

System Overview

The Coptic Aid Foundation management system is a planned internal web application that will replace the current manual tracking processes. It manages the full lifecycle of beneficiary families and university students across Egypt — from initial screening through monthly payments, annual reviews, and graduation.

  • System URL: app.copticaidfoundation.org (planned)
  • Login: Google Workspace accounts (@copticaidfoundation.org) — no separate passwords
  • Status: In design phase — not yet built
  • Estimated cost: ~$0 to start / ~$25–50 USD/month at scale

Geographic Hierarchy

The system mirrors Egypt's administrative structure, anchored to the Coptic Church network:

Governorate → City/District → Neighbourhood/Village → Church → Family

Each service area is anchored to the nearest local Coptic church. Money transfers go to the diocese or bishop's bank account as standard practice. When starting a new area, a temporary manager from another area can be assigned until the local structure is complete.

Team Roles

A person's title (Father, Deacon, Bishop, Mr., Ms.) is their ecclesiastical or civil title and is entirely separate from their functional system role. Any person with any title can hold any system role.

Egypt Team

Egypt

Volunteer

Field work, data entry, beneficiary profile completion. Prints and submits monthly reports and expense invoices to Coordinator.

Egypt

Coordinator

Manages volunteers, assigns cases, reviews reports and expenses, monitors area budget. Submits all requests to Canadian Sponsor. Never submits directly to the board.

Egypt

Area Director

Area authority — usually a bishop, sometimes a priest. Receives money transfers, records exchange rate. Full visibility of area data. Can delegate but retains override rights.

Canada Team

Canada

Sponsor

Manages 1+ areas. Reviews and approves/rejects individual beneficiaries. Monitors balance. Submits transfer requests. Foundation-wide analytics.

Canada

Board Member

All Sponsor capabilities plus ability to increase area quota directly. Implicitly includes Sponsor role — no need to assign both.

Canada

President

Full access. Approves transfer requests and quota changes. Fast-tracks urgent or private cases directly.

Canada

Treasurer

Full financial visibility. Executes transfers after President approval. Notifies Sponsors of transfer status. Generates PDF documentation. Updates system-wide payment amounts (with board approval).

Canada

Secretary

Uploads and archives board meeting minutes PDFs with meeting date. System auto-links approvals to minutes.

Canada

Admin

Unrestricted access. System configuration. User and role management. Manages field library, expense categories, life event types, rejection reason codes.

User Creation Approval Chain

Role to createWho approves
Admin, President, Board Member, Treasurer, Secretary, SponsorAdmin only
Area Director, CoordinatorSponsor / Board Member / President / Admin
VolunteerCoordinator / Area Director / Admin

Programs & Services

ProgramDetails
Monthly Financial AidEGP 1,000/month per family. Disbursed at start of each month without interruption — even if a donor stops giving.
University Student StipendEqual to monthly family payment (EGP 1,000/month). Activated on university enrollment, stopped on graduation or dropout. No cap on students per family — each receives a full stipend.
Feast GrantsEGP 1,300 × 2/year — Christmas and Easter.
Emergency ReliefEmergency cash transfers, clothing, shelter for acute need.
Small Business Projects$200–$500 CAD per project. Sewing machines, tools, livestock, grocery supplies. Goal: family independence.
Community SupportMarriage support (~10 years active). Housing needs (no roof, no sanitation, no furnishings).

Financial Summary

  • Monthly payment per family: EGP 1,000/month
  • Annual support per family: ~CAD 340/year
  • Administrative overhead: less than 2% — 98¢ of every dollar reaches families

Beneficiary Lifecycle

Family Status Values

StatusMeaning
Pending Bulk ApprovalAwaiting board vote on area quota
Pending ScreeningBulk approved; individual profile submitted, awaiting Sponsor review
ActiveFully approved and receiving regular monthly payments
One-timeReceived a single grant with no recurring commitment
TransferredFamily relocated — full history moves to new area
GraduatedConditions improved, no longer eligible (reversible)
ArchivedAll family members deceased

Acceptance Process (Two-Stage)

  1. Stage 1 — Budget Approval: Coordinator submits bulk request (number of families + estimated cost) → Board votes (majority) or President approves for urgent cases
  2. Stage 2 — Individual Screening: Egypt collects full data → Coordinator submits to Sponsor → Sponsor reviews each case individually and approves or rejects

Beneficiary Data Collected

  • Family head: Full name, address, DOB, marital status, employment, National ID, linked church, sponsoring priest, assigned follower, aid distribution method
  • Dependants: Name, DOB, relationship, employment/income, education level, medical conditions, monthly medical costs
  • Housing: Ownership type, property type, condition, monthly rent
  • Income & Expenses: Sources (government welfare, pension, employment, other charities), monthly medical expenses per member

Key Workflows

1. New Area Activation

Identify geographic area → identify nearest church → build local org structure. Temporary manager from another area can be assigned until local structure is complete.

2. Accepting a New Family

Coordinator submits bulk request → Board vote (or President for urgent) → individual screening by Sponsor → activation. Coordinator never submits directly to the board.

3. University Student Stipend Activation

Follower flags university enrollment → system notifies → Follower attaches student ID card → stipend activated. Stopped on graduation or dropout.

4. Special Grant Request (Life Event)

Coordinator submits with notes, suggested amount, supporting documents → Sponsor/Board Member can reject directly → Board approval required for approval → President can approve urgent/private cases directly.

5. Monthly Reporting & Aid Distribution

Area Director builds reports → aid distributed via home visits or monthly gathering → signed reports scanned and uploaded → Sponsor closes the month. System prevents any family appearing in more than one report.

6. Financial Transfer

System alerts when balance approaches minimum → Sponsor submits transfer request → President approves → Treasurer executes (CAD/USD → EGP) and sends PDF → Area Director records: date, exchange rate, amount.

7. Periodic Re-evaluation

Follower reviews full family list → updates status (graduated, deceased, transferred) → reason, date, follower name logged → area budget updated.

8. Family Transfer to Another Area

Family relocates → follower updates record → full history moves to new area → new follower assigned → vacated slot immediately available without new board vote.

9. Rejection & Resubmission

Every rejection archived permanently with reason code. System auto-flags when same National ID resubmitted. Resubmission allowed — no new board vote required.

10. Quota Management

Board approves number of beneficiaries per area (not individuals). Quota permanent by default. Increase requires board vote or Board Member/President direct action — logged with meeting minutes.

Financial Transfers

  • Transfers sent in CAD or USD, received in EGP (or partially held in foreign currency)
  • Deposited to diocese or bishop's bank account (standard); priest's personal account in rare temporary exceptions
  • Each transfer covers 3–6 months of expected spending
  • System tracks balance in EGP, CAD, and USD simultaneously
  • Every exchange transaction recorded with rate and fees
  • System alerts when area balance approaches minimum threshold

Transfer Approval Chain

  1. System alert → Sponsor submits justified transfer request
  2. President approves
  3. Treasurer executes transfer and sends PDF documentation
  4. Area Director records: date, exchange rate, amount received

Payment Values

Payment amounts can only be updated by Treasurer, President, or Admin — with board approval, board meeting minutes reference, and effective date. System retains full history of all value changes for accurate historical calculations.

System Rules

  • National ID is the unique identifier for every person — no duplicates allowed
  • Every vacated slot (death, transfer, rejection) is immediately available without new board vote
  • A family cannot appear in more than one monthly report — system enforces this technically
  • Month cannot close until all active families are covered in reports or explicitly skipped with documented reason
  • Every rejection permanently archived with reason code, optional comment, date, and name of decision-maker
  • Custom fields: users can add extra fields from an admin-managed library — fields cannot be invented freely
  • Audit trail: every major action (status change, transfer, approval, rejection, role change) logged with name and timestamp
  • Minor profile edits (phone number, address) are NOT logged in audit trail
  • Notifications configured per role by Admin — both in-app and email channels

Technology Stack

ComponentChoiceNotes
User InterfaceNext.jsReact-based, fast, SEO-friendly
Database & StorageSupabase (PostgreSQL)SOC 2 certified, encrypted, region-configurable. Standard PostgreSQL — fully portable.
HostingVercelFree tier available, scales with usage
LoginGoogle Workspace@copticaidfoundation.org accounts — no separate passwords
System URLapp.copticaidfoundation.orgSeparate from public website
Estimated cost~$0 to start~$25–50 USD/month when scaled

Open Items

The following are not yet finalised and will be addressed in upcoming sessions:

  • Full list of expense categories (to be provided by team)
  • Full list of life event types and special grant types (to be provided by team)
  • Complete notification triggers per role
  • MVP planning and project roadmap
  • Database schema design

نظرة عامة على النظام

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

يتيح النظام ما يلي:

  • تسجيل بيانات الأسر المستفيدة والمتابعة الدورية لأوضاعهم
  • إدارة طلبات الدعم وسير عمليات الموافقة من مصر وكندا
  • تتبع التحويلات المالية وإدارة ميزانية كل منطقة خدمية
  • توليد التقارير الشهرية وحفظ السجلات والمستندات
  • ضمان عدم تكرار المستفيدين ومنع الاحتيال عبر التحقق من الرقم القومي

التسلسل الجغرافي والكنسي

عندما تقرر الجمعية تقديم خدماتها في منطقة جديدة، تبدأ بتحديد أقرب كنيسة لتكون النقطة المحورية للعمل الميداني.

المحافظة ← المدينة/الحي ← الحيّ السكني/القرية ← الكنيسة ← الأسرة

الأبرشية الواحدة قد تمتد على أكثر من محافظة. عند البدء في منطقة جديدة، يمكن تعيين مدير مؤقت من منطقة أخرى حتى يكتمل الهيكل التنظيمي.

الأشخاص والأدوار

لقب الشخص (أب، شماس، الأنبا...) هو لقبه الكنسي أو المدني، وهو مستقل تماماً عن دوره الوظيفي في المؤسسة. أي شخص بأي لقب يمكنه شغل أي دور وظيفي.

الفريق المصري

مصر

متطوع

العمل الميداني، إدخال البيانات، إكمال ملفات المستفيدين، طباعة وإرسال التقارير الشهرية وفواتير المصروفات للمنسق.

مصر

منسّق

يُدير المتطوعين، يُوزّع الحالات، يُراجع التقارير والمصروفات، يرصد ميزانية المنطقة. يُقدّم جميع الطلبات للراعي الكندي — لا يُقدّم مباشرة للمجلس.

مصر

مدير المنطقة

سلطة المنطقة (عادةً أسقف، وأحياناً كاهن أو خادم). يستلم التحويلات المالية، رؤية كاملة على المنطقة. يمكنه التفويض لكنه يحتفظ بحق التجاوز.

الفريق الكندي

كندا

راعي

يُدير منطقة أو أكثر. يوافق/يرفض المستفيدين الأفراد. يرصد الرصيد. يُقدّم طلبات التحويل. تحليلات على مستوى المؤسسة.

كندا

عضو المجلس

كل ما يفعله الراعي + صلاحية رفع حصة المنطقة مباشرة. دور عضو المجلس يشمل ضمنياً دور الراعي.

كندا

الرئيس

صلاحية كاملة على كل شيء. يوافق على طلبات التحويل وتغييرات الحصة. يُسرِّع الحالات العاجلة أو الخاصة.

كندا

أمين الصندوق

رؤية كاملة على البيانات المالية. ينفّذ التحويلات بعد موافقة الرئيس. يُصدر وثائق PDF. يُحدّث قيم المدفوعات بموافقة المجلس.

كندا

السكرتير

يرفع ويحفظ محاضر اجتماعات المجلس بصيغة PDF مع تاريخ الاجتماع. النظام يربط تلقائياً.

كندا

المسؤول (Admin)

صلاحيات غير محدودة. إعداد النظام. إدارة المستخدمين والأدوار. مكتبة الحقول وفئات المصروفات وأكواد الرفض.

البرامج والخدمات

البرنامجالتفاصيل
الدعم المالي الشهري1000 جنيه مصري شهرياً لكل أسرة. يُصرف في بداية كل شهر دون انقطاع — حتى لو توقف الممول.
منحة الطالب الجامعيتعادل الراتب الشهري للأسرة. تُفعَّل عند التسجيل الجامعي وتوقف عند التخرج أو الانقطاع. لا حد أقصى للطلاب.
منح الأعياد1300 جنيه مصري × مرتان في السنة — عيد الميلاد وعيد القيامة.
الإغاثة الطارئةتحويلات نقدية عاجلة، ملابس، مأوى للاحتياجات الحادة.
المشاريع الصغيرة200–500 دولار كندي للمشروع. ماكينات خياطة، أدوات ورش، مواشي، بقالة. الهدف: الاستقلالية.
دعم المجتمعمساندة تجهيز بيت العروس (~10 سنوات). احتياجات السكن (بدون سقف أو صرف صحي أو أثاث).

دورة حياة المستفيد

حالات الأسرة

الحالةالمعنى
في انتظار الموافقة المبدئيةفي انتظار تصويت المجلس على حصة المنطقة
في انتظار المراجعة الفرديةتمت الموافقة المبدئية؛ الملف مُقدَّم وبانتظار مراجعة الراعي
فاعلموافقة كاملة ويتلقى مدفوعات منتظمة
دعم لمرة واحدةتلقى منحة واحدة دون التزام شهري
منقولانتقلت الأسرة؛ السجل الكامل ينتقل معها
خرج من الاستحقاقتحسّنت ظروفه ولم يعد مؤهلاً (قابل للعودة)
مؤرشفجميع أفراد الأسرة متوفون

مرحلتا قبول مستفيد جديد

  1. المرحلة الأولى — موافقة مبدئية: المنسق يُقدّم عدد الأسر والتكلفة المقدّرة ← المجلس يصوّت أو الرئيس يوافق في الحالات العاجلة
  2. المرحلة الثانية — مراجعة فردية: جمع البيانات التفصيلية ← الراعي يراجع كل حالة على حدة ويوافق أو يرفض

سير العمل الرئيسي

١. تفعيل منطقة خدمية جديدة

تحديد المنطقة الجغرافية ← تحديد أقرب كنيسة ← بناء الهيكل التنظيمي المحلي. إمكانية تعيين مدير مؤقت.

٢. قبول أسرة مستفيدة جديدة

طلب جماعي من المنسق ← تصويت المجلس ← جمع البيانات ← مراجعة الراعي ← تفعيل الأسرة.

٣. تفعيل منحة الطالب الجامعي

إعلام المتابع عن التسجيل ← إشعار النظام ← إرفاق بطاقة الطالب ← تفعيل المنحة. تُوقَف عند التخرج أو الانقطاع.

٤. طلب منحة استثنائية

المنسق يُقدّم الطلب ← الراعي/عضو المجلس يمكنهما الرفض مباشرة ← الموافقة تستلزم قرار المجلس ← الرئيس يوافق على الحالات العاجلة.

٥. التقارير الشهرية وتوزيع المساعدات

مدير المنطقة يُعدّ التقارير ← التوزيع (زيارة منزلية أو تجمّع شهري) ← رفع التقارير الموقّعة ← الراعي يُغلق الشهر.

٦. طلب تحويل مالي

تنبيه النظام ← الراعي يُقدّم الطلب ← الرئيس يوافق ← أمين الصندوق ينفّذ ← المدير يُسجّل التفاصيل.

٧. إعادة التقييم الدوري

المتابع يراجع قائمة أسره ← يُحدّث الحالة مع السبب والتاريخ ← تتأثر ميزانية المنطقة.

٨. نقل أسرة إلى منطقة أخرى

تحديث السجل ← السجل الكامل ينتقل ← تعيين متابع جديد ← المقعد الشاغر متاح فوراً.

٩. الرفض وإعادة التقديم

كل رفض يُحفظ بشكل دائم. النظام يُنبّه عند إعادة تقديم نفس الرقم القومي. إعادة التقديم ممكنة دون تصويت جديد.

١٠. إدارة حصة المنطقة

المجلس يوافق على عدد المستفيدين (وليس أفراداً بعينهم). الحصة مفتوحة دائماً. الزيادة تستلزم تصويت المجلس أو قرار مباشر من عضو المجلس/الرئيس.

تدفق المال

  • يُرسَل التحويل بالكاد أو الدولار الأمريكي ويُستلم بالجنيه المصري
  • يُودَع في حساب الأبرشية أو الأسقف (القاعدة)
  • كل تحويل يغطي من 3 إلى 6 أشهر من الإنفاق المتوقع
  • النظام يتتبع الرصيد بالجنيه المصري والكاد والدولار في آن واحد
  • كل عملية صرف تُسجَّل مع سعر الصرف والرسوم

سلسلة الموافقة على التحويل

  1. تنبيه النظام ← الراعي يُقدّم طلب التحويل
  2. الرئيس يوافق على الطلب
  3. أمين الصندوق ينفّذ التحويل ويُرسل وثيقة PDF للتوثيق
  4. المدير يُسجّل التحويل المستلم: التاريخ وسعر الصرف والمبلغ

قواعد النظام

  • الرقم القومي هو المعرّف الفريد لكل شخص — لا يُسمح بالتكرار في قاعدة البيانات
  • كل مقعد شاغر (وفاة، نقل، رفض) يُتاح فوراً دون تصويت جديد
  • لا يمكن إدراج أسرة في أكثر من تقرير شهري واحد — النظام يمنع ذلك تقنياً
  • لا يمكن إغلاق الشهر إلا بعد تغطية جميع الأسر الفاعلة أو استثنائها بسبب موثّق
  • كل رفض يُحفظ بشكل دائم مع كود السبب والتاريخ واسم صاحب القرار
  • سجل التدقيق: كل إجراء رئيسي يُسجَّل مع اسم المنفّذ وتوقيت التنفيذ

التقنية

المكوّنالتفاصيل
واجهة المستخدمNext.js
قاعدة البيانات والتخزينSupabase (PostgreSQL) — معتمد SOC 2، مشفّر
الاستضافةVercel
تسجيل الدخولGoogle Workspace (@copticaidfoundation.org) — لا كلمات مرور منفصلة
عنوان النظامapp.copticaidfoundation.org
التكلفة التقديريةصفر تقريباً في البداية / 25–50 دولاراً شهرياً عند التوسع

البنود المفتوحة

  • قائمة تفصيلية بفئات المصروفات (ستُقدَّم من الفريق)
  • قائمة كاملة بأنواع الأحداث الحياتية والمنح الاستثنائية (ستُقدَّم من الفريق)
  • قائمة كاملة بإشعارات النظام لكل دور
  • تخطيط مراحل التطوير (MVP) وخارطة الطريق
  • تصميم مخطط قاعدة البيانات

هذه الوثيقة مسودة أولى للمراجعة الداخلية. أي ملاحظات أو تصحيحات يُرجى إرسالها للفريق المعني.