# moanwer/alshahiid-system architecture

> Architecture diagram of the GitHub repository moanwer/alshahiid-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/moanwer/alshahiid-system
- Repository: https://github.com/moanwer/alshahiid-system

## Overview

##### 1) Repository scope
This repository contains only a product README and license, so it does not expose implementation code, frameworks, or deployment manifests. The architecture below is therefore the **conceptual system architecture implied by the documentation**, not a code-level one.

##### 2) Overall system shape
The README describes a **single integrated, data-centric management system** for martyr records and related beneficiary services. The system is organized as a **central application with many domain modules sharing one underlying database and common navigation/authentication layer**.

##### 3) Client-facing entry point
The first boundary is a **login portal**. After authentication, users land on a **home dashboard** that acts as the control center for all modules. The system is described as browser-based and responsive, with print/export behavior throughout the modules.

##### 4) Identity and access control
Access is role-based with at least three roles:
- **Regular User**: limited operational access
- **Supervisor**: broader family-management access
- **Admin**: full access, including system settings and backups

This implies a shared authorization layer guarding every module, plus per-user activity tracking and daily usage stats.

##### 5) Core master-data subsystem
The central data model is anchored by **Martyrs**, **Families**, and **Family Members**. These are not isolated lists; they are linked records:
- a martyr links to one or more family records
- a family links to its members
- family members can link to education, insurance, medical, and document subrecords

This is the main relational backbone of the system.

##### 6) Beneficiary service subsystems
Several modules hang off the core family/person records and represent service delivery:
- **Educational Services**
- **Orphans**
- **Injured Personnel**
- **Widows**
- **Care & Support** services such as assistance, treatment, insurance, sponsorships
- **Spiritual Development** programs such as circles, camps, seminars, Hajj/Umrah, family communication

These modules appear to use the same pattern: searchable registries, status tracking, cost/contribution fields, and printable lists.

##### 7) Reporting and analytics layer
Reporting is a major subsystem, not a side feature. The README lists **17+ report templates** covering martyrs, orphans, education, sponsorships, medical services, disability, housing, and overall financial summaries. Reports are generated from the shared operational data and filtered by fields like sector, locality, year, and month.

##### 8) Administration and system operations
The admin boundary includes:
- **User management**
- **System settings**
- **Database backup and restore**

Backup/restore is described as a full database export/import workflow with validation and confirmation, which means operational resilience is built into the admin layer rather than into each module.

##### 9) Shared data flow
The primary data flow is:
1. User logs in
2. Dashboard routes them to a domain module
3. Module reads/writes records in the central datastore
4. Linked records are traversed across domains
5. Reports aggregate the same source data
6. Admins can export or restore the database

Search, filtering, sorting, printing, and auditing are cross-cutting behaviors applied across most modules.

##### 10) Architectural boundaries to draw
For an architecture diagram, the most important boundaries are:
- **Authentication/authorization boundary**
- **Core master records boundary**: martyrs, families, members
- **Service delivery boundary**: education, health, support, spiritual programs
- **Reporting boundary**
- **Administration/backup boundary**
- **Shared persistence layer** underneath all of the above

##### 11) Important inference about technology
The README strongly suggests a **centralized CRUD information system** rather than a microservices design. No specific frontend, backend, database, or cloud platform is named in the repo, so those should not be drawn as confirmed technologies.

##### 12) What is not visible in this repo
Because there is no source tree beyond the README, the repository does not reveal:
- actual database schema
- service decomposition
- API contracts
- frontend framework
- deployment topology
- integration with external systems

So the safest diagram is a **single monolithic business application with a shared database and modular domain areas**.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access Layer"]
  node_portal(("Login Portal<br/>entry"))
  node_dashboard["Home Dashboard<br/>navigation"]
  node_auth{{"Access Control<br/>rbac"}}
  node_audit["Activity Tracking<br/>audit"]
end

subgraph group_core["Core Records"]
  node_martyrs[("Martyrs<br/>master record")]
  node_families[("Families<br/>linked record")]
  node_members[("Family Members<br/>person record")]
  node_docs["Documents<br/>attachments"]
end

subgraph group_services["Beneficiary Services"]
  node_education["Education<br/>service module"]
  node_orphans["Orphans<br/>service module"]
  node_injured["Injured<br/>service module"]
  node_widows["Widows<br/>service module"]
  node_support["Care Support<br/>support module"]
  node_spiritual["Spiritual Dev.<br/>program module"]
end

subgraph group_reporting["Reporting"]
  node_reports["Reports<br/>analytics"]
  node_filters["Report Filters<br/>criteria"]
  node_export["Print/Export<br/>output"]
end

subgraph group_ops["Administration"]
  node_admin["System Admin<br/>ops console"]
  node_users[("User Mgmt<br/>admin module")]
  node_settings["Settings<br/>config"]
  node_backup{{"Backup/Restore<br/>resilience"}}
  node_database[("Shared Database<br/>persistence")]
end

