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 FunctionEnable mosque representatives to apply for onboarding and guide Platform Administrators through verifying documents, approving tenants, and starting the 1-month free trial.
Prerequisites1 to 3 supporting documents (PDF, JPG, or PNG, max 5 MB each). For approval: an active `users` account matching `applicant_email`.
Required User PermissionsPublic Access for Application (/register-mosque) | Global mosques.review for Approval (/admin/mosques)
1. Submitting a Mosque Registration Application (/register-mosque)
Click Register Mosque in the top navigation or visit /{lang}/register-mosque.
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.
Under Applicant Details, enter Applicant Name, Applicant Position, Applicant Contact, and Applicant Email (applicant_email).
Select 1 to 3 Supporting Documents (PDF, JPEG, or PNG, max 5 MB per file).
Click Submit. The application is saved with status pending.
Sign in with mosques.review permission (Super Admin or Portal Admin) and open /{lang}/admin/mosques.
Click the supporting document links on a pending mosque to inspect files securely via /admin/mosque-document?id={doc_id}.
Verify that an active users account exists matching the application’s applicant_email.
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).
Input Fields & Options Reference
Form Field
Requirement
Validation Rules
name
Required
Official mosque name (max 180 chars); generates a unique URL slug.
mosque_type
Required
Allowed values: masjid, surau, or surau_jumaat.
state_id & district_id
Required
District must belong to the selected State (enforced server-side).
postcode
Required
Exact 5-digit numeric postcode (^\d{5}$).
latitude & longitude
Required
Decimal coordinates: Latitude -90..90, Longitude -180..180.
applicant_email
Required
Email address of the user who will be granted mosque_admin upon approval.
documents[]
Required
1 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
Step-by-step instructions for updating mosque profile details, address, state and district selection, official prayer zone, map coordinates, and contact information.
Purpose of FunctionKeep the mosque’s official directory listing, OpenStreetMap location, and contact details accurate on the public portal and mosque microsite.
PrerequisitesSigned in as `mosque_admin` for the target mosque (or `super_admin` via `/admin/mosques`).
Required User PermissionsMosque Scope: mosque.manage (/mosque-admin/profile) or Global: mosques.manage (/admin/mosques)
1. Opening the Mosque Profile Screen
Sign in and navigate to /{lang}/mosque-admin/profile (or click Mosque Profile in the mosque workspace sidebar).
If your account manages multiple mosques, ensure the desired mosque tenant is active in /mosque-admin.
Update the Mosque Name, Mosque Type (Masjid, Surau, or Surau Jumaat), and optional Reference Number.
Select the State and District. Selecting a State and District automatically filters district options and suggests the matching Official JAKIM Prayer Zone.
Update the street Address and 5-digit Postcode.
Enter accurate decimal Latitude and Longitude coordinates. These coordinates render the embedded OpenStreetMap view on the microsite Contact tab (/masjid/{slug}/contact).
Enter the official Telephone number and Email address, then click Save.
Mosque Profile, Address, State/District, and Map Coordinates management screen (/mosque-admin/profile).
Input Fields & Options Reference
Field
Format / Constraint
Public Microsite Impact
state_id & district_id
Valid State & District IDs
Controls public directory filtering and MAIN state reporting jurisdiction.
prayer_zone_id
Verified JAKIM zone
Determines the daily prayer schedule displayed on the mosque microsite.
latitude, longitude
Decimal (-90..90, -180..180)
Renders the interactive OpenStreetMap embed on the mosque microsite.
telephone, email
Max 30 / Max 254 chars
Displayed 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
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 FunctionEnable mosque administrators to publish their committee roster, community announcements, educational articles, and photo galleries on their microsite.
PrerequisitesSigned in as `mosque_admin` with an active subscription.
Required User PermissionsMosque Scope: mosque.manage & mosque.publish + Active Subscription
1. Managing Mosque Committee Members (/mosque-admin/committee)
Navigate to /{lang}/mosque-admin/committee.
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 / رئيس اللجنة).
Click Save. The committee roster appears publicly at /masjid/{slug}/committee.
Open /{lang}/mosque-admin/editorial and choose the content type tab: Announcements, Articles, Events, or Gallery.
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.
Input Fields & Options Reference
Content Module
Admin Route
Public 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
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 FunctionAllow Mosque Administrators to delegate workspace access to authorized mosque staff while enforcing strict tenant isolation.
PrerequisitesThe target user must already have an account in the `users` table.
Required User PermissionsMosque Scope: mosque.manage (/mosque-admin/members)
1. Assigning a User to the Mosque Workspace (/mosque-admin/members)
Sign in as mosque_admin and open /{lang}/mosque-admin/members.
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).
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).
Input Fields & Options Reference
Field
Allowed Values
Description
email
Registered user email
Must match an existing account in the users table.
role_id
mosque_admin, mosque_editor, mosque_member
Only scope = 'mosque' roles are accepted.
status
active / inactive
Controls 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.