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 FunctionProvide mosque administrators, kariah members, religious authority officers, and public visitors with an accurate understanding of the Kariahku.com platform.
PrerequisitesNo login account is required. Accessible via any modern web browser.
Required User PermissionsPublic 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
Digital Standardization: Equip every registered masjid, surau, and surau Jumaat with an official microsite at /masjid/{slug} without requiring separate hosting.
Jurisdiction-Aware Governance: Enforce strict tenant isolation between mosques (by mosque_id) and state jurisdiction boundaries for MAIN institutions (by state_id).
Authoritative Prayer Schedules: Synchronize prayer times exclusively from the official JAKIM e-Solat service rather than unverified manual entry.
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).
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
For Mosques: Streamlines kariah member records organized by kampung, taman, and street, publishes programmes, and maintains an official web presence.
For Kariah Members & Public: Provides verified daily prayer times, searchable mosque programmes, and privacy-respecting online kariah membership applications (without requiring national IC numbers).
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.
Input Fields & Options Reference
Portal Component
URL Route
Primary Function
Portal Homepage
/{lang}
Quick mosque search, upcoming activities, prayer times, and portal announcements.
Mosque Directory
/{lang}/mosques
Searchable directory of active registered mosques filtered by State and District.
Activities Directory
/{lang}/activities
Nationwide mosque programme listing and monthly calendar view.
Prayer Times
/{lang}/prayer-times
Daily 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 FunctionEnsure mosque administrators and authority users understand tenant data isolation guarantees and technical prerequisites.
PrerequisitesActive internet connection and a modern standards-compliant web browser.
Required User PermissionsPublic 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:
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.
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.
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.
Input Fields & Options Reference
Tenant Layer
Access Control Table
Data Boundary
Global Platform
user_roles + role_permissions
Platform-wide scope according to assigned global permissions.
Mosque Tenant
mosque_users (mosque_id)
Restricted strictly to records belonging to the authorized mosque.
MAIN Institution
institution_users + institution_state_access
Aggregate records of registered mosques within the verified state only.
JAKIM Institution
institution_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 FunctionHelp new users quickly orient themselves across public portal pages, mosque microsites, and administrative workspaces.
PrerequisitesNone.
Required User PermissionsPublic Access / All Roles
1. Understanding the User Interface
The Kariahku.com interface consists of four consistent structural regions:
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.
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).
Workspace Sidebar: Inside administrative screens (/admin/* and /mosque-admin/*), a sticky side navigation panel provides one-click switching between management modules.
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.
Input Fields & Options Reference
System Term
Technical & Operational Meaning
slug
URL-safe unique identifier for a mosque microsite (e.g. masjid-al-hidayah).
KRH-YYYYMMDD-XXXXXX
Unique reference code issued when submitting a kariah membership application.
trialing / active / past_due / grace_period
Subscription 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.
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 FunctionClarify how users access the platform and how authenticated accounts are provisioned and verified in the current Kariahku.com security architecture.
PrerequisitesModern web browser; server CLI access for provisioning new login accounts.
Required User PermissionsPublic Access / Global users.manage for User Administration
1. Accessing Kariahku.com
Open your web browser and navigate to the platform URL (e.g., https://kariahku.com/ or http://localhost/en).
The router automatically resolves your active language prefix (/ms, /en, or /ar).
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:
Provisioning Authenticated Login Accounts (users table): Login accounts for Platform Administrators, Mosque Administrators, and MAIN/JAKIM Officers are provisioned via the official management CLI:
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.
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.
Input Fields & Options Reference
Field / Parameter
Location
Description & Validation Rules
name
CLI create-user / users.name
Full name of the account holder (up to 150 characters).
email
CLI create-user / users.email
Valid unique email address (up to 254 characters, normalized to lowercase).
password
CLI create-user
Must be between 12 and 72 characters; hashed with password_hash(..., PASSWORD_DEFAULT).
status
/admin/users
Account 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.
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 FunctionEnable authorized users to sign in safely, terminate their session securely, and recover account access if a password is forgotten.
PrerequisitesAn active user record in the `users` table.
Required User PermissionsActive User Account in users Table
1. Logging Into the System (/login)
Click Log In in the top navigation bar or visit /{lang}/login.
Enter your registered Email address (up to 254 characters).
Enter your Password (up to 72 characters).
Click Log In.
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)
Click the Log Out button in the header navigation bar.
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).
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)
On /login, click Forgot password? to open /{lang}/forgot-password.
Enter your registered Email address and click Submit.
The system generates a 64-character hex reset token (stored as a SHA-256 hash in password_resets valid for 1 hour).
Open the reset URL /{lang}/reset-password?token={token}.
Enter your new Password (minimum 12 characters, maximum 72 characters) and repeat it in Confirm Password.
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.
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).
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 FunctionHelp users manage their language preference, understand how account profiles and passwords are maintained, and navigate role-specific dashboards.
PrerequisitesAn authenticated session for `/dashboard`; language switching is available to all visitors.
Required User PermissionsAuthenticated 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
To rotate or change your account password at any time, navigate to /{lang}/forgot-password.
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)
Locate the language switcher in the top utility bar.
Click BM (Bahasa Melayu), EN (English), or AR (العربية).
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).
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-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 FunctionExplain how MAIN and JAKIM officers access jurisdiction-scoped aggregate dashboards and clarify the role of registered kariah members and public visitors.
PrerequisitesAn active institution record in `institutions` with verified state grants in `institution_state_access`.
Required User PermissionsRole 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.
Can 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 FunctionAllow Super Administrators to audit and configure role permissions safely while preserving Super Admin immutability.
PrerequisitesSigned in as `super_admin` (`permissions.manage`). Anyone can view the live read-only matrix at `/{lang}/manual/roles`.
Required User PermissionsGlobal permissions.manage (Super Admin)
1. Viewing the Live Role-Permission Matrix
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.
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
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).
Notice that checkboxes under the Super Admin column are checked and locked (disabled) because super_admin permanently holds all permissions.
Check or uncheck permissions for the remaining roles as required by your governance policy.
Click Save at the bottom of the form.
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.
Input Fields & Options Reference
Permission Code
Scope
Controlled Capability
portal.access
Global
Baseline access to portal administration views.
users.manage
Global
Manage user account status and global roles at /admin/users.
mosques.review
Global
Review, approve, or reject mosque registration applications at /admin/mosques.
mosques.manage
Global
Edit mosque records and suspend/reactivate mosques at /admin/mosques.
portal.content.manage
Global
Manage trilingual CMS pages and announcements at /admin/cms.
platform.dashboard.view
Global
View platform-wide metrics at /admin/dashboard.
reports.platform.view
Global
View platform summary reports at /admin/reports.
reports.content.view
Global
View content and activity metrics at /admin/reports.
audit.view
Global
Inspect security audit logs at /admin/dashboard and /admin/reports.
permissions.manage
Global
Modify role permissions at /admin/permissions.
portal.activities.feature
Global
Manage activity categories and featured portal activities.
subscriptions.manage
Global
Manage subscription plans, prices, discounts, and lifecycle overrides at /admin/subscriptions.
payments.manage
Global
Manage payment gateways, verify manual transfers, and view revenue reports at /admin/payments.
institutions.manage
Global
Create and verify MAIN and JAKIM institutions at /admin/institutions.
manual.manage
Global
Manage User Manual categories, trilingual articles, screenshots, and FAQs at /admin/manual.
mosque.access
Mosque
Access the mosque tenant workspace at /mosque-admin.
View and pay mosque subscription invoices at /mosque-admin/subscription.
kariah.members.export
Mosque
Export 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-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 FunctionHelp community members discover mosque programmes and clarify how participant registration and activity reporting operate in the current system.
PrerequisitesNone.
Required User PermissionsPublic Access (/activities & /activity/{id})
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).
Input Fields & Options Reference
Query Parameter
Route
Function
view=calendar&month=YYYY-MM
/activities
Renders 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.
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 FunctionAccurately document the current codebase and database state regarding mosque financial modules without inventing unimplemented features.
PrerequisitesNone.
Required User PermissionsInformational 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:
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).
Input Fields & Options Reference
Registry Code in report_module_registry
Implementation Status
Privacy Classification
MAIN / JAKIM Access
mosque_finance
Planned / Not Implemented (enabled = 0)
sensitive_financial
Disabled (0 / 0)
donations
Planned / Not Implemented (enabled = 0)
sensitive_financial
Disabled (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 FunctionClearly label which external or companion mosque applications are not yet integrated in the current Kariahku.com codebase.
PrerequisitesNone.
Required User PermissionsInformational 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:
Integrated Mosque Systems Status (Khairat, Qurban & Aqiqah, Committee Election) in report_module_registry.
Input Fields & Options Reference
Registry Code
System Name
Integration Status
SSO / Data Sharing
khairat
Khairat Management
Not Yet Integrated (enabled = 0)
None active
qurban_aqiqah
Qurban & Aqiqah Management
Not Yet Integrated (enabled = 0)
None active
committee
Mosque Committee Election
Not Yet Integrated (Static roster only at /mosque-admin/committee)
None active
community_programmes
Community Programmes
Not 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
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 FunctionExplain the exact trial and subscription plan rules implemented in Kariahku.com.
PrerequisitesAn `active` mosque with `subscriptions.view` permission at `/mosque-admin/subscription`.
Required User PermissionsMosque Scope: subscriptions.view (/mosque-admin/subscription) | Institution Scope: subscription.view
A. Free One-Month Trial
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).
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().
One-Trial-Per-Mosque Rule: Setting mosques.trial_consumed = 1 ensures each mosque receives the free trial once.
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.
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):
Viewing Current Plans: Visit /{lang}/mosque-admin/subscription (or /main/subscription / /jakim/subscription) to view current plan status, period end date, and interval pricing.
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).
Input Fields & Options Reference
Plan Code
Customer Type
Billing Interval
List Price
Discount
Net Payable
mosque-standard
Mosque (mosque)
Monthly (monthly)
RM 50.00
0%
RM 50.00
mosque-standard
Mosque (mosque)
Quarterly (quarterly)
RM 150.00
0%
RM 150.00
mosque-standard
Mosque (mosque)
Semi-Annual (semiannual)
RM 300.00
0%
RM 300.00
mosque-standard
Mosque (mosque)
Annual (annual)
RM 600.00
10% (RM 60.00)
RM 540.00
main-standard
MAIN (main)
Monthly / Annual
RM 500.00 / RM 6,000.00
0% / 10%
RM 500.00 / RM 5,400.00
jakim-standard
JAKIM (jakim)
Monthly / Annual
RM 2,000.00 / RM 24,000.00
0% / 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
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 FunctionGuide Mosque Administrators and Institutional Officers through completing subscription payments and retrieving official billing documents.
PrerequisitesAn open invoice (`issued` or `overdue`) at `/mosque-admin/subscription`, `/main/subscription`, or `/jakim/subscription`.
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
Open /{lang}/mosque-admin/subscription (or /main/subscription / /jakim/subscription).
Locate your open invoice (status issued or overdue) in the Invoices and Payment History table.
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.
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-....
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.
Customer owner (Mosque / Institution) or Platform Billing Admin.
/payment/receipt?id={id}
RCP-YYYYMMDD-XXXXXX
Customer owner (Mosque / Institution) or Platform Billing Admin.
/payment/proof?id={id}
Uploaded Proof File
Customer 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-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 FunctionEnable federal JAKIM officers to monitor nationwide aggregate mosque and activity statistics across all 16 Malaysian states and federal territories.
PrerequisitesAn active user account assigned to an active `jakim` institution with verified `nationwide` jurisdiction across all 16 states/territories and an active subscription.
Required User PermissionsInstitution Scope (JAKIM Nationwide): dashboard.view, reports.view, reports.export
1. Accessing the JAKIM National Dashboard (/jakim/dashboard)
Sign in at /{lang}/login and navigate to /{lang}/jakim/dashboard.
`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.
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)
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.
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`).
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).
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 FunctionClearly explain how jurisdiction enforcement, report availability, dashboard charts, and subscription plans differ between JAKIM and MAIN.
PrerequisitesReference guide for MAIN, JAKIM, and Super Admin users.
Required User PermissionsInstitution 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.
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-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 FunctionProvide an authoritative catalog of all 8 institutional reports available at /main/reports and /jakim/reports.
PrerequisitesAn active MAIN or JAKIM institutional account holding `reports.view` and `reports.export`.
Required User PermissionsInstitution Scope (MAIN / JAKIM): reports.view & reports.export
1. How to Generate, Interpret & Export Institutional Reports
Open /{lang}/main/reports (for MAIN) or /{lang}/jakim/reports (for JAKIM).
Select your desired filters (`state_id`, `district_id`, `date_from`, `date_to`) and click Apply Filters.
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.
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.
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 FunctionEquip users and administrators to quickly diagnose error messages and apply verified remedies.
PrerequisitesNone.
Required User PermissionsPublic Access / All Users
1. Login Failure & Forgotten Password
Symptom:"Invalid email or password" on /login.
Cause & Remedy:
Verify email spelling and confirm that the account status in `users` is `active` (not `suspended`).
If 5 failed attempts occurred within 15 minutes, wait 15 minutes for the brute-force lock to clear.
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.
Symptom: HTTP `403 Forbidden` when opening a management screen or submitting an action.
Cause & Remedy:
Missing Role Permission: Check the live permission matrix at `/manual/roles` or `/admin/permissions`.
Mosque Tenant Mismatch: Attempting to modify records belonging to another `mosque_id`. Visit `/mosque-admin` and select your authorized mosque.
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.
Input Fields & Options Reference
HTTP Status / Error
Primary Cause
Immediate Remedy
400 Bad Request
Missing or expired CSRF token.
Refresh the page, ensure cookies are enabled, and resubmit.
402 Payment Required
Trial expired or subscription is expired / suspended.
Settle the renewal invoice on your subscription page.
403 Forbidden
Insufficient role permission or cross-tenant/cross-state access attempt.
Verify active role permissions or switch active mosque at /mosque-admin.
405 Method Not Allowed
POST to a read-only route or GET to /logout.
Use the standard in-app navigation and form buttons.
422 Unprocessable Entity
Validation 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.