node_portal -->|"sign in"| node_auth
node_auth -->|"allow access"| node_dashboard
node_dashboard -->|"open"| node_martyrs
node_dashboard -->|"open"| node_education
node_dashboard -->|"open"| node_reports
node_dashboard -->|"open"| node_admin
node_auth -->|"scope"| node_audit
node_martyrs -->|"links"| node_families
node_families -->|"contains"| node_members
node_members -->|"attaches"| node_docs
node_members -->|"serves"| node_education
node_members -->|"serves"| node_injured
node_members -->|"serves"| node_widows
node_members -->|"serves"| node_support
node_members -->|"serves"| node_spiritual
node_reports -->|"uses"| node_filters
node_reports -->|"outputs"| node_export
node_reports -->|"reads"| node_database
node_admin -->|"manages"| node_users
node_admin -->|"configures"| node_settings
node_admin -->|"operates"| node_backup
node_users -->|"governs"| node_auth
node_backup -->|"exports/imports"| node_database
node_martyrs -->|"stores"| node_database
node_families -->|"stores"| node_database
node_members -->|"stores"| node_database
node_education -->|"stores"| node_database
node_support -->|"stores"| node_database
node_spiritual -->|"stores"| node_database
node_audit -->|"logs"| node_database

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_portal,node_dashboard,node_auth,node_audit toneBlue
class node_martyrs,node_families,node_members,node_docs toneAmber
class node_education,node_orphans,node_injured,node_widows,node_support,node_spiritual toneMint
class node_reports,node_filters,node_export toneRose
class node_admin,node_users,node_settings,node_backup,node_database toneIndigo
```

## Components

### Access Layer

Login, roles, and dashboard entry

- **Login Portal**: entry · Authentication entry point for all users
- **Home Dashboard**: navigation · Main control center after login
- **Access Control**: rbac · Role-based permissions for users, supervisors, and admins
- **Activity Tracking**: audit · Tracks user activity and daily usage stats

### Core Records

Master data for martyrs and linked families

- **Martyrs**: master record · Primary beneficiary and martyr registry
- **Families**: linked record · Family records associated with martyrs
- **Family Members**: person record · Individuals linked to family and service data
- **Documents**: attachments · Supporting documents tied to family members

### Beneficiary Services

Operational domain modules built on shared records

- **Education**: service module · Educational services and support tracking
- **Orphans**: service module · Orphan beneficiary management
- **Injured**: service module · Injured personnel records and services
- **Widows**: service module · Widow beneficiary management
- **Care Support**: support module · Assistance, treatment, insurance, and sponsorship workflows
- **Spiritual Dev.**: program module · Circles, camps, seminars, Hajj/Umrah, and communication programs

### Reporting

Filtered exports and summary templates

- **Reports**: analytics · Report generation across operational domains
- **Report Filters**: criteria · Filtering by sector, locality, year, month, and status
- **Print/Export**: output · Printable and exportable module outputs

### Administration

User management and system operations

- **System Admin**: ops console · Administrative control area for the platform
- **User Mgmt**: admin module · Creates and manages user accounts and roles
- **Settings**: config · System configuration and operational parameters
- **Backup/Restore**: resilience · Database export, validation, and restore workflow
- **Shared Database**: persistence · Single central datastore used by all modules

## Connections

- Login Portal → Access Control: sign in · Users authenticate before accessing the system
- Access Control → Home Dashboard: allow access · Authorized users reach the dashboard
- Home Dashboard → Martyrs: open · Dashboard routes into core record management
- Home Dashboard → Education: open · Dashboard routes into service modules
- Home Dashboard → Reports: open · Dashboard routes into reporting
- Home Dashboard → System Admin: open · Admins access operational controls from the dashboard
- Access Control → Activity Tracking: scope · Role-controlled activity tracking across the application
- Martyrs → Families: links · Martyr records connect to family records
- Families → Family Members: contains · Families contain linked members
- Family Members → Documents: attaches · Members can have supporting documents
- Family Members → Education: serves · Member records support educational workflows
- Family Members → Injured: serves · Member records support injury-related workflows
- Family Members → Widows: serves · Member records support widow-related workflows
- Family Members → Care Support: serves · Member records support care and assistance workflows
- Family Members → Spiritual Dev.: serves · Member records support spiritual development programs
- Reports → Report Filters: uses · Reports are generated with shared filters
- Reports → Print/Export: outputs · Reports are printable and exportable
- Reports → Shared Database: reads · Reporting aggregates the shared operational data
- System Admin → User Mgmt: manages · Admin area controls users and roles
- System Admin → Settings: configures · Admin area manages system settings
- System Admin → Backup/Restore: operates · Admin area runs backup and restore workflows
- User Mgmt → Access Control: governs · User management feeds the authorization layer
- Backup/Restore → Shared Database: exports/imports · Backup and restore operate on the central database
- Martyrs → Shared Database: stores · Core records persist in the shared datastore
- Families → Shared Database: stores · Family records persist in the shared datastore
- Family Members → Shared Database: stores · Member records persist in the shared datastore
- Education → Shared Database: stores · Service modules write to the shared datastore
- Care Support → Shared Database: stores · Support workflows write to the shared datastore
- Spiritual Dev. → Shared Database: stores · Program workflows write to the shared datastore
- Activity Tracking → Shared Database: logs · User activity data is retained centrally
