Connecting mosques and communities
📖 Help Center & User Manual · Documentation Version 1.0

Kariahku.com User Manual & Help Center

Official step-by-step documentation for the Kariahku.com Multi-Tenant Mosque Management System.

Kariahku.com Multi-Tenant Mosque Management System

Complete Kariahku.com User Manual

Official step-by-step documentation for the Kariahku.com Multi-Tenant Mosque Management System.

Documentation Version: 1.0
Generated On: 2026-12-05 00:18 UTC
Articles: 36

Table of Contents

  1. [SEC-A1] About Kariahku.com, System Objectives, Main Features & Community Benefits — Section A: Introduction to Kariahku.com
  2. [SEC-A5] Multi-Tenant System Concept, System Requirements & Supported Browsers/Devices — Section A: Introduction to Kariahku.com
  3. [SEC-A8] Understanding the User Interface, System Navigation & Terminology Glossary — Section A: Introduction to Kariahku.com
  4. [SEC-B1] Accessing Kariahku.com, Registering User Accounts & Email Verification Status — Section B: Getting Started & Account Access
  5. [SEC-B4] Logging In, Logging Out Securely & Resetting a Forgotten Password — Section B: Getting Started & Account Access
  6. [SEC-B7] Updating User Profile, Changing Passwords, Selecting Language & Understanding Dashboards — Section B: Getting Started & Account Access
  7. [SEC-04A] Platform Management & Mosque Management Roles (Including Non-Existent Role Clarifications) — Section 4: User Roles and Permissions
  8. [SEC-04C] Government / Religious Authority Roles (MAIN & JAKIM) and Community Users — Section 4: User Roles and Permissions
  9. [SEC-04E] Role-Permission Matrix & Managing Permissions at /admin/permissions — Section 4: User Roles and Permissions
  10. [SEC-05A] Registering a Mosque (/register-mosque) & Platform Verification (/admin/mosques) — Section 5: Mosque Registration and Management
  11. [SEC-05B] Mosque Profile Management, Contact Info, State/District & Location (/mosque-admin/profile) — Section 5: Mosque Registration and Management
  12. [SEC-05C] Mosque Microsite Branding, Logo, Photographs & Mosque-Specific Settings (/mosque-admin/website) — Section 5: Mosque Registration and Management
  13. [SEC-05D] Managing Mosque Committee Members (AJK), Announcements, Articles, Events & Gallery — Section 5: Mosque Registration and Management
  14. [SEC-05E] Managing Mosque Administrators, Workspace Staff & Tenant Isolation (/mosque-admin/members) — Section 5: Mosque Registration and Management
  15. [SEC-06A] Registering as a Kariah Member & Selecting a Mosque (/kariah-register) — Section 6: Kariah Member Management & Residential Area Classification
  16. [SEC-06B] Residential Area Classification: State, District, Locality/Mukim, Kampung, Taman & Street (/mosque-admin/kariah-areas) — Section 6: Kariah Member Management & Residential Area Classification
  17. [SEC-06C] Member Verification, Approving Applications & Duplicate Detection (/mosque-admin/kariah-members) — Section 6: Kariah Member Management & Residential Area Classification
  18. [SEC-06D] Managing Member Profiles, Searching, Filtering by Area, Status Transitions & CSV Reports — Section 6: Kariah Member Management & Residential Area Classification
  19. [SEC-07A] Creating, Updating & Scheduling Mosque Activities (/mosque-admin/activities) — Section 7: Mosque Activities and Programmes
  20. [SEC-07B] Managing Activity Categories & Featuring Portal Activities (/admin/activity-categories & /admin/featured-activities) — Section 7: Mosque Activities and Programmes
  21. [SEC-07C] Viewing Upcoming Programmes, Calendar, ICS Export & Participant/Attendance Status (/activities) — Section 7: Mosque Activities and Programmes
  22. [SEC-08A] Mosque Prayer Time Zone Configuration & Daily/Monthly Display (/mosque-admin/prayer & /prayer-times) — Section 8: Prayer Times Management
  23. [SEC-08B] Automatic Prayer Time Sync, JAKIM e-Solat Source & Troubleshooting (/admin/prayer-times) — Section 8: Prayer Times Management
  24. [SEC-09A] Mosque Financial Management: Current Implementation Status & Privacy Governance — Section 9: Mosque Financial Management (Current Status)
  25. [SEC-10A] Khairat, Qurban & Aqiqah, Committee Election & Other Integrated Systems (Current Status) — Section 10: Khairat, Qurban and Other Integrated Systems
  26. [SEC-11A] Free One-Month Trial, Subscription Plans & Annual Discounts (/mosque-admin/subscription) — Section 11: Subscription and Billing Management
  27. [SEC-11C] Payment Management, Invoices & Receipts PDF, Failed Payments & Reactivation — Section 11: Subscription and Billing Management
  28. [SEC-11D] Platform Billing Administration: Plans, Fees, Discounts, Payment Review & Revenue Reports (/admin/subscriptions & /admin/payments) — Section 11: Subscription and Billing Management
  29. [SEC-12A] Majlis Agama Islam Negeri (MAIN) Dashboard: State Statistics, District Filters & Reports (/main/dashboard & /main/reports) — Section 12: Majlis Agama Islam Negeri (MAIN) Dashboard
  30. [SEC-12B] Understanding MAIN Data Access Restrictions & State Subscription Billing (/main/subscription) — Section 12: Majlis Agama Islam Negeri (MAIN) Dashboard
  31. [SEC-13A] JAKIM National Dashboard: National Statistics, State-by-State Summaries & Report Export (/jakim/dashboard & /jakim/reports) — Section 13: JAKIM National Dashboard
  32. [SEC-13B] Difference Between JAKIM National Reporting Access & MAIN State-Level Access (/jakim/subscription) — Section 13: JAKIM National Dashboard
  33. [SEC-14A] Platform Reports (/admin/reports), Billing Revenue Reports & Mosque Kariah Member Reports — Section 14: Reporting and Data Export
  34. [SEC-14B] Complete Reference of Institutional Reports (MAIN & JAKIM): Filters, Data Sources, CSV & PDF — Section 14: Reporting and Data Export
  35. [SEC-19A] Troubleshooting & System Error Message Reference Guide — Section 19: Troubleshooting, Error Guide & Manual Administration
  36. [SEC-17A] User Manual Content Administration (/admin/manual): Articles, Translations, Screenshots & Revisions — Section 19: Troubleshooting, Error Guide & Manual Administration
SEC-A1 · Section A: Introduction to Kariahku.com ✓ Fully Implemented

About Kariahku.com, System Objectives, Main Features & Community Benefits

Comprehensive overview of the Kariahku.com multi-tenant mosque management ecosystem, system objectives, implemented modules, and benefits for mosques and communities.

Purpose of Function Provide mosque administrators, kariah members, religious authority officers, and public visitors with an accurate understanding of the Kariahku.com platform.
Prerequisites No login account is required. Accessible via any modern web browser.
Required User Permissions Public Access (No Login Required)

1. About Kariahku.com

Kariahku.com is a Multi-Tenant Mosque Management System that unifies a nationwide mosque directory, dedicated mosque microsites, residential-area-based kariah membership management, programme scheduling, official JAKIM e-Solat prayer times, and aggregate institutional reporting for State Islamic Religious Councils (MAIN) and JAKIM.

2. System Objectives

  1. Digital Standardization: Equip every registered masjid, surau, and surau Jumaat with an official microsite at /masjid/{slug} without requiring separate hosting.
  2. Jurisdiction-Aware Governance: Enforce strict tenant isolation between mosques (by mosque_id) and state jurisdiction boundaries for MAIN institutions (by state_id).
  3. Authoritative Prayer Schedules: Synchronize prayer times exclusively from the official JAKIM e-Solat service rather than unverified manual entry.
  4. Full Trilingual Accessibility: Deliver Bahasa Melayu (default), English, and Arabic (with full right-to-left layout) across the platform.

3. Implemented Core Features

  • Public Portal & CMS: Mosque directory search by state/district, featured announcements, and trilingual CMS pages (/about, /features, /benefits, /faq, /contact).
  • Mosque Registration & Verification: Public application form (/register-mosque) with supporting document upload and platform review workflow (/admin/mosques).
  • Mosque Microsite & Editorial Content: Profile management, logo, cover banner, theme colors, committee (AJK) list, announcements, articles, events, and photo gallery.
  • Kariah Membership & Residential Areas: Public kariah registration (/kariah-register), hierarchical residential areas (Locality/Mukim, Kampung, Taman, Street), application review, duplicate detection, and CSV export.
  • Activities & Prayer Times: Recurring activity scheduling, ICS calendar feeds, and automated JAKIM e-Solat synchronization.
  • Subscriptions, Billing & Authority Dashboards: 1-month free trial, toyyibPay and manual transfer payments, and aggregate MAIN and JAKIM dashboards.

4. Benefits for Mosques and Communities

  1. For Mosques: Streamlines kariah member records organized by kampung, taman, and street, publishes programmes, and maintains an official web presence.
  2. For Kariah Members & Public: Provides verified daily prayer times, searchable mosque programmes, and privacy-respecting online kariah membership applications (without requiring national IC numbers).
  3. For Religious Authorities (MAIN & JAKIM): Offers real-time aggregate visibility into registered mosques and community activities while preserving individual member privacy.
Kariahku.com public portal homepage featuring mosque search, official JAKIM prayer times, and activities.
Kariahku.com public portal homepage featuring mosque search, official JAKIM prayer times, and activities.

Input Fields & Options Reference

Portal ComponentURL RoutePrimary Function
Portal Homepage/{lang}Quick mosque search, upcoming activities, prayer times, and portal announcements.
Mosque Directory/{lang}/mosquesSearchable directory of active registered mosques filtered by State and District.
Activities Directory/{lang}/activitiesNationwide mosque programme listing and monthly calendar view.
Prayer Times/{lang}/prayer-timesDaily and monthly prayer time schedules by official JAKIM zone or mosque.
Expected Results: Users understand the exact scope of Kariahku.com and can navigate to the modules relevant to their role.
Important Notes & Data Boundaries: Mosque Financial Management, Khairat, Qurban/Aqiqah, and Mosque Committee Election modules are registered as disabled future placeholders and are not active in the current release.

Common Errors & Troubleshooting

If the portal displays in an unexpected language, click BM, EN, or AR in the top utility bar to switch and persist your preferred language.

SEC-A5 · Section A: Introduction to Kariahku.com ✓ Fully Implemented

Multi-Tenant System Concept, System Requirements & Supported Browsers/Devices

Detailed explanation of how multiple mosques operate independently within Kariahku.com, client system requirements, and supported browsers and devices.

Purpose of Function Ensure mosque administrators and authority users understand tenant data isolation guarantees and technical prerequisites.
Prerequisites Active internet connection and a modern standards-compliant web browser.
Required User Permissions Public Access / All Authenticated Roles

1. Multi-Tenant System Concept

