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 FunctionAllow Muslim residents to register in their mosque’s kariah directory online without requiring a login account or national identity card number.
PrerequisitesThe target mosque must be `active` and hold an active `kariah_membership` subscription entitlement.
1. Selecting or Associating with a Mosque (/kariah-register)
Click Register as Kariah Member in the top navigation bar or visit /{lang}/kariah-register.
Select your mosque from the Mosque dropdown (mosque_slug), which displays Mosque Name · District, State.
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
Enter your Full Name (required, max 180 chars) and Preferred Contact Number (required, valid phone number).
Optionally provide your Email, Date of Birth (cannot be in the future), and Gender.
Enter your House/Unit Number (required, max 40 chars), optional Street name, and 5-digit Postcode (required).
Select your Residential Area (area_id) from the mosque’s configured Kampung, Taman, Locality, or Street list.
Optionally enter a Household Name and Relationship to group family members residing at the same address.
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.
Input Fields & Options Reference
Input Field
Requirement
Validation & Database Mapping
mosque_slug
Required
Active mosque; binds mosque_id, district_id, and state_id.
full_name
Required
Max 180 chars; normalized into full_name_normalized for duplicate checks.
contact_phone
Required
Matches ^\+?[0-9][0-9\-\s]{6,20}$; digits stored in phone_normalized.
house_number & postcode
Required
House/unit (≤ 40 chars) and 5-digit postcode (^\d{5}$).
area_id
Optional / Recommended
Must be an active area linked to the mosque in mosque_kariah_areas.
household_name, household_relationship
Optional
Links member to kariah_households and kariah_household_members.
consent
Required (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 FunctionEnable 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.
PrerequisitesSigned in as `mosque_admin` with an active `kariah_membership` subscription entitlement.
Required User PermissionsMosque 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)
Open /{lang}/mosque-admin/kariah-areas.
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).
Click Add Area.
3. Linking Shared Boundary Areas & Deactivating Links
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.
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.
Self-referencing FK within the same district & state; cycle-checked up to 25 levels.
name_key
kariah_areas
Normalized unique key across (state_id, district_id, area_type, parent_id_key, name_key).
sharing_basis
mosque_kariah_areas
Required (≥ 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 FunctionEnsure only verified residents within the mosque’s kariah are approved as active members while preventing duplicate member records.
PrerequisitesSigned in as `mosque_admin` with an active `kariah_membership` subscription entitlement.
Required User PermissionsMosque Scope: mosque.manage + Active Subscription (kariah_membership)
1. Inspecting the Pending Applications Queue (/mosque-admin/kariah-members)
Open /{lang}/mosque-admin/kariah-members.
Locate the Pending Applications card listing all applications in pending or clarification status.
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
Enter a Review / Clarification Note (mandatory with at least 5 characters when requesting clarification or rejecting).
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:
The application is flagged with Possible duplicate — review manually.
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.
Input Fields & Options Reference
Review Action
Resulting Status
Review Note Requirement
approve
approved (Member: active)
Optional (or required ≥ 10 chars when overriding a duplicate flag with approve_duplicate=1).
clarify
clarification
Required, minimum 5 characters.
reject
rejected
Required, 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 FunctionEquip Mosque Administrators to maintain accurate member records and generate residential-area-filtered member reports.
PrerequisitesSigned in as `mosque_admin` (`mosque.manage` and `kariah.members.export`) with an active subscription.
Required User PermissionsMosque 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.
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.
Click Filter.
3. Updating Personal Information, Residential Area & Household
Click Update Status on any member row in the directory to load the member detail editor at the bottom of the page.
In the profile form, update Full Name, Contact Phone, Email, House/Unit Number, Street, Postcode, Residential Area, and Household Name / Relationship.
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
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.
Enter a Review Note (minimum 5 characters) explaining the status change and click Update Status.
5. Generating & Exporting Member Reports (CSV)
Apply any desired filters (for example, selecting a specific Kampung or Taman and status active).
Click Export CSV.
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).
Input Fields & Options Reference
Current Status
Allowed Target Statuses
Meaning
active
inactive, moved, deceased
Currently active resident kariah member.
inactive
active, moved, deceased
Temporarily inactive membership record.
moved
active, inactive, deceased
Member relocated outside the mosque’s kariah boundary.
deceased
inactive
Member 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.