
Enforces API vs Domain type separation for Nazim frontend. Use when creating new resources, hooks, mappers, or components. Covers snake_case API types, camelCase domain types, mapper layer, and component usage.
--- name: nazim-org-hr-payroll description: Documents the Organization HR Payroll module in Nazim: compensation profiles, payroll periods, payroll runs, and the run lifecycle (create run, calculate, finalize, mark paid). Use when working on the payroll page, run calculation, finalization, compensation profiles, payroll periods, or org_hr_payroll feature. --- # Nazim Org HR Payroll ## Overview Payroll lives under **Org Admin** (`/org-admin/hr/payroll`). It is gated by the `org_hr_payroll` feat
Enforces status badge patterns for Nazim UI. Use when displaying status in tables, cards, or dialogs. Covers Badge variants, semantic colors, statusBadgeVariant, statusOptions with color.
Enforces filter panel and filter state patterns for Nazim list and report pages. Use when adding search, dropdowns, date ranges, or filter state. Covers FilterPanel, filter state, query integration.
Form validation and React Hook Form patterns for Nazim. Use when adding or editing forms. Requires Zod schemas in /src/lib/validations/, zodResolver, Controller for Select/file, alignment with Laravel Form Request rules.
Internationalization and RTL for Nazim. Use when adding UI text or layout that depends on language. Covers useLanguage (t, isRTL, language), translation file structure, adding keys, RTL layout and conditional classes.
Spatie permission patterns for Nazim main app. Use when adding permissions, menu visibility, or backend permission checks. Covers permission name format, useHasPermission, useUserPermissions, no role fallbacks.
Enforces the two-step subject assignment workflow for Nazim academic features. Use when building exams, grades, attendance, timetables, or any feature that needs subjects for a class. Covers class_subject_templates vs class_subjects, class_academic_year_id filtering.
Finance module patterns for Nazim. Use when working on accounts, categories, projects, donors, entries, reports, fees, or currencies. Covers useFinance hooks, finance structure, reports, fees, multi-tenancy, types and mapper.
Enforces mobile-first responsive patterns for Nazim UI. Use when building pages, tables, forms, charts, or buttons. Covers page container, FilterPanel, tabs, grids, tables, charts, cards, buttons.
Enforces Nazim database migration patterns. Use when creating new tables, adding columns, or writing SQL migrations. Covers UUID primary keys, organization_id, school_id, RLS, search_path, policy naming, and Laravel migration format.
Toast notifications for Nazim. Use when showing success/error/info messages. ALWAYS use showToast from @/lib/toast with translation keys; never toast from sonner directly. RTL positioning is automatic.
PDF and Excel report generation for Nazim. Use when adding or changing reports. Backend uses ReportService and ReportConfig; frontend uses useServerReport. Covers branding, DateConversionService, RTL, acceptance criteria.
Enforces patterns for creating and maintaining platform admin pages in Nazim. Use when adding new platform management pages, routes, or API endpoints. Covers 5-step checklist, platformApi, usePlatformAdminPermissions, no organization_id.
--- name: nazim-org-admin-setup description: Documents the Organization Admin area setup in Nazim: routes, layout, access control, and org-wide vs school-scoped behavior. Use when adding or changing org-admin pages, HR hub, staff/assignments lists, school scoping rules, or OrganizationAdminRoute/OrganizationAdminLayout. --- # Nazim Organization Admin Setup ## Overview The **Organization Admin** area (`/org-admin`) is an enterprise-gated section for org-wide management. It has its own layout a
Enforces organization and school isolation for the Nazim multi-tenant SaaS. Use when adding tables, hooks, API calls, controllers, or storage paths. Covers organization_id, school_id, query keys, getCurrentSchoolId(), and RLS.
Platform admin help center CRUD for categories and articles. Use when working on Help Center Management page, categories, articles, slugs, or ordering. Uses platformApi and usePlatformAdminPermissions; no organization_id.
Generates help center workflow articles for the Nazim School Management System. Use when user asks to generate help articles, write help center content for a folder, or translate articles to Pashto. Follows two-phase EN→PS process with MANIFEST and full article template.
--- name: nazim-file-storage description: Centralized file storage for Nazim backend. Use when adding uploads, downloads, or file paths. ALWAYS use FileStorageService; never direct Storage:: or move_uploaded_file. Paths include organization_id and school_id. --- # Nazim File Storage All file operations must use **FileStorageService** (`backend/app/Services/Storage/FileStorageService.php`). Never use `Storage::`, `move_uploaded_file()`, or hardcoded paths. ## Path Structure - **Private:** `pr
Exams module patterns for Nazim. Use when working on exams, exam classes, subjects, timetable, enrollment, marks, attendance, or reports. Covers class_subjects dependency, hooks, exam flow, academic year, exam types, permissions.