Within Kariahku.com, each registered mosque operates as an independent tenant uniquely identified by its database key mosque_id and public URL slug:

  1. Strict Tenant Data Partitioning: Every operational mosque table—including mosque_users, mosque_settings, mosque_announcements, mosque_committees, mosque_editorial_items, mosque_activities, mosque_kariah_areas, and kariah_members—is scoped directly to the owning mosque_id.
  2. Server-Side Tenant Authorization: When a Mosque Administrator accesses /mosque-admin/*, require_mosque_permission() verifies an active assignment in mosque_users for that exact mosque. Any cross-tenant access attempt is rejected with HTTP 403 Forbidden and logged in audit_logs.
  3. Independent Tenant Billing: Each mosque maintains its own billing customer record (billing_customers) and subscription lifecycle (subscriptions) without affecting other mosques.

2. System Requirements

  • Network Connectivity: Broadband or mobile data connection (2 Mbps or higher recommended when uploading PDF/image attachments).
  • Screen Resolution: Fully responsive across smartphones (360px+), tablets (768px+), and desktop monitors (1280px+).
  • Browser Cookies: First-party session cookies (`HttpOnly`, `SameSite=Lax`) must be enabled for login sessions and CSRF protection.

3. Supported Browsers and Devices

  • Desktop (Windows, macOS, Linux): Google Chrome (109+), Microsoft Edge (109+), Mozilla Firefox (115+), Apple Safari (16+).
  • Mobile & Tablet: Chrome for Android 10+, Safari for iOS / iPadOS 15+.
  • Printing & PDF: Native browser print (`Ctrl+P` / `Cmd+P`) and built-in PDF download for invoices, receipts, institutional reports, and user manual guides.
Kariahku.com multi-tenant architecture and strict tenant data isolation model.
Kariahku.com multi-tenant architecture and strict tenant data isolation model.

Input Fields & Options Reference

Tenant LayerAccess Control TableData Boundary
Global Platformuser_roles + role_permissionsPlatform-wide scope according to assigned global permissions.
Mosque Tenantmosque_users (mosque_id)Restricted strictly to records belonging to the authorized mosque.
MAIN Institutioninstitution_users + institution_state_accessAggregate records of registered mosques within the verified state only.
JAKIM Institutioninstitution_users (nationwide)Aggregate records of registered mosques across all 16 states/territories.
Expected Results: Administrators and users understand how tenant boundaries protect mosque data and verify that their devices meet system requirements.
Important Notes & Data Boundaries: Kariahku.com enforces a strict Content Security Policy (`script-src 'self'; style-src 'self'`). Avoid browser extensions that inject unauthorized third-party scripts.

Common Errors & Troubleshooting

If a form submission fails with an invalid request or CSRF error, verify that first-party cookies are enabled in your browser and refresh the page.

SEC-A8 · Section A: Introduction to Kariahku.com ✓ Fully Implemented

Understanding the User Interface, System Navigation & Terminology Glossary

Guide to Kariahku.com interface regions, public and administrative navigation patterns, and definitions of frequently used terminology.

Purpose of Function Help new users quickly orient themselves across public portal pages, mosque microsites, and administrative workspaces.
Prerequisites None.
Required User Permissions Public Access / All Roles

1. Understanding the User Interface

The Kariahku.com interface consists of four consistent structural regions:

  1. Top Utility Bar: Located at the very top of every page. Displays the platform tagline, quick link to the Help Center, context-sensitive Page Help button, and the BM / EN / AR language switcher.
  2. Main Header Navigation: Houses the Kariahku.com brand mark and links to Home, Mosques, Activities, Prayer Times, Register as Kariah Member, Register Mosque, User Manual, and Log In (or Dashboard & Log Out when signed in).
  3. Workspace Sidebar: Inside administrative screens (/admin/* and /mosque-admin/*), a sticky side navigation panel provides one-click switching between management modules.
  4. Portal Footer: Contains links to Privacy Policy, Terms of Use, FAQ, Mosque Registration, and the User Manual.

2. General System Navigation

  • Language-Prefixed Routes: Every localized URL follows /{lang}/{route} such as /ms/mosques, /en/mosques, or /ar/mosques.
  • Keyboard Skip Link: Pressing Tab upon loading any page reveals the Skip to content link jumping directly to #main-content.
  • Responsive Mobile Menu: On screens narrower than 992px, tap the Menu toggle button in the header to expand navigation links.

3. Frequently Used Terminology

  • Kariah: The local parish boundary served by a mosque and the Muslim community residing within that geographic area.
  • Tenant: An individual registered mosque operating an isolated workspace and record set keyed by mosque_id.
  • Microsite: A mosque’s dedicated public website hosted at /masjid/{slug}.
  • Prayer Zone: Official JAKIM e-Solat geographical zone code (e.g., WLY01, SGR01, JHR02).
  • MAIN: Majlis Agama Islam Negeri — State Islamic Religious Council authorized for state-level aggregate reporting.
  • JAKIM: Jabatan Kemajuan Islam Malaysia — Federal Islamic authority authorized for nationwide aggregate reporting across all 16 states and federal territories.
Top navigation bar, language utility bar, admin sidebar workspace, and context-sensitive help.
Top navigation bar, language utility bar, admin sidebar workspace, and context-sensitive help.

Input Fields & Options Reference

System TermTechnical & Operational Meaning
slugURL-safe unique identifier for a mosque microsite (e.g. masjid-al-hidayah).
KRH-YYYYMMDD-XXXXXXUnique reference code issued when submitting a kariah membership application.
trialing / active / past_due / grace_periodSubscription lifecycle states governing paid feature availability.
Expected Results: Users can navigate seamlessly across public and administrative interfaces and understand platform terminology.
Important Notes & Data Boundaries: When Arabic (`ar`) is active, the interface automatically switches to right-to-left (`dir="rtl"`), while technical fields such as emails, URLs, phone numbers, and postcodes remain left-to-right (`dir="ltr"`).

Common Errors & Troubleshooting

On mobile devices, wide data tables can be scrolled horizontally inside their responsive container.

SEC-B1 · Section B: Getting Started & Account Access ◐ Partially Implemented

Accessing Kariahku.com, Registering User Accounts & Email Verification Status

Step-by-step instructions for accessing Kariahku.com, understanding how login accounts are provisioned versus public Mosque/Kariah applications, and email verification status.

Purpose of Function Clarify how users access the platform and how authenticated accounts are provisioned and verified in the current Kariahku.com security architecture.
Prerequisites Modern web browser; server CLI access for provisioning new login accounts.
Required User Permissions Public Access / Global users.manage for User Administration

1. Accessing Kariahku.com

  1. Open your web browser and navigate to the platform URL (e.g., https://kariahku.com/ or http://localhost/en).
  2. The router automatically resolves your active language prefix (/ms, /en, or /ar).
  3. Public visitors can immediately browse the mosque directory, prayer times, activities, mosque registration form (/register-mosque), and kariah membership form (/kariah-register) without logging in.

2. Registering a New User Account (Current Architecture)

Important Architectural Note: To protect tenant and institutional governance, Kariahku.com does not expose a public self-service user account signup form. Instead, three distinct registration workflows exist:

  1. Provisioning Authenticated Login Accounts (users table): Login accounts for Platform Administrators, Mosque Administrators, and MAIN/JAKIM Officers are provisioned via the official management CLI:
    php database/manage.php create-user "Full Name" "user@example.my" "StrongPassword123!"
    or for a Super Administrator:
    php database/manage.php create-admin "Admin Name" "admin@kariahku.com" "StrongPassword123!"
  2. Assigning Roles & Account Status: A Super Admin signs in to /admin/users to assign global roles (super_admin or portal_admin) or toggle user status between active and suspended.
  3. Public Mosque & Kariah Applications: Mosque representatives apply at /register-mosque (linking applicant_email to an active users account upon approval), while community members apply at /kariah-register (creating records in kariah_people and kariah_members without creating a login account).

3. Email Verification Status

Implementation Status: Automated self-registration email verification links are not implemented because public self-signup for login accounts is disabled by design. Identity and eligibility verification are performed through:

  • Mosque Document Verification: Platform administrators inspect uploaded supporting documents at /admin/mosques and verify that an active users account matches applicant_email prior to approval.
  • Kariah Application Review: Mosque administrators verify and approve community member applications at /mosque-admin/kariah-members.
User account management and role assignment at /admin/users alongside public registration workflows.
User account management and role assignment at /admin/users alongside public registration workflows.

Input Fields & Options Reference

Field / ParameterLocationDescription & Validation Rules
nameCLI create-user / users.nameFull name of the account holder (up to 150 characters).
emailCLI create-user / users.emailValid unique email address (up to 254 characters, normalized to lowercase).
passwordCLI create-userMust be between 12 and 72 characters; hashed with password_hash(..., PASSWORD_DEFAULT).
status/admin/usersAccount status: active (login permitted), pending, or suspended (login blocked).
Expected Results: An active user record is created in the `users` table and can be assigned global, mosque, or institutional roles.
Important Notes & Data Boundaries: Before approving a mosque registration at `/admin/mosques`, ensure an active `users` account matching `applicant_email` has been created.

Common Errors & Troubleshooting

Error: "Create or activate the applicant user account matching applicant_email before approving this mosque."
Solution: Provision the user account via php database/manage.php create-user using the applicant’s exact email address, then approve the mosque at /admin/mosques.

SEC-B4 · Section B: Getting Started & Account Access ✓ Fully Implemented

Logging In, Logging Out Securely & Resetting a Forgotten Password

Step-by-step instructions for logging into Kariahku.com, brute-force rate limiting rules, secure POST+CSRF logout, and resetting a forgotten password.

Purpose of Function Enable authorized users to sign in safely, terminate their session securely, and recover account access if a password is forgotten.
Prerequisites An active user record in the `users` table.
Required User Permissions Active User Account in users Table

1. Logging Into the System (/login)

  1. Click Log In in the top navigation bar or visit /{lang}/login.
  2. Enter your registered Email address (up to 254 characters).
  3. Enter your Password (up to 72 characters).
  4. Click Log In.
  5. Upon verification, the system regenerates the PHP session ID (session_regenerate_id(true)), rotates the CSRF token, writes an auth.login audit entry, and redirects to /{lang}/dashboard.

2. Logging Out Securely (/logout)

  1. Click the Log Out button in the header navigation bar.
  2. The button submits a CSRF-protected HTTP POST request to /{lang}/logout (GET requests to /logout are rejected with 405 Method Not Allowed to prevent cross-site logout CSRF).
  3. The session is destroyed, the session cookie is expired, an auth.logout event is logged, and you are redirected to /{lang}/login.

3. Resetting a Forgotten Password (/forgot-password & /reset-password)

  1. On /login, click Forgot password? to open /{lang}/forgot-password.
  2. Enter your registered Email address and click Submit.
  3. The system generates a 64-character hex reset token (stored as a SHA-256 hash in password_resets valid for 1 hour).
  4. Open the reset URL /{lang}/reset-password?token={token}.
  5. Enter your new Password (minimum 12 characters, maximum 72 characters) and repeat it in Confirm Password.
  6. Click Submit. The token is marked used (used_at) and you are redirected to /login.
Sign In (/login) and Password Recovery (/forgot-password & /reset-password) screens.
Sign In (/login) and Password Recovery (/forgot-password & /reset-password) screens.

Input Fields & Options Reference

Input FieldRouteValidation Rules
email/login, /forgot-passwordValid email format, max 254 chars, dir="ltr".
password/login, /reset-passwordLogin: 1–72 chars. Password reset: 12–72 chars required.
confirm_password/reset-passwordMust exactly match the new password field.
Expected Results: Users sign in to `/dashboard`, sign out with complete session cleanup, or reset their password securely.
Important Notes & Data Boundaries: Brute-Force Protection: 5 failed login attempts for the same email or IP address within 15 minutes temporarily locks login attempts for 15 minutes.

Common Errors & Troubleshooting

  • Login Error ("Invalid email or password"): Verify email spelling, check Caps Lock, ensure your account status is active, and wait 15 minutes if rate-limited.
  • Reset Error ("Invalid or expired reset token"): Tokens expire after 60 minutes and are single-use. Request a new token at /forgot-password (throttled to 1 request per 60 seconds).
SEC-B7 · Section B: Getting Started & Account Access ◐ Partially Implemented

Updating User Profile, Changing Passwords, Selecting Language & Understanding Dashboards

Guide to user profile and password management policies, switching interface languages (BM/EN/AR), and interpreting dashboard cards and navigation.

Purpose of Function Help users manage their language preference, understand how account profiles and passwords are maintained, and navigate role-specific dashboards.
Prerequisites An authenticated session for `/dashboard`; language switching is available to all visitors.
Required User Permissions Authenticated User Session (/dashboard)

1. Updating User Profile (Current System Policy)

Implementation Status: In Kariahku.com, login account identity fields (users.name and users.email) are centrally governed to preserve audit log integrity (audit_logs) and institutional/mosque role bindings:

  • Viewing Account Info: Signing in to /{lang}/dashboard displays your account name, email, and active role capabilities.
  • Login Account Name/Email Changes: Self-service editing of users.name or users.email is not exposed in the UI; changes are performed by platform administrators.
  • Updating Mosque & Kariah Profiles: Mosque Administrators have full self-service screens to update the Mosque Profile at /mosque-admin/profile and Kariah Member Profiles at /mosque-admin/kariah-members.

2. Changing Passwords

  1. To rotate or change your account password at any time, navigate to /{lang}/forgot-password.
  2. Submit your account email address and follow the token-verified /{lang}/reset-password?token=... workflow to set a new 12–72 character password.

3. Selecting Your Preferred Language (BM, EN, AR)

  1. Locate the language switcher in the top utility bar.
  2. Click BM (Bahasa Melayu), EN (English), or AR (العربية).
  3. The system rewrites the current route to the chosen language prefix (e.g. /en/manual → /ar/manual) and persists your choice in $_SESSION['lang'] and the 365-day kariahku_lang cookie.

4. Understanding Dashboard Information (/dashboard)

Visiting /{lang}/dashboard automatically routes you according to your assigned permissions:

  • Platform Administrators (with platform.dashboard.view): Redirected to /admin/dashboard showing total users, mosques by status, pending reviews, and recent audit logs.
  • Mosque Administrators & Editors: Redirected to /mosque-admin/dashboard showing profile completeness percentage, announcement/committee counts, subscription status, and quick action links.
  • MAIN & JAKIM Officers: Access state or national aggregate dashboards at /main/dashboard and /jakim/dashboard.
Unified dashboard router (/dashboard) and trilingual language switcher (BM / EN / AR).
Unified dashboard router (/dashboard) and trilingual language switcher (BM / EN / AR).

Input Fields & Options Reference

Language CodeDisplay NameDirection & Typography
msBahasa Melayu (Default)dir="ltr" (Left-to-Right), system UI typography.
enEnglishdir="ltr" (Left-to-Right), system UI typography.
arالعربية (Arabic)dir="rtl" (Right-to-Left), bundled KariahArabic (NotoNaskhArabic.ttf) font.
Expected Results: Users can switch languages persistently and interpret all metrics and quick actions on their dashboard.
Important Notes & Data Boundaries: Language preferences are stored in the `kariahku_lang` cookie (`HttpOnly`, `SameSite=Lax`) for 1 year.

Common Errors & Troubleshooting

If you sign in and see only the basic account card on /dashboard without management links, your account has not yet been assigned a mosque or platform role. Contact a Super Admin.

SEC-04A · Section 4: User Roles and Permissions ✓ Fully Implemented

Platform Management & Mosque Management Roles (Including Non-Existent Role Clarifications)

Authoritative reference for Global roles (Super Admin, Portal Admin) and Mosque tenant roles (Mosque Admin, Mosque Editor, Mosque Member), plus clarifications on non-existent separate sub-roles.

Purpose of Function Document every verified platform and mosque role, login workflow, accessible modules, allowed/restricted actions, and data access boundaries.
Prerequisites An active user account with role assignments in `user_roles` or `mosque_users`.
Required User Permissions Role Reference Guide (All Users)

A. Kariahku.com Platform Management Roles (Global Scope: user_roles)

1. Super Administrator (Role Code: super_admin)

  • Role Description: Highest administrative authority across Kariahku.com. Holds all 15 global permissions and is immutable in the permission editor.
  • Login & Dashboard Access: Sign in at /login → routed to /admin/dashboard.
  • Available Modules: All /admin/* modules (Dashboard, Users, Permissions, Mosques, CMS, Activity Categories, Featured Activities, Prayer Times, Subscriptions, Payments, Institutions, Reports, and User Manual).
  • Allowed Actions: Manage user accounts and global roles, edit non-Super-Admin role permissions, review/approve/suspend mosques, manage CMS pages, configure subscription plans/fees/discounts, verify manual bank transfers, manage MAIN/JAKIM institutions, and administer the User Manual.
  • Restricted Actions: Protected by last-Super-Admin safeguard (cannot suspend or remove the final active super_admin).
  • Report Access & Data Boundaries: Full access to /admin/reports and platform billing revenue reports at /admin/payments.

2. Platform / Portal Administrator (Role Code: portal_admin)

  • Role Description: Operational administrator for portal content, mosque registration reviews, featured activities, and help center content.
  • Login & Dashboard Access: Sign in at /login → accesses /admin/mosques, /admin/cms, /admin/featured-activities, /admin/reports, and /admin/manual.
  • Allowed Actions: Review/approve/reject mosque registrations (mosques.review), edit trilingual CMS content (portal.content.manage), curate featured activities (portal.activities.feature), view content reports (reports.content.view), and manage User Manual content (manual.manage).
  • Restricted Actions (Default): Cannot manage users (users.manage), edit permissions (permissions.manage), alter subscription plans (subscriptions.manage), verify payments (payments.manage), or manage institutions (institutions.manage) unless explicitly granted in /admin/permissions.

3. Clarification: Subscription/Billing Administrator & Support Administrator

Verified Codebase Reality: Separate role rows for Subscription/Billing Administrator or Support Administrator do not exist in the roles table. Billing and support administration are governed via granular permissions (subscriptions.manage, payments.manage, institutions.manage) held by super_admin and configurable in /admin/permissions.

B. Mosque Management Roles (Mosque Tenant Scope: mosque_users)

1. Mosque Administrator (Role Code: mosque_admin)

  • Role Description: Primary administrator for an individual mosque tenant. Holds mosque.access, mosque.manage, mosque.publish, subscriptions.view, and kariah.members.export.
  • Login & Dashboard Access: Sign in at /login → routed to /mosque-admin/dashboard.
  • Available Modules: All /mosque-admin/* modules (Dashboard, Mosque Profile, Microsite Website, Announcements, Committee, Editorial Content, Activities, Prayer Times, Mosque Users, Kariah Residential Areas, Kariah Members, and Subscription/Billing).
  • Allowed Actions: Update mosque details/coordinates, upload logo/cover image, manage public committee members, publish announcements/articles/events/gallery, schedule activities, configure prayer zone, manage assigned mosque staff, configure residential areas, approve/manage kariah members, export kariah CSV, and pay mosque subscription invoices.
  • Restricted Actions & Data Boundaries: Strictly isolated to the assigned mosque_id. Cannot view or modify any other mosque tenant or access /admin/*.

2. Mosque Editor (Role Code: mosque_editor)

  • Role Description: Secondary mosque tenant role holding mosque.access and mosque.publish.
  • Allowed & Restricted Actions: Can select the assigned mosque in /mosque-admin, whereas administrative configuration screens requiring mosque.manage or kariah.members.export are restricted to mosque_admin.

3. Mosque Member (Role Code: mosque_member)

  • Role Description: Read-only tenant workspace role holding mosque.access. Cannot modify mosque settings or export member directories.

4. Clarification: Mosque Committee (AJK), Treasurer & Secretary

Verified Codebase Reality: Separate login role codes for Mosque Committee / AJK, Mosque Treasurer, or Mosque Secretary do not exist in the roles table. Mosque committee positions (Chairman, Imam, Secretary, Treasurer, Committee Members) are published as public organisational directory records in mosque_committees via /mosque-admin/committee, while system login access uses mosque_admin, mosque_editor, or mosque_member.

Platform Administrator (/admin/dashboard) and Mosque Administrator (/mosque-admin/dashboard) workspaces.
Platform Administrator (/admin/dashboard) and Mosque Administrator (/mosque-admin/dashboard) workspaces.

Input Fields & Options Reference

Role CodeScope TableDefault PermissionsPrimary Entry Route
super_adminGlobal (user_roles)All 15 global permissions (including manual.manage)/admin/dashboard
portal_adminGlobal (user_roles)portal.access, mosques.review, portal.content.manage, reports.content.view, portal.activities.feature, manual.manage/admin/mosques, /admin/cms
mosque_adminMosque (mosque_users)mosque.access, mosque.manage, mosque.publish, subscriptions.view, kariah.members.export/mosque-admin/dashboard
mosque_editorMosque (mosque_users)mosque.access, mosque.publish/mosque-admin
mosque_memberMosque (mosque_users)mosque.access/mosque-admin
Expected Results: Administrators and auditors have an exact reference of every platform and mosque role and its boundaries.
Important Notes & Data Boundaries: A single user account can be assigned to multiple mosques in `mosque_users` and switch between them at `/mosque-admin`.

Common Errors & Troubleshooting

If a mosque_admin user receives 403 Forbidden, verify that both their mosque_users.status and the mosque’s mosques.status are set to active.

SEC-04C · Section 4: User Roles and Permissions ✓ Fully Implemented

Government / Religious Authority Roles (MAIN & JAKIM) and Community Users

Complete documentation for State Islamic Religious Council (MAIN) and JAKIM institutional roles (administrator and report_viewer), registered kariah members, and general public users.

Purpose of Function Explain how MAIN and JAKIM officers access jurisdiction-scoped aggregate dashboards and clarify the role of registered kariah members and public visitors.
Prerequisites An active institution record in `institutions` with verified state grants in `institution_state_access`.
Required User Permissions Role Reference / Global institutions.manage for Provisioning

C. Community Users

1. Registered Kariah Members

  • Role Description: Muslim residents who submitted a kariah membership application via /kariah-register and were approved by a Mosque Administrator into kariah_people and kariah_members.
  • Login & Access Process: Registered kariah members do not require or receive a system login account (users). Kariah membership is a mosque-level community registry record.
  • Allowed Actions: Browse all public portal pages, mosque microsites (/masjid/{slug}), prayer times, activity calendars, and submit kariah membership applications.
  • Privacy Protection: National IC numbers are never collected. Residential addresses and phone numbers are visible only to authorized Mosque Administrators of that specific mosque and are never exposed publicly or to MAIN/JAKIM dashboards.

2. General Public Users

  • Role Description: Unauthenticated visitors browsing the platform.
  • Available Modules: Homepage (/), Mosque Directory (/mosques), Mosque Microsites (/masjid/{slug}), Activities (/activities), Prayer Times (/prayer-times), Mosque Registration (/register-mosque), Kariah Registration (/kariah-register), and the User Manual (/manual).

D. Government / Religious Authorities (institution_users Table)

Authority users are bound to an active institution record in institutions (main or jakim) via institution_users with one of two institutional roles:

1. Majlis Agama Islam Negeri (MAIN) Authorized Users — institution_type = 'main'

  • Routes: /{lang}/main/dashboard, /{lang}/main/reports, and /{lang}/main/subscription.
  • Institutional Sub-Roles:
    • administrator: Holds all 5 institutional permissions (dashboard.view, reports.view, reports.export, subscription.view, subscription.renew). Can generate renewal invoices and initiate checkout.
    • report_viewer: Holds dashboard.view, reports.view, reports.export, and subscription.view (read/export reports and view billing only).
  • Data Access Boundaries: Strictly restricted to states with a verified grant (verified_by IS NOT NULL) in institution_state_access. MAIN institutions cannot be granted nationwide mode.

2. JAKIM Authorized Users — institution_type = 'jakim'

  • Routes: /{lang}/jakim/dashboard, /{lang}/jakim/reports, and /{lang}/jakim/subscription.
  • Institutional Sub-Roles: Supports administrator and report_viewer.
  • Data Access Boundaries: Requires jurisdiction_mode = 'nationwide' and verified grants across all 16 Malaysian states and federal territories. Access is strictly limited to aggregate registered-mosque metrics; individual kariah member PII and sensitive financial modules are excluded.
MAIN & JAKIM institution governance (/admin/institutions) and community user roles.
MAIN & JAKIM institution governance (/admin/institutions) and community user roles.

Input Fields & Options Reference

Institution RoleGranted PermissionsCapability Difference
administratordashboard.view, reports.view, reports.export, subscription.view, subscription.renewCan view/export aggregate reports and generate/pay subscription renewal invoices.
report_viewerdashboard.view, reports.view, reports.export, subscription.viewCan view/export aggregate reports and view billing status (cannot renew subscription).
Expected Results: Users understand community access rules and the exact distinction between MAIN and JAKIM institutional roles.
Important Notes & Data Boundaries: Institutional dashboard and report access requires an active (`active`, `trialing`, or `grace_period`) institutional subscription.

Common Errors & Troubleshooting

If a MAIN or JAKIM user encounters "Institutional reporting requires an active subscription", an institutional administrator can still access /main/subscription or /jakim/subscription to renew and pay.

SEC-04E · Section 4: User Roles and Permissions ✓ Fully Implemented

Role-Permission Matrix & Managing Permissions at /admin/permissions

Step-by-step guide to inspecting and updating the role-permission matrix at /admin/permissions, with a complete reference table of all global and mosque permissions.

Purpose of Function Allow Super Administrators to audit and configure role permissions safely while preserving Super Admin immutability.
Prerequisites Signed in as `super_admin` (`permissions.manage`). Anyone can view the live read-only matrix at `/{lang}/manual/roles`.
Required User Permissions Global permissions.manage (Super Admin)

1. Viewing the Live Role-Permission Matrix

  1. Open the dedicated Role & Permission Matrix page at /{lang}/manual/roles in this Help Center to inspect the live matrix queried directly from the database.
  2. To modify role permissions, sign in as a Super Admin and click Permissions in the admin sidebar (/{lang}/admin/permissions).

2. Updating Role Permissions at /admin/permissions

  1. In the matrix table on /admin/permissions, each row represents a permission code and each column represents a role (super_admin, portal_admin, mosque_admin, mosque_editor, mosque_member).
  2. Notice that checkboxes under the Super Admin column are checked and locked (disabled) because super_admin permanently holds all permissions.
  3. Check or uncheck permissions for the remaining roles as required by your governance policy.
  4. Click Save at the bottom of the form.
  5. The system updates role_permissions inside a database transaction and writes a permissions.updated record to audit_logs.
Role Permission Matrix administration screen (/admin/permissions) and live matrix view.
Role Permission Matrix administration screen (/admin/permissions) and live matrix view.

Input Fields & Options Reference

Permission CodeScopeControlled Capability
portal.accessGlobalBaseline access to portal administration views.
users.manageGlobalManage user account status and global roles at /admin/users.
mosques.reviewGlobalReview, approve, or reject mosque registration applications at /admin/mosques.
mosques.manageGlobalEdit mosque records and suspend/reactivate mosques at /admin/mosques.
portal.content.manageGlobalManage trilingual CMS pages and announcements at /admin/cms.
platform.dashboard.viewGlobalView platform-wide metrics at /admin/dashboard.
reports.platform.viewGlobalView platform summary reports at /admin/reports.
reports.content.viewGlobalView content and activity metrics at /admin/reports.
audit.viewGlobalInspect security audit logs at /admin/dashboard and /admin/reports.
permissions.manageGlobalModify role permissions at /admin/permissions.
portal.activities.featureGlobalManage activity categories and featured portal activities.
subscriptions.manageGlobalManage subscription plans, prices, discounts, and lifecycle overrides at /admin/subscriptions.
payments.manageGlobalManage payment gateways, verify manual transfers, and view revenue reports at /admin/payments.
institutions.manageGlobalCreate and verify MAIN and JAKIM institutions at /admin/institutions.
manual.manageGlobalManage User Manual categories, trilingual articles, screenshots, and FAQs at /admin/manual.
mosque.accessMosqueAccess the mosque tenant workspace at /mosque-admin.
mosque.manageMosqueManage mosque profile, microsite, committee, activities, prayer zone, staff, and kariah members.
mosque.publishMosquePublish mosque announcements and editorial items.
subscriptions.viewMosqueView and pay mosque subscription invoices at /mosque-admin/subscription.
kariah.members.exportMosqueExport the mosque kariah member directory to CSV at /mosque-admin/kariah-members?export=csv.
Expected Results: Permission updates take effect immediately on the next request and are recorded in `audit_logs`.
Important Notes & Data Boundaries: The `super_admin` role is hard-protected so administrators can never accidentally lock themselves out of permission management.

Common Errors & Troubleshooting

If a user does not see newly granted links right away, ask them to refresh their browser page.

SEC-05A · Section 5: Mosque Registration and Management ✓ Fully Implemented

Registering a Mosque (/register-mosque) & Platform Verification (/admin/mosques)

Step-by-step instructions for submitting a public mosque registration application with supporting documents, and how platform administrators verify and approve mosques.

Purpose of Function Enable mosque representatives to apply for onboarding and guide Platform Administrators through verifying documents, approving tenants, and starting the 1-month free trial.
Prerequisites 1 to 3 supporting documents (PDF, JPG, or PNG, max 5 MB each). For approval: an active `users` account matching `applicant_email`.
Required User Permissions Public Access for Application (/register-mosque) | Global mosques.review for Approval (/admin/mosques)

1. Submitting a Mosque Registration Application (/register-mosque)

  1. Click Register Mosque in the top navigation or visit /{lang}/register-mosque.
  2. Under Mosque Details:
    • Enter the official Mosque Name (required, max 180 chars) and select Mosque Type (Masjid, Surau, or Surau Jumaat).
    • Enter an optional Reference Number (up to 100 chars).
    • Select State and District (the District list filters automatically to match the chosen State).
    • Select the optional Official Prayer Zone (auto-suggested based on State and District).
    • Fill in Address, 5-digit Postcode, Latitude (-90 to 90), Longitude (-180 to 180), Telephone, and Email.
  3. Under Applicant Details, enter Applicant Name, Applicant Position, Applicant Contact, and Applicant Email (applicant_email).
  4. Select 1 to 3 Supporting Documents (PDF, JPEG, or PNG, max 5 MB per file).
  5. Click Submit. The application is saved with status pending.

2. Reviewing & Approving Mosque Applications (/admin/mosques)

  1. Sign in with mosques.review permission (Super Admin or Portal Admin) and open /{lang}/admin/mosques.
  2. Click the supporting document links on a pending mosque to inspect files securely via /admin/mosque-document?id={doc_id}.
  3. Verify that an active users account exists matching the application’s applicant_email.
  4. Enter a Review Note (mandatory when rejecting) and click:
    • Approve: Sets mosques.status = 'active', assigns the applicant user as mosque_admin in mosque_users, and automatically starts the 1-Month Free Trial on the mosque-standard plan.
    • Reject: Sets mosques.status = 'rejected' and logs the rejection note.
Public Mosque Registration form (/register-mosque) and Platform Mosque Review console (/admin/mosques).
Public Mosque Registration form (/register-mosque) and Platform Mosque Review console (/admin/mosques).

Input Fields & Options Reference

Form FieldRequirementValidation Rules
nameRequiredOfficial mosque name (max 180 chars); generates a unique URL slug.
mosque_typeRequiredAllowed values: masjid, surau, or surau_jumaat.
state_id & district_idRequiredDistrict must belong to the selected State (enforced server-side).
postcodeRequiredExact 5-digit numeric postcode (^\d{5}$).
latitude & longitudeRequiredDecimal coordinates: Latitude -90..90, Longitude -180..180.
applicant_emailRequiredEmail address of the user who will be granted mosque_admin upon approval.
documents[]Required1 to 3 files; allowed MIME types: application/pdf, image/jpeg, image/png; max 5 MB each.
Expected Results: The mosque transitions to `active`, the applicant becomes `mosque_admin`, the microsite `/masjid/{slug}` goes live, and the 1-month free trial starts.
Important Notes & Data Boundaries: Uploaded registration documents are stored outside the public web root in `storage/mosque-documents/` and served only to authorized reviewers.

Common Errors & Troubleshooting

If approval fails stating that the applicant user account must be created first, provision the account via php database/manage.php create-user with the exact applicant_email and retry approval.

SEC-05B · Section 5: Mosque Registration and Management ✓ Fully Implemented

Mosque Profile Management, Contact Info, State/District & Location (/mosque-admin/profile)

Step-by-step instructions for updating mosque profile details, address, state and district selection, official prayer zone, map coordinates, and contact information.

Purpose of Function Keep the mosque’s official directory listing, OpenStreetMap location, and contact details accurate on the public portal and mosque microsite.
Prerequisites Signed in as `mosque_admin` for the target mosque (or `super_admin` via `/admin/mosques`).
Required User Permissions Mosque Scope: mosque.manage (/mosque-admin/profile) or Global: mosques.manage (/admin/mosques)

1. Opening the Mosque Profile Screen

  1. Sign in and navigate to /{lang}/mosque-admin/profile (or click Mosque Profile in the mosque workspace sidebar).
  2. If your account manages multiple mosques, ensure the desired mosque tenant is active in /mosque-admin.

2. Updating Mosque Details, State/District & Location

  1. Update the Mosque Name, Mosque Type (Masjid, Surau, or Surau Jumaat), and optional Reference Number.
  2. Select the State and District. Selecting a State and District automatically filters district options and suggests the matching Official JAKIM Prayer Zone.
  3. Update the street Address and 5-digit Postcode.
  4. Enter accurate decimal Latitude and Longitude coordinates. These coordinates render the embedded OpenStreetMap view on the microsite Contact tab (/masjid/{slug}/contact).
  5. Enter the official Telephone number and Email address, then click Save.
Mosque Profile, Address, State/District, and Map Coordinates management screen (/mosque-admin/profile).
Mosque Profile, Address, State/District, and Map Coordinates management screen (/mosque-admin/profile).

Input Fields & Options Reference

FieldFormat / ConstraintPublic Microsite Impact
state_id & district_idValid State & District IDsControls public directory filtering and MAIN state reporting jurisdiction.
prayer_zone_idVerified JAKIM zoneDetermines the daily prayer schedule displayed on the mosque microsite.
latitude, longitudeDecimal (-90..90, -180..180)Renders the interactive OpenStreetMap embed on the mosque microsite.
telephone, emailMax 30 / Max 254 charsDisplayed in the mosque contact section and footer.
Expected Results: The mosque record in `mosques` is updated, the dashboard profile completion meter updates, and changes appear immediately on `/masjid/{slug}`.
Important Notes & Data Boundaries: All profile updates are logged in `audit_logs` under `mosque.profile.updated`.

Common Errors & Troubleshooting

If you see "Selected district does not belong to state", re-select the State first and then choose a District belonging to that State.

SEC-05C · Section 5: Mosque Registration and Management ✓ Fully Implemented

Mosque Microsite Branding, Logo, Photographs & Mosque-Specific Settings (/mosque-admin/website)

How to upload a mosque logo and cover photograph, select a theme accent color, toggle microsite sections, and edit trilingual microsite content.

Purpose of Function Allow Mosque Administrators to customize their mosque’s public microsite at `/masjid/{slug}`.
Prerequisites Role `mosque_admin` and active subscription entitlement (`microsite_customization`).
Required User Permissions Mosque Scope: mosque.manage + Active Subscription Entitlement (microsite_customization)

1. Uploading the Mosque Logo & Cover Photograph

  1. Open /{lang}/mosque-admin/website.
  2. In the Mosque Logo field, select your official emblem image (JPG, PNG, or WEBP, max 3 MB).
  3. In the Cover Image field, select a photograph of the mosque (JPG, PNG, or WEBP, max 3 MB).

2. Configuring Theme Accent, Visibility Toggles & Social Links

  1. Choose a Theme Accent color (emerald, teal, blue, or maroon).
  2. Enter Operating Hours, optional Map Link, and official Facebook, YouTube, Instagram, or External Website URLs (must start with https://).
  3. Toggle which sections appear publicly on your microsite:
    • show_prayer_times, show_announcements, show_activities, show_committee, and show_location_map.

3. Editing Trilingual Microsite Content (BM, EN, AR)

  1. Switch between the Bahasa Melayu, English, and العربية language tabs.
  2. Complete the Tagline, Short Introduction, Mosque History, Vision & Mission, and Contact Notes for each language.
  3. Check the Translation reviewed box once verified and click Save.
Mosque Microsite Branding, Logo, Cover Image, Theme, and Settings (/mosque-admin/website).
Mosque Microsite Branding, Logo, Cover Image, Theme, and Settings (/mosque-admin/website).

Input Fields & Options Reference

Setting FieldDatabase TableValidation & Constraints
logo & covermosque_mediaAllowed MIME: image/jpeg, image/png, image/webp; max 3 MB.
theme_accentmosque_settingsAllowed values: emerald (default), teal, blue, maroon.
facebook_url, etc.mosque_settingsMust be valid https:// URLs up to 255 characters.
tagline, short_intro, history, vision_missionmosque_translationsStored per language (ms, en, ar).
Expected Results: The public mosque microsite `/masjid/{slug}` immediately reflects the updated logo, cover photograph, theme accent, visible tabs, and trilingual descriptions.
Important Notes & Data Boundaries: Uploaded media files are stored outside the public web root in `storage/mosque-media/{mosque_id}/` and served securely via `/media/mosque?id={media_id}`.

Common Errors & Troubleshooting

If an external social or map URL is rejected, ensure it starts with https:// (plain http:// URLs are rejected for security).

SEC-05D · Section 5: Mosque Registration and Management ✓ Fully Implemented

Managing Mosque Committee Members (AJK), Announcements, Articles, Events & Gallery

Step-by-step instructions for managing the Mosque Committee (AJK) directory at /mosque-admin/committee, announcements at /mosque-admin/announcements, and articles/events/galleries at /mosque-admin/editorial.

Purpose of Function Enable mosque administrators to publish their committee roster, community announcements, educational articles, and photo galleries on their microsite.
Prerequisites Signed in as `mosque_admin` with an active subscription.
Required User Permissions Mosque Scope: mosque.manage & mosque.publish + Active Subscription

1. Managing Mosque Committee Members (/mosque-admin/committee)

  1. Navigate to /{lang}/mosque-admin/committee.
  2. In the committee member form:
    • Enter the member’s Name (max 150 chars), optional Public Contact, and numeric Sort Order, and check Active.
    • Enter the Role Title in Bahasa Melayu, English, and Arabic (e.g., Pengerusi / Chairman / رئيس اللجنة).
  3. Click Save. The committee roster appears publicly at /masjid/{slug}/committee.

2. Publishing Mosque Announcements (/mosque-admin/announcements)

  1. Open /{lang}/mosque-admin/announcements.
  2. Select the Status (draft, published, or archived), set the Publish Date, and optionally check Pinned.
  3. Enter the Title, Summary, and Content across the BM, EN, and AR tabs, then click Save.

3. Managing Articles, Events & Photo Galleries (/mosque-admin/editorial)

  1. Open /{lang}/mosque-admin/editorial and choose the content type tab: Announcements, Articles, Events, or Gallery.
  2. Set the Status, upload a Cover Image (and up to 12 album photos for Gallery items), complete the trilingual fields, and click Save.
Mosque Committee (AJK) management (/mosque-admin/committee), Announcements, and Editorial Content.
Mosque Committee (AJK) management (/mosque-admin/committee), Announcements, and Editorial Content.

Input Fields & Options Reference

Content ModuleAdmin RoutePublic Microsite Route
Committee Directory (AJK)/mosque-admin/committee/masjid/{slug}/committee
Mosque Announcements/mosque-admin/announcements/masjid/{slug}/announcements
Articles, Events & Galleries/mosque-admin/editorial/masjid/{slug}/articles, /events, /gallery
Expected Results: Committee members, announcements, articles, events, and photo galleries are published in BM, EN, and AR on the mosque microsite.
Important Notes & Data Boundaries: All rich editorial bodies are server-side sanitized before storage.

Common Errors & Troubleshooting

If a saved item does not appear on the public microsite, verify that its status is published and that the corresponding visibility toggle is enabled in /mosque-admin/website.

SEC-05E · Section 5: Mosque Registration and Management ✓ Fully Implemented

Managing Mosque Administrators, Workspace Staff & Tenant Isolation (/mosque-admin/members)

How to assign, update, or deactivate Mosque Administrators, Editors, and Workspace Members at /mosque-admin/members, including last-Mosque-Admin protection and multi-tenant isolation rules.

Purpose of Function Allow Mosque Administrators to delegate workspace access to authorized mosque staff while enforcing strict tenant isolation.
Prerequisites The target user must already have an account in the `users` table.
Required User Permissions Mosque Scope: mosque.manage (/mosque-admin/members)

1. Assigning a User to the Mosque Workspace (/mosque-admin/members)

  1. Sign in as mosque_admin and open /{lang}/mosque-admin/members.
  2. In the assignment form:
    • Enter the existing user’s Email address.
    • Select the Mosque Role: Mosque Admin (mosque_admin), Mosque Editor (mosque_editor), or Mosque Member (mosque_member).
    • Select the Status (active or inactive).
  3. Click Save. The assignment is stored in mosque_users for the active mosque_id.

2. Last Mosque Administrator Safeguard

The system prevents demoting or deactivating the last active mosque_admin for a mosque. Always assign and activate a replacement mosque_admin before removing or downgrading the existing administrator.

3. Multi-Tenant Independence & Data Boundaries

  • Role grants in mosque_users apply exclusively to the specified mosque_id.
  • Each mosque tenant can access only its own profile, microsite, activities, kariah areas, kariah members, and billing records.
Managing Mosque Administrators, Editors, and Workspace Staff (/mosque-admin/members).
Managing Mosque Administrators, Editors, and Workspace Staff (/mosque-admin/members).

Input Fields & Options Reference

FieldAllowed ValuesDescription
emailRegistered user emailMust match an existing account in the users table.
role_idmosque_admin, mosque_editor, mosque_memberOnly scope = 'mosque' roles are accepted.
statusactive / inactiveControls whether the assignment is active for this mosque.
Expected Results: The user role assignment for the mosque is updated in `mosque_users` and logged in `audit_logs` (`mosque.user.assigned`).
Important Notes & Data Boundaries: Note the distinction: `/mosque-admin/members` manages administrative workspace users (`mosque_users`), whereas `/mosque-admin/kariah-members` manages community kariah membership (`kariah_members`).

Common Errors & Troubleshooting

If you see "Unable to assign that user and role", verify that the email exists in users and that at least one active mosque_admin remains assigned to the mosque.

SEC-06A · Section 6: Kariah Member Management & Residential Area Classification ✓ Fully Implemented

Registering as a Kariah Member & Selecting a Mosque (/kariah-register)

Step-by-step guide for community residents applying for kariah membership at a registered mosque, selecting residential areas, consenting to the privacy notice, and receiving an application reference.

Purpose of Function Allow Muslim residents to register in their mosque’s kariah directory online without requiring a login account or national identity card number.
Prerequisites The target mosque must be `active` and hold an active `kariah_membership` subscription entitlement.
Required User Permissions Public Access (/kariah-register) — Target Mosque Requires kariah_membership Subscription Entitlement

1. Selecting or Associating with a Mosque (/kariah-register)

  1. Click Register as Kariah Member in the top navigation bar or visit /{lang}/kariah-register.
  2. Select your mosque from the Mosque dropdown (mosque_slug), which displays Mosque Name · District, State.
  3. The page reloads with ?mosque={slug}, loading the mosque’s active residential areas while locking the District and State fields to the mosque’s official jurisdiction.

2. Completing the Kariah Membership Application Form

  1. Enter your Full Name (required, max 180 chars) and Preferred Contact Number (required, valid phone number).
  2. Optionally provide your Email, Date of Birth (cannot be in the future), and Gender.
  3. Enter your House/Unit Number (required, max 40 chars), optional Street name, and 5-digit Postcode (required).
  4. Select your Residential Area (area_id) from the mosque’s configured Kampung, Taman, Locality, or Street list.
  5. Optionally enter a Household Name and Relationship to group family members residing at the same address.
  6. Review the Privacy Notice, check the required consent box, and click Submit Application.

3. Keeping Your Application Reference Number

Upon submission, the system creates records in kariah_people, kariah_members (status pending), and kariah_membership_applications, and displays a unique reference number formatted as KRH-YYYYMMDD-XXXXXX.

Public Kariah Membership Application form (/kariah-register) with mosque and residential area selection.
Public Kariah Membership Application form (/kariah-register) with mosque and residential area selection.

Input Fields & Options Reference

Input FieldRequirementValidation & Database Mapping
mosque_slugRequiredActive mosque; binds mosque_id, district_id, and state_id.
full_nameRequiredMax 180 chars; normalized into full_name_normalized for duplicate checks.
contact_phoneRequiredMatches ^\+?[0-9][0-9\-\s]{6,20}$; digits stored in phone_normalized.
house_number & postcodeRequiredHouse/unit (≤ 40 chars) and 5-digit postcode (^\d{5}$).
area_idOptional / RecommendedMust be an active area linked to the mosque in mosque_kariah_areas.
household_name, household_relationshipOptionalLinks member to kariah_households and kariah_household_members.
consentRequired (1)Explicit privacy consent recorded with timestamp in privacy_consent_at.
Expected Results: A `pending` kariah membership application is queued for the Mosque Administrator and returns reference code `KRH-YYYYMMDD-XXXXXX`.
Important Notes & Data Boundaries: Submitting a kariah application does not create a login account (`users`), and national identity card (IC) numbers are intentionally never collected.

Common Errors & Troubleshooting

If you see "Too many applications. Please try again later", the rate limiter allows at most 5 submissions per IP address within a 15-minute window.

SEC-06B · Section 6: Kariah Member Management & Residential Area Classification ✓ Fully Implemented

Residential Area Classification: State, District, Locality/Mukim, Kampung, Taman & Street (/mosque-admin/kariah-areas)

Complete explanation of how kariah members are classified by residential location (State, District, Locality/Mukim, Kampung, Taman Perumahan, Street/Jalan, and Other), database relationships, and practical examples.

Purpose of Function Enable Mosque Administrators to model their parish geography hierarchically so members living in different kampung, taman, and streets within the same mosque kariah can be identified, filtered, and reported.
Prerequisites Signed in as `mosque_admin` with an active `kariah_membership` subscription entitlement.
Required User Permissions Mosque Scope: mosque.manage + Active Subscription (kariah_membership)

1. Residential Area Classification & Database Relationships

Kariahku.com classifies member residences using the administrative State/District tables combined with the hierarchical kariah_areas and mosque_kariah_areas tables:

  • Negeri / State (states): Automatically inherited from the mosque’s mosques.state_id.
  • Daerah / District (districts): Automatically inherited from the mosque’s mosques.district_id.
  • Town / Locality / Mukim (area_type = 'locality'): Top-level local area or mukim grouping within the district.
  • Kampung (area_type = 'kampung'): Traditional village area within the mosque kariah (can be nested under a locality or placed at the root of the district).
  • Residential Taman (area_type = 'taman'): Housing estate or residential development within the kariah.
  • Street / Jalan (area_type = 'street'): Specific street classification node (can be nested under a parent Kampung or Taman via parent_area_id, in addition to the member’s individual street_name address field).
  • Other (area_type = 'other'): Institutional quarters, apartments, or custom residential zones.

2. Creating a New Residential Area (/mosque-admin/kariah-areas)

  1. Open /{lang}/mosque-admin/kariah-areas.
  2. In the Add Area form:
    • Enter the Area Name (e.g., Mukim Kajang, Kampung Sungai Ramal, Taman Harmoni Indah, or Jalan Harmoni 3).
    • Select the Area Type (locality, kampung, taman, street, or other).
    • Optionally select a Parent Area (parent_area_id) to build a multi-level hierarchy (e.g., placing Jalan Harmoni 3 under Taman Harmoni Indah).
    • If linking an area name that already exists in the district, enter a Sharing Basis / Authorization (at least 10 characters).
  3. Click Add Area.

3. Linking Shared Boundary Areas & Deactivating Links

  1. When neighbouring mosques in the same district share a boundary area, use the Link Shared Area form, choose the existing district area, provide the Sharing Basis (≥ 10 characters), and submit.
  2. To stop new member registrations in an area while preserving historical member records, click Deactivate Link in the Area Hierarchy table.

4. Example: Identifying Members Across Kampung, Taman & Streets

For example, a mosque administrator at Masjid Al-Hidayah can configure:

  • Locality (Mukim): Mukim Damansara
    • Kampung: Kampung Melayu Subang → child Streets: Jalan Merbau 1, Jalan Merbau 2
    • Residential Taman: Taman Subang Murni → child Streets: Jalan SM 3/1, Jalan SM 3/4

In /mosque-admin/kariah-members, the administrator can view exact headcount breakdowns under Members by Area, filter the directory by any Kampung, Taman, or Street, or search by street name to generate targeted CSV exports.

Kariah Residential Area Hierarchy management (Locality/Mukim, Kampung, Taman, Street) at /mosque-admin/kariah-areas.
Kariah Residential Area Hierarchy management (Locality/Mukim, Kampung, Taman, Street) at /mosque-admin/kariah-areas.

Input Fields & Options Reference

Database ColumnTablePurpose & Constraint
area_typekariah_areasENUM('locality','kampung','taman','street','other').
parent_area_idkariah_areasSelf-referencing FK within the same district & state; cycle-checked up to 25 levels.
name_keykariah_areasNormalized unique key across (state_id, district_id, area_type, parent_id_key, name_key).
sharing_basismosque_kariah_areasRequired (≥ 10 chars) when linking an area shared with another mosque in the same district.
Expected Results: Residential areas are organized hierarchically, selectable on `/kariah-register`, and available for filtering and reporting in `/mosque-admin/kariah-members`.
Important Notes & Data Boundaries: Deactivating an area link (`mosque_kariah_areas.is_active = 0`) hides it from new public applications while retaining all existing member associations and history.

Common Errors & Troubleshooting

If you see "A sharing authorization basis is required (at least 10 characters)" when creating an area, an area with that normalized name already exists in the district—provide a 10+ character sharing note to link it.

SEC-06C · Section 6: Kariah Member Management & Residential Area Classification ✓ Fully Implemented

Member Verification, Approving Applications & Duplicate Detection (/mosque-admin/kariah-members)

Step-by-step instructions for Mosque Administrators to review pending kariah applications, approve, request clarification, reject, and handle potential duplicate flags.

Purpose of Function Ensure only verified residents within the mosque’s kariah are approved as active members while preventing duplicate member records.
Prerequisites Signed in as `mosque_admin` with an active `kariah_membership` subscription entitlement.
Required User Permissions Mosque Scope: mosque.manage + Active Subscription (kariah_membership)

1. Inspecting the Pending Applications Queue (/mosque-admin/kariah-members)

  1. Open /{lang}/mosque-admin/kariah-members.
  2. Locate the Pending Applications card listing all applications in pending or clarification status.
  3. Review the Reference Code (KRH-...), Full Name, Contact Phone, House & Street Address, Residential Area, and any Possible duplicate — review manually warning badge.

2. Approving, Requesting Clarification, or Rejecting an Application

  1. Enter a Review / Clarification Note (mandatory with at least 5 characters when requesting clarification or rejecting).
  2. Click the desired action button:
    • Approve: Sets application status to approved, transitions the member record to active in kariah_members, stamps registered_at, and writes an entry to kariah_membership_history.
    • Request Clarification: Sets status to clarification while the mosque verifies address or identity details with the applicant.
    • Reject: Sets status to rejected and records the reason.

3. Resolving Potential Duplicate Flags

When an application matches an existing member’s full_name_normalized and phone_normalized at the same mosque:

  1. The application is flagged with Possible duplicate — review manually.
  2. If manual verification confirms the applicant is a separate individual, check Approve as separate member (approve_duplicate) and enter a justification of at least 10 characters in the review note before clicking Approve.
Pending Kariah Application Review Queue & Duplicate Detection at /mosque-admin/kariah-members.
Pending Kariah Application Review Queue & Duplicate Detection at /mosque-admin/kariah-members.

Input Fields & Options Reference

Review ActionResulting StatusReview Note Requirement
approveapproved (Member: active)Optional (or required ≥ 10 chars when overriding a duplicate flag with approve_duplicate=1).
clarifyclarificationRequired, minimum 5 characters.
rejectrejectedRequired, minimum 5 characters.
Expected Results: The application decision is committed transactionally and logged in `kariah_membership_history` and `audit_logs`.
Important Notes & Data Boundaries: Standard approval is blocked if a matching active member already exists at the mosque unless the administrator explicitly checks `Approve as separate member` with a 10+ character justification.

Common Errors & Troubleshooting

If you see "A matching member record already exists at this mosque", search the Member Directory below to check if the person is already an approved member.

SEC-06D · Section 6: Kariah Member Management & Residential Area Classification ✓ Fully Implemented

Managing Member Profiles, Searching, Filtering by Area, Status Transitions & CSV Reports

Complete guide to searching and filtering kariah members by residential area or status, updating member personal/household profiles, managing status transitions, and exporting CSV reports.

Purpose of Function Equip Mosque Administrators to maintain accurate member records and generate residential-area-filtered member reports.
Prerequisites Signed in as `mosque_admin` (`mosque.manage` and `kariah.members.export`) with an active subscription.
Required User Permissions Mosque Scope: mosque.manage (Directory/Edit) & kariah.members.export (CSV Export)

1. Understanding Kariah Summary Metrics

At the top of /{lang}/mosque-admin/kariah-members, four summary cards display:

  • Total Registered Members: Count of approved members (active, inactive, moved, deceased).
  • Members by Area: Breakdown of member counts for each configured Kampung, Taman, Locality, and Street.
  • Members by Status: Distribution across all membership statuses.
  • Registration Trends (12 Months): Monthly approval counts (YYYY-MM).

2. Searching, Filtering & Sorting Member Records

  1. In the Member Directory filter bar:
    • Search (q): Search by member name, phone number, or street name.
    • Residential Area (area_id): Filter by a specific Locality/Mukim, Kampung, Taman, or Street.
    • Membership Status (status): Filter by active, inactive, moved, deceased, pending, clarification, or rejected.
    • Registration Date (from & to): Filter by registration date range.
    • Sort (sort & dir): Sort by Name, Registration Date, Area, or Status in ascending or descending order.
  2. Click Filter.

3. Updating Personal Information, Residential Area & Household

  1. Click Update Status on any member row in the directory to load the member detail editor at the bottom of the page.
  2. In the profile form, update Full Name, Contact Phone, Email, House/Unit Number, Street, Postcode, Residential Area, and Household Name / Relationship.
  3. Click Save. Area transfers (area_transfer), profile edits (edited), and household changes (household_changed) are automatically recorded in kariah_membership_history.

4. Managing Member Status Transitions

  1. In the status update card for the selected member, choose a valid target status:
    • From active → inactive, moved, or deceased.
    • From inactive or moved → active, inactive, moved, or deceased.
  2. Enter a Review Note (minimum 5 characters) explaining the status change and click Update Status.

5. Generating & Exporting Member Reports (CSV)

  1. Apply any desired filters (for example, selecting a specific Kampung or Taman and status active).
  2. Click Export CSV.
  3. The system verifies kariah.members.export permission, logs kariah.members.exported in audit_logs, and downloads a UTF-8 BOM CSV file (kariah-members-{mosque_id}.csv) with columns: id, full_name, contact_phone, email, house_number, street_name, postcode, area_name, area_type, household_name, membership_status, and registered_at.
Kariah Member Directory, Area/Status Filtering, Profile Editing, and CSV Export (/mosque-admin/kariah-members).
Kariah Member Directory, Area/Status Filtering, Profile Editing, and CSV Export (/mosque-admin/kariah-members).

Input Fields & Options Reference

Current StatusAllowed Target StatusesMeaning
activeinactive, moved, deceasedCurrently active resident kariah member.
inactiveactive, moved, deceasedTemporarily inactive membership record.
movedactive, inactive, deceasedMember relocated outside the mosque’s kariah boundary.
deceasedinactiveMember passed away (historical record preserved).
Expected Results: Member profiles and statuses are updated with full audit history, and filtered CSV member reports can be downloaded.
Important Notes & Data Boundaries: Exported CSV cells starting with `=`, `+`, `-`, or `@` are automatically neutralized with a leading apostrophe to prevent spreadsheet formula injection.

Common Errors & Troubleshooting

If clicking Export CSV returns 403 Forbidden, verify that your role holds the kariah.members.export permission in /admin/permissions.

SEC-07A · Section 7: Mosque Activities and Programmes ✓ Fully Implemented

Creating, Updating & Scheduling Mosque Activities (/mosque-admin/activities)

Step-by-step instructions for creating mosque activities, configuring one-time or recurring schedules (daily, weekly, monthly, custom), managing locations, posters, registration URLs, and occurrence exceptions.

Purpose of Function Enable Mosque Administrators to publish lectures, classes, and community events on their microsite and the national activity calendar.
Prerequisites Signed in as `mosque_admin` with an active `activity_publishing` subscription entitlement.
Required User Permissions Mosque Scope: mosque.manage + Active Subscription (activity_publishing)

1. Creating or Updating a Mosque Activity (/mosque-admin/activities)

  1. Open /{lang}/mosque-admin/activities.
  2. Select the Activity Category and Status (draft, published, cancelled, or archived).
  3. Set the Start Date/Time (start_at) and End Date/Time (end_at) in Asia/Kuala_Lumpur time.
  4. Enter the SpeakerName, Event Location / Venue, optional Participant Capacity, and optional external Registration URL (must start with https://).
  5. Upload an optional Activity Poster (JPG, PNG, or WEBP, max 3 MB).
  6. Fill in the Title, Summary, and Description across the BM, EN, and AR tabs, then click Save.

2. Configuring Programme Recurrence Schedules

  1. Under Recurrence Type, choose:
    • once: Single occurrence.
    • daily: Repeats every N days.
    • weekly: Repeats on selected weekdays (mon..sun).
    • monthly: Repeats on a specific day of the month (1–31).
    • custom: Comma-separated list of custom YYYY-MM-DD dates (up to 60 dates).
  2. Optionally set an Until Date to bound the recurrence series.

3. Managing Single-Occurrence Exceptions

  1. Edit the recurring activity at /mosque-admin/activities?edit={id}.
  2. In the Occurrence Exceptions section, select a specific occurrence date, choose cancelled, rescheduled (with new start/end times), or restore, add an optional note, and click Save.
Mosque Activity Management, Recurrence Schedules, and Occurrence Exceptions (/mosque-admin/activities).
Mosque Activity Management, Recurrence Schedules, and Occurrence Exceptions (/mosque-admin/activities).

Input Fields & Options Reference

FieldTableValidation & Constraints
category_idmosque_activitiesMust reference an active category in activity_categories.
start_at & end_atmosque_activitiesend_at must be greater than or equal to start_at.
registration_urlmosque_activitiesOptional; only valid https:// URLs are accepted.
postermosque_activitiesJPG/PNG/WEBP ≤ 3 MB; served via /media/activity?id={id}.
recurrence_typeactivity_schedulesonce, daily, weekly, monthly, or custom.
Expected Results: The activity is published on `/masjid/{slug}/activities` and indexed in the national `/activities` directory and calendar.
Important Notes & Data Boundaries: Activity posters are stored outside the web root in `storage/activity-media/{mosque_id}/`.

Common Errors & Troubleshooting

If saving fails with an end-time error, ensure end_at is not earlier than start_at.

SEC-07B · Section 7: Mosque Activities and Programmes ✓ Fully Implemented

Managing Activity Categories & Featuring Portal Activities (/admin/activity-categories & /admin/featured-activities)

Instructions for Platform Administrators to manage trilingual activity categories and curate featured mosque activities on the public portal.

Purpose of Function Maintain a standardized nationwide activity taxonomy and highlight key mosque programmes on the Kariahku.com homepage.
Prerequisites Signed in with `portal.activities.feature` permission (`super_admin` or `portal_admin`).
Required User Permissions Global Scope: portal.activities.feature (/admin/activity-categories & /admin/featured-activities)

1. Managing Activity Categories (/admin/activity-categories)

  1. Open /{lang}/admin/activity-categories.
  2. Enter the category Slug, numeric Sort Order, check Active, and provide the category Name in BM, EN, and AR.
  3. Click Save. Active categories become selectable by all Mosque Administrators.
  1. Open /{lang}/admin/featured-activities.
  2. Check or uncheck the Featured box next to published mosque activities and click Save.
Activity Categories (/admin/activity-categories) and Featured Portal Activities (/admin/featured-activities).
Activity Categories (/admin/activity-categories) and Featured Portal Activities (/admin/featured-activities).

Input Fields & Options Reference

FieldTableDescription
slugactivity_categoriesUnique URL-safe category identifier.
is_activeactivity_categoriesEnables the category in mosque forms and public filters.
is_featuredmosque_activitiesHighlights the activity on the portal homepage and directory.
Expected Results: Activity categories and featured activity highlights are updated across the portal.
Important Notes & Data Boundaries: All changes are logged in `audit_logs` under `activity.category.saved` and `activity.featured.updated`.

Common Errors & Troubleshooting

If a category does not appear in mosque forms, verify that is_active is enabled.

SEC-07C · Section 7: Mosque Activities and Programmes ◐ Partially Implemented

Viewing Upcoming Programmes, Calendar, ICS Export & Participant/Attendance Status (/activities)

How to search and filter upcoming mosque programmes, switch between list and monthly calendar views, export ICS files, and understand external registration links versus unimplemented internal attendance tracking.

Purpose of Function Help community members discover mosque programmes and clarify how participant registration and activity reporting operate in the current system.
Prerequisites None.
Required User Permissions Public Access (/activities & /activity/{id})

1. Browsing & Filtering Upcoming Programmes (/activities)

  1. Visit /{lang}/activities.
  2. Filter programmes by Keyword, State, District, Mosque, Category, or Period (Today, This Week, This Month, Upcoming, or custom date range).
  3. Toggle between List View and Monthly Calendar View (?view=calendar&month=YYYY-MM).
  4. Click Export ICS (?format=ics) to import the schedule into Google Calendar, Apple Calendar, or Outlook.

2. Registering Participants & Managing Attendance (Current Status)

  • Participant Registration (External HTTPS Link): When a mosque configures a registration_url and optional capacity on an activity, the activity detail page at /{lang}/activity/{id} displays the capacity and direct registration link.
  • Internal Participant Roster & Attendance Tracking (Not Implemented): Internal participant sign-up rosters and attendance check-in tracking are not implemented in the current release.
  • Activity Reports: Aggregate activity reports by state, district, and category are implemented at /admin/reports, /main/reports, and /jakim/reports.
Public Activity Directory, Monthly Calendar View, ICS Export, and Programme Details (/activities).
Public Activity Directory, Monthly Calendar View, ICS Export, and Programme Details (/activities).

Input Fields & Options Reference

Query ParameterRouteFunction
view=calendar&month=YYYY-MM/activitiesRenders a full monthly calendar grid of expanded occurrences.
format=ics/activities, /activity/{id}Downloads an RFC 5545 iCalendar (.ics) file.
Expected Results: Visitors can browse upcoming programmes, view monthly calendars, export ICS feeds, and access external registration links.
Important Notes & Data Boundaries: Recurring schedules are automatically expanded into individual occurrences and honor any single-date cancellations or reschedules.

Common Errors & Troubleshooting

If no programmes match your filter, clear the date or district filter to view all upcoming activities nationwide.

SEC-08A · Section 8: Prayer Times Management ✓ Fully Implemented

Mosque Prayer Time Zone Configuration & Daily/Monthly Display (/mosque-admin/prayer & /prayer-times)

How to select a mosque’s official JAKIM prayer time zone, trigger schedule synchronization, view daily and monthly prayer times, and distinguish external JAKIM e-Solat data from manual configuration.

Purpose of Function Ensure every registered mosque displays authoritative JAKIM e-Solat prayer times for its exact geographical zone.
Prerequisites Signed in as `mosque_admin` for `/mosque-admin/prayer`; `/prayer-times` is publicly accessible.
Required User Permissions Mosque Scope: mosque.manage (/mosque-admin/prayer) | Public Access (/prayer-times)

1. Selecting & Updating the Mosque Prayer Time Zone (/mosque-admin/prayer)

  1. Sign in as a Mosque Administrator and open /{lang}/mosque-admin/prayer.
  2. Review the suggested official JAKIM zone for your mosque’s State and District.
  3. Select the appropriate zone in the Official Prayer Zone dropdown (prayer_zone_id). The server validates that the selected zone belongs to the mosque’s state.
  4. Click Save. The system updates mosques.prayer_zone_id and immediately synchronizes today’s and the current month’s schedules from JAKIM e-Solat.

2. Displaying Daily & Monthly Prayer Times (/prayer-times & Microsite)

  • Seven Daily Times: Displays Imsak, Subuh, Syuruk, Zohor, Asar, Maghrib, and Isyak along with Gregorian and Hijri dates.
  • Live Next-Prayer Highlight & Countdown: public/assets/js/prayer.js highlights the upcoming prayer card and runs a live countdown timer in Asia/Kuala_Lumpur time.
  • Monthly Schedule Table: Both /prayer-times and /mosque-admin/prayer display the full calendar month table.

3. External JAKIM e-Solat Data vs. Manual Configuration

Important Distinction: All prayer timestamps (Imsak through Isyak) and Hijri dates are retrieved exclusively from the official external JAKIM e-Solat API (https://www.e-solat.gov.my/). Mosque and platform administrators only configure the Official Zone Assignment (prayer_zone_id); manual entry or manual overriding of individual prayer times is intentionally prohibited.

Mosque Prayer Zone Configuration (/mosque-admin/prayer) and Daily/Monthly Prayer Schedule (/prayer-times).
Mosque Prayer Zone Configuration (/mosque-admin/prayer) and Daily/Monthly Prayer Schedule (/prayer-times).

Input Fields & Options Reference

Field / ActionScreenDescription
prayer_zone_id/mosque-admin/prayer, /mosque-admin/profileVerified JAKIM zone matching the mosque’s state.
action=sync/mosque-admin/prayerTriggers an immediate daily and monthly sync for the mosque’s assigned zone.
Expected Results: The mosque’s prayer zone is saved and official daily/monthly prayer times are rendered on the microsite and `/prayer-times`.
Important Notes & Data Boundaries: Every prayer sync operation records its status and HTTP code in `prayer_sync_logs`.

Common Errors & Troubleshooting

If saving a zone fails with a state mismatch error, ensure the mosque’s State in /mosque-admin/profile matches the state of the chosen JAKIM zone.

SEC-08B · Section 8: Prayer Times Management ✓ Fully Implemented

Automatic Prayer Time Sync, JAKIM e-Solat Source & Troubleshooting (/admin/prayer-times)

Technical and operational guide to automatic prayer time synchronization, the /admin/prayer-times administration console, CLI prayer-sync command, and troubleshooting missing times or API failures.

Purpose of Function Help Platform and Mosque Administrators keep prayer schedules up to date and diagnose synchronization or network errors.
Prerequisites Global `mosques.manage` permission for `/admin/prayer-times` or server CLI access for `php database/manage.php prayer-sync`.
Required User Permissions Global Scope: mosques.manage (/admin/prayer-times) or CLI prayer-sync

1. Official Prayer Time Source (JAKIM e-Solat)

Kariahku.com retrieves prayer times exclusively from the official JAKIM e-Solat endpoint:

  • Endpoint: https://www.e-solat.gov.my/index.php?r=esolatApi/takwimsolat&period={today|month}&zone={CODE}
  • Security & Validation: Enforces TLS certificate verification (`CURLOPT_SSL_VERIFYPEER = true`), a 12-second timeout, and strict `HH:MM` timestamp validation for all 7 prayer times before writing to `prayer_times`.

2. Automatic Updates & Admin Sync Controls (/admin/prayer-times)

  1. Automatic On-Demand Sync: Whenever a visitor opens `/prayer-times` or a mosque microsite and today’s schedule for that zone is not yet cached in `prayer_times`, `prayer_day_schedule()` automatically fetches today’s and the current month’s schedule from JAKIM e-Solat.
  2. Platform Admin Console (/admin/prayer-times):
    • Open /{lang}/admin/prayer-times.
    • Click Sync All Active Zones to refresh all 60 verified JAKIM zones, or select an individual zone and click Sync Zone.
  3. Scheduled CLI Command (Cron / Task Scheduler):
    php database/manage.php prayer-sync

3. Troubleshooting Missing Prayer Times & API Failures

  • Case 1 — Mosque Has No Zone Assigned: The microsite displays a configuration notice. Remedy: Assign an official zone in /mosque-admin/prayer.
  • Case 2 — Temporary JAKIM e-Solat Outage: If live synchronization fails, `prayer_day_schedule()` falls back to the most recent cached schedule for that zone in `prayer_times` and displays an explicit Stale Schedule Warning indicating the cached date.
  • Case 3 — Inspecting Sync Failures: Open /admin/prayer-times and review the Recent Synchronization Logs table (`prayer_sync_logs`) to check the `http_code` and `error_message`.
Platform JAKIM e-Solat Prayer Time Synchronization Console & Sync Logs (/admin/prayer-times).
Platform JAKIM e-Solat Prayer Time Synchronization Console & Sync Logs (/admin/prayer-times).

Input Fields & Options Reference

prayer_sync_logs ColumnDescription
period_typeSync scope: today, month, or catalogue.
statussuccess or failed.
records_writtenNumber of daily rows inserted/updated in prayer_times.
http_code & error_messageHTTP status code returned by e-Solat and diagnostic error message.
Expected Results: Prayer schedules across all 60 official JAKIM zones remain synchronized and resilient against temporary upstream outages.
Important Notes & Data Boundaries: The 60 official JAKIM prayer zones are seeded via `database/seeds/006_prayer_zones.php`.

Common Errors & Troubleshooting

If CLI or web sync fails with a cURL SSL certificate error on Windows/XAMPP, verify that curl.cainfo in php.ini points to a valid cacert.pem bundle and that outbound HTTPS to www.e-solat.gov.my is permitted.

SEC-09A · Section 9: Mosque Financial Management (Current Status) ◌ Planned / Not Yet Implemented

Mosque Financial Management: Current Implementation Status & Privacy Governance

Official verification report documenting that internal Mosque Financial Management (financial dashboard, income/expense ledgers, donations, account balances, and monthly/annual mosque financial statements) is not yet implemented in the current release.

Purpose of Function Accurately document the current codebase and database state regarding mosque financial modules without inventing unimplemented features.
Prerequisites None.
Required User Permissions Informational Governance Reference (Module Not Yet Implemented)

1. Current Status of Mosque Financial Management

Following a complete inspection of the Kariahku.com codebase and MariaDB schema, internal Mosque Financial Management is NOT implemented in the current application release:

  • There are no active screens, routes, or database tables for a mosque financial ledger dashboard, income recording, expense recording, donation collection records, financial account balances, or monthly/annual mosque financial statements.
  • The only financial workflows implemented in the current platform are Platform Subscription & Billing Management (documented in Section 11 at /mosque-admin/subscription, /main/subscription, /jakim/subscription, /admin/subscriptions, and /admin/payments).

2. Future Placeholder Registration in report_module_registry

In migration 014_reporting_registry.sql, two financial module placeholders are pre-registered in a disabled state:

  1. mosque_finance (Mosque Financial Management): enabled = 0, privacy_classification = 'sensitive_financial', national_allowed = 0, state_allowed = 0.
  2. donations (Donation & Collection Management): enabled = 0, privacy_classification = 'sensitive_financial', national_allowed = 0, state_allowed = 0.

3. Sensitive Financial Data Boundary

In functions/reports.php, institution_registered_reports() explicitly blocks any module classified as sensitive_financial from being queried or exported by MAIN or JAKIM institutional dashboards.

Mosque Financial Management Module Status in report_module_registry (Planned / Not Yet Implemented).
Mosque Financial Management Module Status in report_module_registry (Planned / Not Yet Implemented).

Input Fields & Options Reference

Registry Code in report_module_registryImplementation StatusPrivacy ClassificationMAIN / JAKIM Access
mosque_financePlanned / Not Implemented (enabled = 0)sensitive_financialDisabled (0 / 0)
donationsPlanned / Not Implemented (enabled = 0)sensitive_financialDisabled (0 / 0)
Expected Results: Administrators and stakeholders have an accurate, transparent record of which financial capabilities exist today versus those planned for future phases.
Important Notes & Data Boundaries: For platform subscription invoices, receipts, and payment methods, refer to Section 11 (Subscription and Billing Management).

Common Errors & Troubleshooting

If you are looking for your mosque’s Kariahku.com subscription invoice or receipt PDF, go to /{lang}/mosque-admin/subscription.

SEC-10A · Section 10: Khairat, Qurban and Other Integrated Systems ◌ Planned / Not Yet Implemented

Khairat, Qurban & Aqiqah, Committee Election & Other Integrated Systems (Current Status)

Official verification of the integration status for Khairat Management, Qurban and Aqiqah Management, Mosque Committee Election, and other future integrated mosque services.

Purpose of Function Clearly label which external or companion mosque applications are not yet integrated in the current Kariahku.com codebase.
Prerequisites None.
Required User Permissions Informational Reference (Modules Not Yet Integrated)

1. Current Integration Status of Companion Systems

Based on a thorough inspection of the Kariahku.com source code and database schema, the following companion systems are NOT YET INTEGRATED in the current release:

  • Khairat Management (Welfare / Bereavement Fund): Not yet integrated. No single sign-on (SSO), external app bridge, or khairat contribution/claim tables are active.
  • Qurban and Aqiqah Management: Not yet integrated. No livestock share booking or distribution workflow exists in the current codebase.
  • Mosque Committee Election System: Not yet integrated. (Note: Appointed committee members can be published in the public roster via /mosque-admin/committee, but nomination/voting election workflows are not implemented.)
  • Other Integrated Mosque Services: Not yet integrated.

2. Disabled Placeholders in report_module_registry

Migration 014_reporting_registry.sql reserves five disabled placeholder entries (enabled = 0) in report_module_registry for future architecture expansion:

  1. khairat — Khairat Welfare Management (enabled = 0)
  2. qurban_aqiqah — Qurban & Aqiqah Management (enabled = 0)
  3. committee — Committee Governance Summary (enabled = 0)
  4. community_programmes — Community Programme Participation (enabled = 0)
  5. future_modules — Reserved Future Kariahku Modules (enabled = 0)
Integrated Mosque Systems Status (Khairat, Qurban & Aqiqah, Committee Election) in report_module_registry.
Integrated Mosque Systems Status (Khairat, Qurban & Aqiqah, Committee Election) in report_module_registry.

Input Fields & Options Reference

Registry CodeSystem NameIntegration StatusSSO / Data Sharing
khairatKhairat ManagementNot Yet Integrated (enabled = 0)None active
qurban_aqiqahQurban & Aqiqah ManagementNot Yet Integrated (enabled = 0)None active
committeeMosque Committee ElectionNot Yet Integrated (Static roster only at /mosque-admin/committee)None active
community_programmesCommunity ProgrammesNot Yet Integrated (enabled = 0)None active
Expected Results: Users and administrators have a clear distinction between active Kariahku.com modules and future planned integrations.
Important Notes & Data Boundaries: Mosques wishing to publicize Khairat or Qurban registration drives today can publish announcements (`/mosque-admin/announcements`) or activities (`/mosque-admin/activities`) with an external HTTPS `registration_url`.

Common Errors & Troubleshooting

To publish your mosque’s current appointed committee (AJK) list on your microsite, use /{lang}/mosque-admin/committee.

SEC-11A · Section 11: Subscription and Billing Management ✓ Fully Implemented

Free One-Month Trial, Subscription Plans & Annual Discounts (/mosque-admin/subscription)

Complete documentation of the free 1-month trial lifecycle (activation on approval, start/end dates, status, upgrade, expiration) and monthly/annual subscription plans with annual discounts.

Purpose of Function Explain the exact trial and subscription plan rules implemented in Kariahku.com.
Prerequisites An `active` mosque with `subscriptions.view` permission at `/mosque-admin/subscription`.
Required User Permissions Mosque Scope: subscriptions.view (/mosque-admin/subscription) | Institution Scope: subscription.view

A. Free One-Month Trial

  1. Mosque Registration & Trial Activation: When a mosque application is approved at /admin/mosques, subscription_start_mosque_trial() automatically provisions a billing customer (billing_customers) and activates a trialing subscription on the Mosque Standard Plan (mosque-standard).
  2. Trial Start & End Dates: The trial spans exactly 1 calendar month from approval (trial_starts_at to trial_ends_at), clamped accurately to month-end dates via subscription_add_month_count().
  3. One-Trial-Per-Mosque Rule: Setting mosques.trial_consumed = 1 ensures each mosque receives the free trial once.
  4. Subscription Upgrade: At any point during trialing, the Mosque Administrator can open /{lang}/mosque-admin/subscription, select a billing interval, and generate a paid invoice.
  5. Trial Expiration: When trial_ends_at passes without payment:
    • Subscriptions with an open invoice transition to past_due and then a 7-day grace_period before becoming expired.
    • When expired or suspended, paid management features (`microsite_customization`, `announcements`, `activity_publishing`, `committee_management`, `editorial_publishing`, `kariah_membership`) are write-locked while all existing data and prayer times remain preserved.

B. Subscription Plans & Annual Payment Discounts

The table below lists the seeded subscription plans and pricing intervals in subscription_plans and subscription_plan_prices (configurable by Super Admin at /admin/subscriptions):

  1. Viewing Current Plans: Visit /{lang}/mosque-admin/subscription (or /main/subscription / /jakim/subscription) to view current plan status, period end date, and interval pricing.
  2. Changing Plans or Renewing: Select a Plan and Billing Interval (monthly, quarterly, semiannual, or annual) and click Generate Renewal Invoice.
Free One-Month Trial Status, Subscription Plans, and Annual Discounts (/mosque-admin/subscription).
Free One-Month Trial Status, Subscription Plans, and Annual Discounts (/mosque-admin/subscription).

Input Fields & Options Reference

Plan CodeCustomer TypeBilling IntervalList PriceDiscountNet Payable
mosque-standardMosque (mosque)Monthly (monthly)RM 50.000%RM 50.00
mosque-standardMosque (mosque)Quarterly (quarterly)RM 150.000%RM 150.00
mosque-standardMosque (mosque)Semi-Annual (semiannual)RM 300.000%RM 300.00
mosque-standardMosque (mosque)Annual (annual)RM 600.0010% (RM 60.00)RM 540.00
main-standardMAIN (main)Monthly / AnnualRM 500.00 / RM 6,000.000% / 10%RM 500.00 / RM 5,400.00
jakim-standardJAKIM (jakim)Monthly / AnnualRM 2,000.00 / RM 24,000.000% / 10%RM 2,000.00 / RM 21,600.00
Expected Results: Mosque and institutional administrators understand trial dates, plan pricing, annual discounts, and how to generate renewal invoices.
Important Notes & Data Boundaries: Already-issued invoices lock in their subtotal, discount, and amount due at issuance time.

Common Errors & Troubleshooting

If paid mosque management forms return HTTP 402, open /mosque-admin/subscription and pay the open renewal invoice to immediately restore full access.

SEC-11C · Section 11: Subscription and Billing Management ✓ Fully Implemented

Payment Management, Invoices & Receipts PDF, Failed Payments & Reactivation

Step-by-step instructions for paying subscription invoices via toyyibPay (FPX, DuitNow QR, Card) or Manual Bank Transfer, downloading PDF invoices and receipts, and resolving failed or overdue payments.

Purpose of Function Guide Mosque Administrators and Institutional Officers through completing subscription payments and retrieving official billing documents.
Prerequisites An open invoice (`issued` or `overdue`) at `/mosque-admin/subscription`, `/main/subscription`, or `/jakim/subscription`.
Required User Permissions Mosque Scope: subscriptions.view | Institution Scope: subscription.view & subscription.renew

1. Available Payment Methods

Kariahku.com implements 5 payment methods configured in payment_methods:

  • FPX Online Banking (fpx — toyyibPay): Instant online banking checkout via https://toyyibpay.com (or https://dev.toyyibpay.com in sandbox mode).
  • DuitNow QR (duitnow_qr — toyyibPay): QR code payment via banking and e-wallet apps.
  • Credit / Debit Card (card — toyyibPay): Card payment processed by toyyibPay.
  • Manual Bank Transfer (manual_transfer — Internal): Direct bank transfer accompanied by proof-of-payment file upload (PDF, JPG, or PNG, max 5 MB) for platform verification.
  • Institutional Invoice (institutional_invoice — Internal): Purchase Order / credit terms workflow for MAIN and JAKIM government authorities.

2. Making Subscription Payments

  1. Open /{lang}/mosque-admin/subscription (or /main/subscription / /jakim/subscription).
  2. Locate your open invoice (status issued or overdue) in the Invoices and Payment History table.
  3. Online Gateway Checkout (toyyibPay): Select FPX, DuitNow QR, or Card and click Pay. After completing checkout on toyyibPay, you return to /payment/return while the server callback (/payment/toyyibpay-callback) verifies the MD5 signature and activates your subscription.
  4. Manual Bank Transfer (Mosque): Enter the Bank Reference, upload your Payment Proof (PDF/JPG/PNG ≤ 5 MB), and submit. The payment enters pending_verification until approved at /admin/payments.

3. Viewing Payment History & Downloading Invoices / Receipts

  • Download Invoice PDF: Click Invoice PDF (/payment/invoice?id={invoice_id}) on any invoice row.
  • Download Official Receipt PDF: Once an invoice is settled (paid), click Receipt PDF (/payment/receipt?id={receipt_id}) to download the official receipt numbered RCP-YYYYMMDD-....

4. Failed Payments, Outstanding Balances, Suspension & Reactivation

  • Failed Payments: If a gateway checkout fails or a manual transfer is rejected, the invoice remains open so you can initiate a fresh payment attempt.
  • Overdue & Grace Period: Unpaid invoices past due_at move the subscription through past_due → 7-day grace_period → expired.
  • Automatic Reactivation: As soon as payment is confirmed, payment_apply_settled_invoice() automatically transitions the subscription back to active and advances the service period dates.
Payment Methods (toyyibPay FPX/DuitNow QR/Card & Manual Transfer), Invoice PDF, and Receipt PDF.
Payment Methods (toyyibPay FPX/DuitNow QR/Card & Manual Transfer), Invoice PDF, and Receipt PDF.

Input Fields & Options Reference

Document EndpointSerial FormatAccess Authorization
/payment/invoice?id={id}INV-YYYYMMDD-XXXXXXCustomer owner (Mosque / Institution) or Platform Billing Admin.
/payment/receipt?id={id}RCP-YYYYMMDD-XXXXXXCustomer owner (Mosque / Institution) or Platform Billing Admin.
/payment/proof?id={id}Uploaded Proof FileCustomer owner or Platform Admin with payments.manage.
Expected Results: Subscription payments are processed securely, PDF invoices and receipts are downloadable on demand, and expired subscriptions reactivate upon settlement.
Important Notes & Data Boundaries: Invoices remain accessible even when a mosque or institutional subscription has expired so administrators can always download invoices and complete renewal.

Common Errors & Troubleshooting

If you uploaded a manual bank transfer proof and the subscription is not yet active, wait for a Platform Administrator to verify the transfer at /admin/payments.

SEC-11D · Section 11: Subscription and Billing Management ✓ Fully Implemented

Platform Billing Administration: Plans, Fees, Discounts, Payment Review & Revenue Reports (/admin/subscriptions & /admin/payments)

Step-by-step instructions for Super Administrators to manage subscription plans, configure fees and annual discounts, manage trial accounts, verify manual payments, and review revenue reports.

Purpose of Function Enable Platform Billing Administrators to govern pricing, verify bank transfer proofs, configure gateway credentials, and monitor billing revenue.
Prerequisites Signed in as `super_admin` (`subscriptions.manage` and `payments.manage`).
Required User Permissions Global Scope: subscriptions.manage (/admin/subscriptions) & payments.manage (/admin/payments)

1. Managing Subscription Plans, Fees & Annual Discounts (/admin/subscriptions)

  1. Open /{lang}/admin/subscriptions.
  2. In the plan pricing form, configure the list prices for monthly, quarterly, semiannual, and annual intervals and set the Annual Discount Percentage (0% to 90%, default 10%).
  3. Click Save Pricing.
  4. In the customer subscriptions table, you can inspect trial accounts, issue invoices, or apply administrative lifecycle transitions with a mandatory reason note. You can also run daily lifecycle maintenance via CLI:
    php database/manage.php subscription-maintenance

2. Reviewing Manual Payments & Gateway Settings (/admin/payments)

  1. Open /{lang}/admin/payments.
  2. In the Pending Payment Verification queue (`pending_verification`):
    • Click Proof to inspect the uploaded bank slip via /payment/proof?id={payment_id}.
    • Enter a Verification Note and click Verify (marks the invoice `paid`, generates an official receipt, and activates the subscription) or Reject.
  3. In the Payment Gateway Configuration panel, configure toyyibPay mode (`sandbox` or `production`), category code, and secret key (encrypted at rest using AES-256-GCM).

3. Generating Revenue Reports

At the top of /{lang}/admin/payments, the revenue summary cards report settled revenue (`paid_total`), pending verification total (`pending_total`), failed payments (`failed_total`), and overdue invoice balances (`overdue_total`).

Subscription Plan Administration (/admin/subscriptions) and Payment Verification & Revenue Reports (/admin/payments).
Subscription Plan Administration (/admin/subscriptions) and Payment Verification & Revenue Reports (/admin/payments).

Input Fields & Options Reference

Administrative CapabilityRouteRequired Permission
Configure Plan Fees & Annual Discounts/admin/subscriptionssubscriptions.manage
Manage Trial Accounts & Lifecycle Status/admin/subscriptionssubscriptions.manage
Verify Manual Transfers & Issue Receipts/admin/paymentspayments.manage
Configure toyyibPay & View Revenue Reports/admin/paymentspayments.manage
Expected Results: Subscription plans, fees, discounts, manual payment verifications, and revenue summaries are managed with full audit logging.
Important Notes & Data Boundaries: Gateway secret keys are encrypted at rest with AES-256-GCM via `payment_encrypt_secret()`.

Common Errors & Troubleshooting

Schedule php database/manage.php subscription-maintenance daily to automatically process trial expirations, overdue transitions, and 30/14/7/1-day renewal reminders.

SEC-12A · Section 12: Majlis Agama Islam Negeri (MAIN) Dashboard ✓ Fully Implemented

Majlis Agama Islam Negeri (MAIN) Dashboard: State Statistics, District Filters & Reports (/main/dashboard & /main/reports)

Dedicated guide for authorized State Islamic Religious Council (MAIN) users covering dashboard login, viewing authorized mosques, filtering by district, reviewing state statistics, and downloading CSV/PDF reports.

Purpose of Function Enable state religious authority officers to monitor registered mosques and community activities within their authorized state jurisdiction.
Prerequisites An active user account assigned to an active `main` institution with verified state access in `institution_state_access` and an active institutional subscription.
Required User Permissions Institution Scope (MAIN): dashboard.view, reports.view, reports.export

1. Logging Into the State Authority Dashboard (/main/dashboard)

  1. Sign in at /{lang}/login using your authorized MAIN officer account.
  2. Navigate to /{lang}/main/dashboard.
  3. The system verifies your active `institution_users` binding, checks that your MAIN institution and its subscription are active, and loads your verified state scope from `institution_state_access`.

2. Viewing Authorized Mosques, District Breakdowns & Activity Statistics

  • State Summary Cards: Displays Registered Mosques (`total_mosques`), Active Mosques (`active_mosques`), Inactive/Suspended Mosques (`inactive_mosques`), and Published Activities (`published_activities`) within your state.
  • Mosques by District: Progress bar chart showing active registered mosque counts across every district in your state.
  • Published Activities Summary: Shows activity counts for Today, This Week, and This Month along with category breakdowns.

3. Filtering by District & Generating State-Level Reports (/main/reports)

  1. In the filter bar on /{lang}/main/dashboard or /{lang}/main/reports:
    • Select an authorized State, optionally enter a District ID (district_id), and specify Start Date / End Date filters for activity reports.
    • Click Apply Filters.
  2. Choose from the 5 state-level reports enabled for MAIN institutions:
    • mosque_directory — State Registered Mosque Directory
    • mosque_status_summary — State Mosque Status Summary
    • mosque_by_district — Mosques by District Breakdown
    • mosque_activity_summary — State Mosque Activity Summary
    • activity_categories — State Activity Category Distribution
  3. Click View Report to inspect the interactive chart and paginated table, or click Export CSV / Export PDF to download the report.
Majlis Agama Islam Negeri (MAIN) State Dashboard, District Breakdown, and State Reports (/main/dashboard & /main/reports).
Majlis Agama Islam Negeri (MAIN) State Dashboard, District Breakdown, and State Reports (/main/dashboard & /main/reports).

Input Fields & Options Reference

Filter ParameterApplicable ReportsDescription
state_idAll MAIN reportsRestricted strictly to state IDs verified in institution_state_access.
district_idmosque_directory, mosque_by_district, mosque_activity_summaryNarrows report rows to a specific district within the authorized state.
date_from, date_tomosque_activity_summary, activity_categoriesFilters activity start dates (`YYYY-MM-DD`).
format=csv / format=pdfAll MAIN reportsDownloads the report as a UTF-8 CSV or formatted PDF document.
Expected Results: MAIN officers can view district-level mosque statistics and export verified state reports in CSV and PDF formats.
Important Notes & Data Boundaries: Every dashboard view and report export is logged in `institution_report_logs` and `report_execution_logs`.

Common Errors & Troubleshooting

Attempting to pass a state_id outside your verified state grant immediately returns HTTP 403 Forbidden ("Requested state is outside this institution jurisdiction").

SEC-12B · Section 12: Majlis Agama Islam Negeri (MAIN) Dashboard ✓ Fully Implemented

Understanding MAIN Data Access Restrictions & State Subscription Billing (/main/subscription)

Detailed explanation of state jurisdiction enforcement for MAIN users, kariah privacy boundaries, and managing state institutional subscriptions at /main/subscription.

Purpose of Function Ensure MAIN officers understand their state data access boundaries and how to renew institutional reporting access.
Prerequisites An authenticated `main` institution user account.
Required User Permissions Institution Scope (MAIN): subscription.view & subscription.renew (/main/subscription)

1. Understanding State Authority Data Access Restrictions

Kariahku.com enforces four server-side data boundary rules for all MAIN users:

  1. Verified State Scope Only: `institution_scope_filter()` restricts every SQL query to `mosques.state_id` values explicitly verified (`verified_by IS NOT NULL`) in `institution_state_access` for that MAIN institution.
  2. No Nationwide Escalation: `main` institutions cannot be configured with `jurisdiction_mode = 'nationwide'` and cannot access `/jakim/*` routes or `national_allowed`-only reports.
  3. Aggregate Reporting & PII Protection: MAIN reports expose aggregate mosque and activity metrics only. Individual kariah member names, phone numbers, and home addresses (`kariah_people`) are never exposed to institutional dashboards.
  4. Platform Coverage Disclosure: Exported CSV and PDF reports explicitly state that metrics reflect Kariahku.com registered mosque records only; not a census of all mosques in Malaysia.

2. Managing MAIN Subscriptions & Invoices (/main/subscription)

  1. Open /{lang}/main/subscription.
  2. Users with the institutional administrator role can select the main-standard plan, choose monthly (RM 500.00) or annual (RM 5,400.00 with 10% discount), and click Generate Renewal Invoice.
  3. Even if reporting access expires, `/main/subscription` and invoice PDF downloads remain accessible so the institution can complete renewal payment.
MAIN State Data Access Boundaries & Institutional Subscription Management (/main/subscription).
MAIN State Data Access Boundaries & Institutional Subscription Management (/main/subscription).

Input Fields & Options Reference

Governance AttributeMAIN Enforcement Rule
institution_typemain
jurisdiction_modestate (`nationwide` mode is rejected by `institution_nationwide_scope_valid()`)
Permitted ReportsOnly reports with `state_allowed = 1` and `enabled = 1` in `report_module_registry`.
Expected Results: MAIN users understand state data boundaries and can manage their institutional subscription renewals smoothly.
Important Notes & Data Boundaries: Institutional `report_viewer` users can view `/main/subscription` and download invoice PDFs, while only `administrator` users hold `subscription.renew`.

Common Errors & Troubleshooting

If your MAIN institution shows "No verified state jurisdiction is configured", ask a Platform Super Admin to verify your state grant at /admin/institutions.

SEC-13A · Section 13: JAKIM National Dashboard ✓ Fully Implemented

JAKIM National Dashboard: National Statistics, State-by-State Summaries & Report Export (/jakim/dashboard & /jakim/reports)

Complete guide for authorized JAKIM users covering national mosque statistics, state-by-state summaries, activity summaries, privacy exclusions, national reporting filters, and CSV/PDF exports.

Purpose of Function Enable federal JAKIM officers to monitor nationwide aggregate mosque and activity statistics across all 16 Malaysian states and federal territories.
Prerequisites An active user account assigned to an active `jakim` institution with verified `nationwide` jurisdiction across all 16 states/territories and an active subscription.
Required User Permissions Institution Scope (JAKIM Nationwide): dashboard.view, reports.view, reports.export

1. Accessing the JAKIM National Dashboard (/jakim/dashboard)

  1. Sign in at /{lang}/login and navigate to /{lang}/jakim/dashboard.
  2. `institution_require_national_access()` verifies that your institution has `institution_type = 'jakim'`, `jurisdiction_mode = 'nationwide'`, and verified grants covering all 16 Malaysian states and federal territories.
  3. An informational notice highlights that metrics reflect Kariahku.com registered mosque records only.

2. National Reporting Metrics & Coverage

  • National Mosque Statistics: Top-level cards display nationwide Registered Mosques, Active Mosques, Inactive/Suspended Mosques, and Published Activities.
  • State-by-State Summaries: The Registered Mosques by State progress chart compares active registered mosque counts across all 16 states and federal territories.
  • Mosque Registration & Status Statistics: Available via `national_mosque_directory`, `mosque_by_state`, and `mosque_status_summary`.
  • Mosque Activity Summaries: Displays Today, This Week, and This Month activity counts, category breakdowns, and the `national_activity_summary` report.
  • Kariah Membership & Financial Summary Policy: In accordance with platform data-sharing and privacy policies (`privacy_classification`), individual kariah member records and sensitive financial modules (`mosque_finance`, `donations`) are disabled and excluded from national reporting.

3. National Reporting Filters & Exporting Reports (/jakim/reports)

  1. Use the filter bar to view All Authorized States (nationwide) or narrow down by a specific State (`state_id`), District ID (`district_id`), and Start / End Date range.
  2. Select any of the 8 enabled national and cross-state reports (including the 3 national-exclusive reports: `national_mosque_directory`, `mosque_by_state`, and `national_activity_summary`).
  3. Click View Report for on-screen charts and tables, or click Export CSV / Export PDF to download the dataset.
JAKIM National Dashboard, State-by-State Summaries, and National Reports (/jakim/dashboard & /jakim/reports).
JAKIM National Dashboard, State-by-State Summaries, and National Reports (/jakim/dashboard & /jakim/reports).

Input Fields & Options Reference

National Report CodeReport TitleSupported Filters
national_mosque_directoryNational Registered Mosque Directorystate_id, district_id
mosque_by_stateMosques by State Summarystate_id
national_activity_summaryNational Mosque Activity Summarystate_id, date_from, date_to
mosque_directory, mosque_status_summary, mosque_by_district, mosque_activity_summary, activity_categoriesStandard Cross-State Reportsstate_id, district_id, date_from, date_to
Expected Results: JAKIM officers can analyze nationwide and state-by-state registered mosque and activity statistics and export CSV/PDF reports.
Important Notes & Data Boundaries: All CSV and PDF exports include the mandatory coverage disclaimer and write audit records to `institution_report_logs` and `report_execution_logs`.

Common Errors & Troubleshooting

If `/jakim/dashboard` returns 403 Forbidden with a nationwide scope error, verify in `/admin/institutions` that the JAKIM institution has verified state grants for all 16 states.

SEC-13B · Section 13: JAKIM National Dashboard ✓ Fully Implemented

Difference Between JAKIM National Reporting Access & MAIN State-Level Access (/jakim/subscription)

Side-by-side architectural and operational comparison between JAKIM national-level reporting access and Majlis Agama Islam Negeri (MAIN) state-level reporting access.

Purpose of Function Clearly explain how jurisdiction enforcement, report availability, dashboard charts, and subscription plans differ between JAKIM and MAIN.
Prerequisites Reference guide for MAIN, JAKIM, and Super Admin users.
Required User Permissions Institution Scope (JAKIM / MAIN Reference) & Global institutions.manage

1. Key Differences: JAKIM (National Scope) vs. MAIN (State Scope)

While both authorities share the institutional reporting engine (`institution/dashboard.php` and `functions/reports.php`), strict authorization rules separate their capabilities:

  • Geographic Jurisdiction Scope:
    • MAIN: Configured with `jurisdiction_mode = 'state'`. Restricted strictly to the specific state(s) verified in `institution_state_access`.
    • JAKIM: Configured with `jurisdiction_mode = 'nationwide'`. Validated by `institution_nationwide_scope_valid()` to ensure verified grants exist for all 16 Malaysian states and federal territories.
  • Available Report Catalogue:
    • MAIN: Can run the 5 reports where `state_allowed = 1` (`mosque_directory`, `mosque_status_summary`, `mosque_by_district`, `mosque_activity_summary`, `activity_categories`).
    • JAKIM: Can run all 8 reports where `national_allowed = 1`, including the 3 nationwide comparative reports: `national_mosque_directory`, `mosque_by_state`, and `national_activity_summary`.
  • Dedicated Routes & Subscription Plans:
    • MAIN: Uses `/main/dashboard`, `/main/reports`, and `/main/subscription` (`main-standard`: RM 500/month or RM 5,400/year).
    • JAKIM: Uses `/jakim/dashboard`, `/jakim/reports`, and `/jakim/subscription` (`jakim-standard`: RM 2,000/month or RM 21,600/year).
Comparison of JAKIM National-Level Reporting Access vs. MAIN State-Level Reporting Access.
Comparison of JAKIM National-Level Reporting Access vs. MAIN State-Level Reporting Access.

Input Fields & Options Reference

Capability / RuleMajlis Agama Islam Negeri (MAIN)JAKIM (National Authority)
institution_typemainjakim
jurisdiction_modestatenationwide (requires all 16 states verified)
Dashboard Route/{lang}/main/dashboard/{lang}/jakim/dashboard
Primary Breakdown ChartMosques by District (within state)Registered Mosques by State (all 16 states)
National-Only ReportsBlocked (`403 Forbidden`)national_mosque_directory, mosque_by_state, national_activity_summary
Standard Billing Planmain-standard (RM 500/mo, RM 5,400/yr)jakim-standard (RM 2,000/mo, RM 21,600/yr)
Expected Results: Authority officers and platform administrators clearly understand the separation between state-level MAIN access and nationwide JAKIM access.
Important Notes & Data Boundaries: Neither MAIN nor JAKIM can access individual kariah member personal records or disabled financial placeholders.

Common Errors & Troubleshooting

Super Administrators can provision and verify MAIN and JAKIM institutions and their state grants at /{lang}/admin/institutions.

SEC-14A · Section 14: Reporting and Data Export ✓ Fully Implemented

Platform Reports (/admin/reports), Billing Revenue Reports & Mosque Kariah Member Reports

Complete specification of all implemented Platform-level and Mosque-level reports, detailing report purpose, authorized roles, filters, data sources, generation steps, and export formats.

Purpose of Function Provide an authoritative reference for generating and interpreting platform administration, billing revenue, and mosque kariah membership reports.
Prerequisites Permissions `reports.platform.view`, `reports.content.view`, `payments.manage`, or `kariah.members.export` according to report type.
Required User Permissions Global: reports.platform.view / reports.content.view (/admin/reports) | Mosque: kariah.members.export

1. Platform & Content Summary Report (/admin/reports)

  • Report Purpose: Monitor registered mosques by state and status, user and announcement counts, published activities by period/category/mosque, JAKIM prayer sync health, and the 50 most recent security audit logs.
  • Authorized Roles: super_admin (full report + audit log table) and portal_admin (content & activity metrics via reports.content.view).
  • Data Sources: mosques, states, users, mosque_announcements, mosque_activities, activity_categories, prayer_zones, prayer_sync_logs, and audit_logs.
  • How to Generate & Print: Navigate to /{lang}/admin/reports. Use browser print (`Ctrl+P` / `Cmd+P`) to print or save as PDF.

2. Platform Billing Revenue Summary (/admin/payments)

  • Report Purpose: Track settled subscription revenue (`paid_total`), pending manual verifications (`pending_total`), failed payments (`failed_total`), and overdue invoice balances (`overdue_total`).
  • Authorized Roles: super_admin (`payments.manage`).
  • Data Sources: subscription_payments and subscription_invoices.

3. Mosque Kariah Member Directory & Area Report (/mosque-admin/kariah-members)

  • Report Purpose: Generate residential area headcounts (Locality/Mukim, Kampung, Taman, Street), status breakdowns, 12-month registration trends, and filtered member lists for a single mosque tenant.
  • Authorized Roles: mosque_admin (`mosque.manage` for on-screen report; `kariah.members.export` for CSV export).
  • Available Filters: Keyword (`q`), Residential Area (`area_id`), Membership Status (`status`), Registration Date range (`from`, `to`), and Sort (`sort`, `dir`).
  • Data Sources: kariah_members, kariah_people, kariah_areas, kariah_households, and kariah_household_members scoped to `mosque_id`.
  • How to Export CSV: Apply desired filters on /{lang}/mosque-admin/kariah-members and click Export CSV (`?export=csv`).
Platform Administration Reports (/admin/reports) and Mosque Kariah Member Directory CSV Export.
Platform Administration Reports (/admin/reports) and Mosque Kariah Member Directory CSV Export.

Input Fields & Options Reference

Report NameRouteAuthorized RolesSupported Export / Print
Platform & Content Report/admin/reportssuper_admin, portal_adminOn-Screen Table / Browser Print
Billing Revenue Summary/admin/paymentssuper_admin (payments.manage)On-Screen Summary + Invoice/Receipt PDF
Kariah Member Directory Report/mosque-admin/kariah-membersmosque_admin (kariah.members.export)UTF-8 BOM CSV Download + On-Screen Table
Expected Results: Authorized administrators can generate, interpret, and export platform, billing, and kariah membership reports.
Important Notes & Data Boundaries: CSV exports include a UTF-8 byte-order mark (`\xEF\xBB\xBF`) so Microsoft Excel opens Malay and Arabic characters cleanly without encoding corruption.

Common Errors & Troubleshooting

Native `.xlsx` binary export is not used; open the downloaded `.csv` file directly in Microsoft Excel, Google Sheets, or LibreOffice Calc.

SEC-14B · Section 14: Reporting and Data Export ✓ Fully Implemented

Complete Reference of Institutional Reports (MAIN & JAKIM): Filters, Data Sources, CSV & PDF

Detailed specification of every implemented institutional report in report_module_registry, covering report purpose, authorized roles, filters, data sources, result interpretation, and CSV/PDF export.

Purpose of Function Provide an authoritative catalog of all 8 institutional reports available at /main/reports and /jakim/reports.
Prerequisites An active MAIN or JAKIM institutional account holding `reports.view` and `reports.export`.
Required User Permissions Institution Scope (MAIN / JAKIM): reports.view & reports.export

1. How to Generate, Interpret & Export Institutional Reports

  1. Open /{lang}/main/reports (for MAIN) or /{lang}/jakim/reports (for JAKIM).
  2. Select your desired filters (`state_id`, `district_id`, `date_from`, `date_to`) and click Apply Filters.
  3. On any report card:
    • Click View Report to render the on-screen Visual Chart (`institution/report-chart.php`) and paginated data table (50 rows per page).
    • Click Export CSV (`?report={code}&format=csv`) to download the complete dataset as a UTF-8 BOM CSV file with formula-injection protection.
    • Click Export PDF (`?report={code}&format=pdf`) to download a formatted PDF report summary.

2. Complete Specification of All 8 Implemented Institutional Reports

The table below documents every active report (`enabled = 1`) in `report_module_registry`:

Catalogue of all 8 Institutional Reports (MAIN & JAKIM), Visual Chart, Data Table, and CSV/PDF Export.
Catalogue of all 8 Institutional Reports (MAIN & JAKIM), Visual Chart, Data Table, and CSV/PDF Export.

Input Fields & Options Reference

Report Code & Name Report Purpose Authorized Roles Available Filters Data Source & Sample Output Columns
mosque_directory
Registered Mosque Directory
Lists active registered mosques with location and prayer zone metadata. MAIN & JAKIM (administrator, report_viewer) state_id, district_id Tables: mosques, states, districts, prayer_zones.
Columns: name, mosque_type, state_name, district_name, postcode, prayer_zone, approved_at.
mosque_status_summary
Mosque Status Summary
Aggregates registered mosque counts by lifecycle status. MAIN & JAKIM state_id Table: mosques.
Columns: status, total.
mosque_by_district
Mosques by District
Compares active registered mosque counts across districts. MAIN & JAKIM state_id, district_id Tables: districts, states, mosques.
Columns: state_name, district_name, active_mosques.
mosque_activity_summary
Mosque Activity Summary
Counts published activities per active registered mosque. MAIN & JAKIM state_id, district_id, date_from, date_to Tables: mosques, states, districts, mosque_activities.
Columns: mosque_name, state_name, district_name, published_activities.
activity_categories
Activity Categories
Measures published activity distribution across programme categories. MAIN & JAKIM state_id, date_from, date_to Tables: activity_categories, activity_category_translations, mosque_activities, mosques.
Columns: category, published_activities.
national_mosque_directory
National Mosque Directory
Nationwide directory of active registered mosques across Malaysia. JAKIM Only (national_allowed = 1, state_allowed = 0) state_id, district_id Tables: mosques, states, districts, prayer_zones.
Columns: name, mosque_type, state_name, district_name, postcode, prayer_zone, approved_at.
mosque_by_state
Mosques by State
State-by-state comparison of active vs. total registered mosques. JAKIM Only (national_allowed = 1, state_allowed = 0) state_id Tables: states, mosques.
Columns: state_name, active_mosques, total_registered_records.
national_activity_summary
National Activity Summary
State-by-state comparison of published mosque activities nationwide. JAKIM Only (national_allowed = 1, state_allowed = 0) state_id, date_from, date_to Tables: states, mosques, mosque_activities.
Columns: state_name, published_activities.
Expected Results: MAIN and JAKIM officers can generate, interpret, and export all authorized reports in CSV and PDF formats.
Important Notes & Data Boundaries: CSV exports prepend a Coverage disclaimer row and neutralize leading `=`, `+`, `-`, or `@` characters.

Common Errors & Troubleshooting

If `date_from` is later than `date_to`, the report endpoint returns HTTP `422` with "Start date must not be after end date."

SEC-19A · Section 19: Troubleshooting, Error Guide & Manual Administration ✓ Fully Implemented

Troubleshooting & System Error Message Reference Guide

Complete diagnostic reference covering all 10 major error scenarios: login failure, forgotten password, access denied (403), tenant mismatch, missing prayer times, expired trial/unpaid subscription (402), file upload failure, form validation failure, and duplicate kariah records.

Purpose of Function Equip users and administrators to quickly diagnose error messages and apply verified remedies.
Prerequisites None.
Required User Permissions Public Access / All Users

1. Login Failure & Forgotten Password

  • Symptom: "Invalid email or password" on /login.
  • Cause & Remedy:
    1. Verify email spelling and confirm that the account status in `users` is `active` (not `suspended`).
    2. If 5 failed attempts occurred within 15 minutes, wait 15 minutes for the brute-force lock to clear.
    3. To reset a forgotten password, visit /{lang}/forgot-password, request a reset token (valid for 60 minutes), and set a new 12–72 character password at /{lang}/reset-password.

2. Access Denied (403 Forbidden) & Tenant Mismatch

  • Symptom: HTTP `403 Forbidden` when opening a management screen or submitting an action.
  • Cause & Remedy:
    1. Missing Role Permission: Check the live permission matrix at `/manual/roles` or `/admin/permissions`.
    2. Mosque Tenant Mismatch: Attempting to modify records belonging to another `mosque_id`. Visit `/mosque-admin` and select your authorized mosque.
    3. MAIN/JAKIM Jurisdiction Mismatch: Filtering by a `state_id` outside your verified `institution_state_access` grants.

3. Missing Prayer Times or Stale Schedule Warning

  • Symptom: Prayer widget shows a zone setup prompt or stale cached schedule warning.
  • Remedy: Select a verified `prayer_zone_id` in `/mosque-admin/prayer` and click Sync Now, or run `php database/manage.php prayer-sync`.

4. Expired Trial & Unpaid Subscription (HTTP 402)

  • Symptom: Read-only subscription banner on `/mosque-admin/*`, HTTP `402 Payment Required` on form submission, or locked institutional dashboard on `/main/dashboard` or `/jakim/dashboard`.
  • Remedy: Open `/mosque-admin/subscription`, `/main/subscription`, or `/jakim/subscription`, generate a renewal invoice if needed, and complete payment via toyyibPay or manual bank transfer.

5. File Upload Failure, Form Validation Failure & Duplicate Kariah Member Record

  • File Upload Failure:
    • Mosque registration documents (`/register-mosque`) & payment proofs: must be PDF, JPG, or PNG (≤ 5 MB).
    • Mosque logo/cover, CMS/editorial images & activity posters: must be JPG, PNG, or WEBP (≤ 3 MB).
  • Form Validation Failure (HTTP 400 / 422): Ensure postcodes are 5 digits, external links start with `https://`, end times are not before start times, and browser cookies are enabled for CSRF validation.
  • Duplicate Kariah Member Record: When an application is flagged Possible duplicate — review manually in `/mosque-admin/kariah-members`, check the Member Directory first. If the applicant is genuinely a distinct individual, check Approve as separate member and enter a 10+ character reason.
Kariahku.com Common System Errors & Step-by-Step Diagnostic Troubleshooting Guide.
Kariahku.com Common System Errors & Step-by-Step Diagnostic Troubleshooting Guide.

Input Fields & Options Reference

HTTP Status / ErrorPrimary CauseImmediate Remedy
400 Bad RequestMissing or expired CSRF token.Refresh the page, ensure cookies are enabled, and resubmit.
402 Payment RequiredTrial expired or subscription is expired / suspended.Settle the renewal invoice on your subscription page.
403 ForbiddenInsufficient role permission or cross-tenant/cross-state access attempt.Verify active role permissions or switch active mosque at /mosque-admin.
405 Method Not AllowedPOST to a read-only route or GET to /logout.Use the standard in-app navigation and form buttons.
422 Unprocessable EntityValidation error (postcode, email, date range, file MIME/size, or duplicate record).Read the alert banner above the form and correct the highlighted field.
Expected Results: Users and administrators can rapidly diagnose and resolve any operational error in Kariahku.com.
Important Notes & Data Boundaries: For additional categorized Q&A across all 11 topics, visit the <a href="faq"><strong>FAQ Center</strong></a> at `/{lang}/manual/faq`.

Common Errors & Troubleshooting

If you encounter an unexpected server issue, check PHP and database connectivity using php database/manage.php status.

SEC-17A · Section 19: Troubleshooting, Error Guide & Manual Administration ✓ Fully Implemented

User Manual Content Administration (/admin/manual): Articles, Translations, Screenshots & Revisions

Step-by-step guide for Platform Administrators to manage manual categories, create/edit trilingual articles (BM/EN/AR), upload screenshots, assign roles, review revision history, and monitor user feedback.

Purpose of Function Enable authorized administrators to maintain and expand Kariahku.com documentation directly from the admin workspace.
Prerequisites Signed in with `manual.manage` permission (`super_admin` or `portal_admin`).
Required User Permissions Global Scope: manual.manage (/admin/manual)

1. Creating & Editing Manual Articles (/admin/manual)

  1. Sign in and open /{lang}/admin/manual.
  2. Click Add New Article or click Edit next to any existing article.
  3. Configure article metadata:
    • Select the Category / Chapter, enter the URL Slug, Article Code (e.g., SEC-05A), Module Key, and Associated System Route (`route_context`, used for Context-Sensitive Help).
    • Set Implementation Status (`implemented`, `partial`, or `planned`), Publication Status (`draft`, `published`, or `archived`), Sort Order, and Version.
    • Select the applicable User Roles.
  4. Complete the content across the Bahasa Melayu, English, and العربية tabs: Title, Summary, Purpose, Prerequisites, Step-by-Step Instructions, Field Guide, Expected Result, Important Notes, and Troubleshooting.
  5. Enter a Revision Change Note and click Save Manual Article.

2. Uploading Screenshots & Managing Categories, FAQs & Feedback

  1. While editing an article at /admin/manual?edit={id}, use the Upload Screenshot form to upload a PNG, JPG, or WEBP screenshot (max 4 MB) with trilingual captions.
  2. Switch to the Categories / Chapters tab to add, edit, or reorder manual chapters.
  3. Switch to the FAQ tab to manage trilingual FAQ items across all 11 FAQ categories.
  4. Switch to the User Feedback Summary tab to review helpfulness ratings and user comments.
User Manual Content Management Module (/admin/manual) for Articles, Translations, Screenshots & FAQs.
User Manual Content Management Module (/admin/manual) for Articles, Translations, Screenshots & FAQs.

Input Fields & Options Reference

Manual Database TablePrimary Responsibility
manual_categoriesStores manual chapters, icons, sort order, and trilingual titles/descriptions.
manual_articles & manual_article_translationsStores article metadata, route context, and reviewed BM, EN, and AR content.
manual_screenshotsStores verified screenshot paths under public/assets/manual/screenshots/ and trilingual captions.
manual_article_rolesMaps articles to user roles for role-specific filtering and printing.
manual_revisionsRecords JSON snapshots, version numbers, change notes, and actor IDs on every save.
manual_feedbackStores article helpfulness votes and optional user feedback comments.
Expected Results: Manual categories, trilingual articles, screenshots, and FAQs are updated live with CSRF protection, DOM HTML sanitization, and revision tracking.
Important Notes & Data Boundaries: All HTML fields pass through `manual_sanitize_html()` to strip unsafe tags and attributes before database storage.

Common Errors & Troubleshooting

If a newly saved article is not visible in the public Help Center, verify that its status is set to published and its parent category is active.