Skip to main content

Requirements Traceability

Purpose

This page documents traceability between Maqsafy requirements, implementation areas, APIs, database entities, and test coverage.

The purpose is to ensure that every approved requirement is tracked from specification to implementation and validation.

Traceability Model

Each requirement should be tracked using the following structure:

FieldDescription
Requirement IDUnique requirement reference from the SRS
Requirement SummaryShort description of the requirement
ModuleFunctional area or system module
RoleUser role affected by the requirement
Screen / UIRelated dashboard or app screen
API EndpointRelated backend API endpoint
Database EntitiesRelated tables or entities
Test CaseRelated functional or security test
StatusPlanned / In Progress / Implemented / Tested / Deferred
NotesAdditional clarification

Status Definitions

StatusMeaning
PlannedRequirement is approved but not implemented yet
In ProgressImplementation is currently active
ImplementedFeature exists but testing is not fully confirmed
TestedFeature is implemented and validated
DeferredRequirement is postponed
Needs ConfirmationRequirement requires product, technical, or business confirmation

Common Requirements Traceability

Authentication and Authorization

Requirement IDRequirement SummaryModuleRoleScreen / UIAPI EndpointDatabase EntitiesTest CaseStatusNotes
FR-COM-001Secure login for dashboard usersAuthenticationAdmin / School Manager / Supplier / OperatorLoginTBDusers, rolesLogin success and failure testsNeeds ConfirmationConfirm actual auth flow
FR-COM-002Enforce RBAC permissionsAuthorizationAll rolesAll protected screensTBDusers, roles, permissionsUnauthorized and cross-scope access testsNeeds ConfirmationMust be enforced in backend
FR-COM-003Password reset and account recoveryAuthenticationDashboard usersPassword ResetTBDusers, password_resetsPassword reset flow testNeeds ConfirmationConfirm if enabled
FR-COM-004Optional MFA for Admin and sensitive financial actionsAuthentication / SecurityAdminMFA / Sensitive ActionsTBDusers, mfa_settingsMFA verification testPlannedConfirm MFA implementation
FR-COM-005Log authentication eventsAudit LoggingAll rolesN/ATBDaudit_logs, login_eventsLogin audit testNeeds ConfirmationConfirm actual log table

Audit Logging

Requirement IDRequirement SummaryModuleRoleScreen / UIAPI EndpointDatabase EntitiesTest CaseStatusNotes
FR-COM-030Maintain audit trail for critical actionsAudit LoggingAdmin / SystemAudit LogsTBDaudit_logsCritical action audit testNeeds ConfirmationRequired for financial and admin actions
FR-COM-031Audit entries include actor, time, action, scope, before/after valuesAudit LoggingAdmin / SystemAudit LogsTBDaudit_logsAudit field completeness testNeeds ConfirmationMust confirm stored fields

Wallet and Ledger

Requirement IDRequirement SummaryModuleRoleScreen / UIAPI EndpointDatabase EntitiesTest CaseStatusNotes
FR-COM-040Display wallet balances based on permissionsWalletAuthorized rolesWallet DashboardTBDwallets, transactionsWallet visibility by role testNeeds ConfirmationScope must be enforced
FR-COM-041Display immutable transaction ledger with filtering and exportWallet / LedgerAuthorized rolesLedgerTBDtransactions, ledger_entriesLedger filtering and export testNeeds ConfirmationConfirm immutability design
FR-COM-042Reconciliation reports by school/branch and date rangeFinance / ReportsAdmin / School ManagerReconciliation ReportsTBDtransactions, settlementsReconciliation report testNeeds ConfirmationConfirm report source

Credential Inventory

Requirement IDRequirement SummaryModuleRoleScreen / UIAPI EndpointDatabase EntitiesTest CaseStatusNotes
FR-COM-050Display credential inventory and statusesCredentialsAdmin / School ManagerCredential InventoryTBDcredential_inventoryView inventory by scope testNeeds ConfirmationStatuses include Available, Assigned, Delivered, Disabled
FR-COM-051View credential identifier/code subject to privacy policyCredentialsAdmin / School ManagerCredential DetailsTBDcredential_inventory, studentsSensitive field visibility testNeeds ConfirmationMust apply privacy policy
FR-COM-052Assign/link credential item to student wallet ownerCredentialsAdmin / School ManagerAssign CredentialTBDcredential_inventory, students, walletsAssignment testNeeds ConfirmationMust prevent duplicate active assignment
FR-COM-053Prevent same active credential from multiple wallet ownersCredentialsSystemN/ATBDcredential_inventoryDuplicate assignment prevention testNeeds ConfirmationRequires unique constraint or validation
FR-COM-054Dashboard must not provide NFC reader/scanner functionalityCredentialsAll rolesDashboardN/AN/AUI and code reviewNeeds ConfirmationDashboard display/manage only
FR-COM-055Restrict credential disabling/replacement to AdminCredentialsAdminCredential LifecycleTBDcredential_inventory, audit_logsAdmin-only deactivation testNeeds ConfirmationCritical RBAC rule

Admin Requirements Traceability

Requirement IDRequirement SummaryModuleRoleScreen / UIAPI EndpointDatabase EntitiesTest CaseStatusNotes
FR-ADM-001Create, update, deactivate, and view schoolsSchoolsAdminSchools ManagementTBDschoolsSchool CRUD testNeeds ConfirmationAdmin-only
FR-ADM-002Manage branches/cafeterias under schoolsCafeteriasAdminBranch / Cafeteria ManagementTBDcafeterias, branchesCafeteria CRUD testNeeds ConfirmationConfirm entity naming
FR-ADM-003Manage operating companies and link them to branchesOperating CompaniesAdminOperating CompaniesTBDoperating_companies, branchesLinking testNeeds ConfirmationConfirm module exists
FR-ADM-010Manage dashboard user accountsUser ManagementAdminUsersTBDusers, rolesUser management testNeeds ConfirmationIncludes activate/deactivate/reset access
FR-ADM-011Assign roles and scopesRBACAdminRoles and PermissionsTBDusers, roles, permissions, scopesScope assignment testNeeds ConfirmationCritical security area
FR-ADM-012View permissions matrix and role summaryRBACAdminPermissions MatrixTBDroles, permissionsPermission matrix visibility testNeeds ConfirmationShould match RBAC documentation
FR-ADM-020Manage product master listProductsAdminProduct CatalogTBDproducts, categoriesProduct CRUD testNeeds ConfirmationInclude SKU, category, allergens, images
FR-ADM-030View purchase orders across tenantsProcurementAdminPurchase OrdersTBDpurchase_ordersAdmin PO visibility testNeeds ConfirmationPlatform-wide scope
FR-ADM-031View and audit returns/refundsReturns / RefundsAdminReturns / RefundsTBDrefunds, returns, transactionsRefund audit testNeeds ConfirmationMust include reasons
FR-ADM-032Export invoices and settlement summariesFinanceAdminFinance ExportsTBDinvoices, settlementsExport testNeeds ConfirmationMust respect date range
FR-ADM-040Configure settlement rulesFinance SettingsAdminSettlement SettingsTBDsettlement_rulesSettlement rule update testNeeds ConfirmationSensitive financial setting
FR-ADM-041Approve or reject withdrawal requests above thresholdsWithdrawalsAdminWithdrawal ApprovalsTBDwithdrawals, audit_logsWithdrawal approval testNeeds ConfirmationMust be audited
FR-ADM-042Access platform-wide finance dashboardsFinance ReportsAdminFinance DashboardTBDtransactions, invoices, settlementsAdmin finance dashboard testNeeds ConfirmationPlatform-wide access
FR-ADM-060Disable/deactivate credential and record reasonCredentialsAdminCredential LifecycleTBDcredential_inventory, audit_logsCredential deactivation testNeeds ConfirmationAdmin-only
FR-ADM-061Perform credential replacement workflowCredentialsAdminCredential ReplacementTBDcredential_inventory, audit_logsReplacement workflow testNeeds ConfirmationFull audit trail required
FR-ADM-062View credential lifecycle history and export reportsCredentialsAdminCredential HistoryTBDcredential_inventory, audit_logsLifecycle export testNeeds ConfirmationConfirm export format
FR-ADM-050Manage advertisement campaignsAdvertisementsAdminAds ManagementTBDadvertisementsCampaign CRUD testNeeds ConfirmationIf enabled
FR-ADM-051Configure dashboard settings and business rulesSystem SettingsAdminSettingsTBDsettingsSettings update testNeeds ConfirmationSensitive
FR-ADM-052Manage integration settings excluding NFC scanningIntegrationsAdminIntegration SettingsTBDintegrationsIntegration setting testNeeds ConfirmationDo not expose secrets

School Manager Requirements Traceability

Requirement IDRequirement SummaryModuleRoleScreen / UIAPI EndpointDatabase EntitiesTest CaseStatusNotes
FR-SCH-001Manage school profile data and operational settingsSchool OperationsSchool ManagerSchool ProfileTBDschools, settingsUpdate within scope testNeeds ConfirmationSchool scope only
FR-SCH-002View/manage cafeterias under schoolCafeteriasSchool ManagerCafeteriasTBDcafeterias, branchesScope visibility testNeeds ConfirmationAdmin constraints apply
FR-SCH-010Create/manage School Staff Supervisor recordsSupervisorsSchool ManagerSupervisorsTBDsupervisorsSupervisor CRUD testNeeds ConfirmationNon-login record
FR-SCH-011Import or sync student recordsStudentsSchool ManagerStudent RosterTBDstudentsStudent import testNeeds ConfirmationConfirm import method
FR-SCH-012Assign supervisors to cafeterias/branchesSupervisorsSchool ManagerSupervisor AssignmentTBDsupervisor_assignmentsAssignment testNeeds ConfirmationSchool scope only
FR-SCH-013Define student spending policiesStudent PoliciesSchool ManagerSpending PoliciesTBDspending_policiesPolicy update testNeeds ConfirmationIf enabled
FR-SCH-015System does not require supervisors to have dashboard accountsSupervisorsSystemN/AN/AsupervisorsNo-login supervisor testNeeds ConfirmationMust not create user login
FR-SCH-020View credential inventory for schoolCredentialsSchool ManagerCredential InventoryTBDcredential_inventorySchool scope inventory testNeeds ConfirmationSchool scope only
FR-SCH-021View credential identifiers/codes as permittedCredentialsSchool ManagerCredential DetailsTBDcredential_inventoryPrivacy visibility testNeeds ConfirmationSubject to privacy policy
FR-SCH-022Assign credential to student and record delivery statusCredentialsSchool ManagerAssign / Deliver CredentialTBDcredential_inventory, studentsDelivery status testNeeds ConfirmationNo deactivation
FR-SCH-023School Manager cannot disable/deactivate or replace credentialsCredentialsSchool ManagerCredential LifecycleTBDcredential_inventoryDenied deactivation testNeeds ConfirmationAdmin-only action
FR-SCH-030Approve products for sale at schoolProductsSchool ManagerProduct ApprovalTBDproducts, school_product_rulesProduct allowlist/denylist testNeeds ConfirmationSchool scope
FR-SCH-031Manage menu availability schedulesMenuSchool ManagerMenu ScheduleTBDmenu_schedulesSchedule update testNeeds ConfirmationSchool scope
FR-SCH-040View sales summaries by branch, category, and timeReportsSchool ManagerSales ReportsTBDtransactions, ordersSales report testNeeds ConfirmationSchool scope
FR-SCH-041View student spending analytics as permittedReportsSchool ManagerStudent AnalyticsTBDtransactions, studentsPrivacy-safe analytics testNeeds ConfirmationMust minimize student data
FR-SCH-042View procurement performance where enabledReportsSchool ManagerProcurement ReportsTBDpurchase_ordersProcurement report testNeeds ConfirmationIf enabled
FR-SCH-043Manage school-level advertisements where enabledAdvertisementsSchool ManagerAds ManagementTBDadvertisementsSchool ad testNeeds ConfirmationAdmin-controlled enablement
FR-SCH-044Export credential distribution reportsCredentials / ReportsSchool ManagerCredential ReportsTBDcredential_inventorySchool scope export testNeeds ConfirmationAssigned school only

Supplier Requirements Traceability

Requirement IDRequirement SummaryModuleRoleScreen / UIAPI EndpointDatabase EntitiesTest CaseStatusNotes
FR-SUP-001Manage supplier productsSupplier ProductsSupplierSupplier CatalogTBDproducts, supplier_productsSupplier product testNeeds ConfirmationSupplier scope
FR-SUP-002Manage availability indicators and lead timesSupplier ProductsSupplierAvailabilityTBDsupplier_productsAvailability update testNeeds ConfirmationIf enabled
FR-SUP-010View incoming purchase orders and accept/rejectProcurementSupplierPurchase OrdersTBDpurchase_ordersSupplier PO access testNeeds ConfirmationSupplier scope
FR-SUP-011Update fulfillment statusesProcurementSupplierFulfillmentTBDpurchase_ordersFulfillment update testNeeds ConfirmationWith timestamps
FR-SUP-012Attach delivery notes and invoicesInvoicesSupplierInvoices / Delivery NotesTBDinvoices, attachmentsAttachment upload testNeeds ConfirmationFile restrictions required
FR-SUP-020Review return requests and approve/rejectReturnsSupplierReturnsTBDreturns, refundsSupplier return review testNeeds ConfirmationSupplier scope
FR-SUP-021Finalize refunds or credit notes according to policyRefundsSupplierRefunds / Credit NotesTBDrefunds, credit_notesRefund finalization testNeeds ConfirmationPolicy-dependent
FR-SUP-030View invoices and settlement statementsFinanceSupplierSettlement StatementsTBDinvoices, settlementsSupplier settlement testNeeds ConfirmationSupplier scope
FR-SUP-031View wallet/ledger entries and payout statusesWalletSupplierSupplier WalletTBDwallets, transactions, payoutsSupplier wallet scope testNeeds ConfirmationSupplier scope
FR-SUP-032Submit payout details and verification documentsPayoutsSupplierPayout DetailsTBDpayout_accounts, attachmentsPayout details testNeeds ConfirmationSensitive data

Operator Requirements Traceability

Requirement IDRequirement SummaryModuleRoleScreen / UIAPI EndpointDatabase EntitiesTest CaseStatusNotes
FR-OPR-001Manage cafeteria profile and operational parametersCafeteria OperationsOperatorCafeteria ProfileTBDcafeteriasOperator scope update testNeeds ConfirmationAssigned scope only
FR-OPR-002Manage product availability when permittedProductsOperatorProduct AvailabilityTBDproducts, cafeteria_productsAvailability update testNeeds ConfirmationPermission-based
FR-OPR-003View recorded sales transactionsSalesOperatorSales TransactionsTBDtransactions, ordersOperator transaction scope testNeeds ConfirmationCustomer credential details restricted
FR-OPR-010Initiate return/refund requestsRefundsOperatorRefund RequestTBDrefunds, transactionsRefund request testNeeds ConfirmationPolicy limits apply
FR-OPR-011Link refund requests to original transactionRefundsOperator / SystemRefund DetailsTBDrefunds, transactionsRefund traceability testNeeds ConfirmationMust be traceable
FR-OPR-012View refund request statusRefundsOperatorRefund StatusTBDrefundsRefund status visibility testNeeds ConfirmationAssigned scope only
FR-OPR-040Create purchase orders to suppliers when permittedProcurementOperatorPurchase OrdersTBDpurchase_ordersOperator PO creation testNeeds ConfirmationPermission-based
FR-OPR-041Confirm receiving and record discrepanciesProcurementOperatorReceivingTBDpurchase_orders, receiving_recordsReceiving testNeeds ConfirmationAssigned cafeteria
FR-OPR-042View invoices related to cafeteria purchase ordersInvoicesOperatorInvoicesTBDinvoicesOperator invoice scope testNeeds ConfirmationAssigned cafeteria
FR-OPR-050View cafeteria wallet balance and transaction historyWalletOperatorCafeteria WalletTBDwallets, transactionsOperator wallet scope testNeeds ConfirmationAssigned cafeteria
FR-OPR-051Submit withdrawal requests subject to approval rulesWithdrawalsOperatorWithdrawal RequestTBDwithdrawalsWithdrawal request testNeeds ConfirmationApproval workflow required

Non-Functional Requirements Traceability

Requirement AreaRequirement SummaryRelated ModuleValidation MethodStatusNotes
PerformanceKey dashboard pages render within target timeDashboard / API / DatabasePerformance testingNeeds ConfirmationTarget from SRS: 3 seconds under normal conditions
Export PerformanceExports complete within target timeReports / ExportsExport load testingNeeds ConfirmationTarget from SRS: one school, one month range within 60 seconds
SecurityTLS 1.2+Infrastructure / NginxSSL/TLS scanNeeds ConfirmationConfirm production configuration
SecuritySensitive data encrypted at restDatabase / StorageArchitecture reviewNeeds ConfirmationConfirm implementation
SecurityRBAC and tenant isolationAPI / DatabaseSecurity testingNeeds ConfirmationCritical
SecurityRate limiting and brute-force protectionAuthenticationSecurity testingNeeds ConfirmationLogin and OTP endpoints
UsabilityArabic and English UIFrontend / DashboardUI testingNeeds ConfirmationConfirm supported languages
Reliability99.5% monthly availability targetInfrastructureMonitoring reportsNeeds ConfirmationExcluding scheduled maintenance
ObservabilityCentralized logging, monitoring, and alertingInfrastructure / BackendOperations reviewNeeds ConfirmationConfirm tools
MaintainabilityAPIs documented and versionedAPIDocumentation reviewNeeds ConfirmationOpenAPI recommended

Testing Matrix

Test TypePurposeRequired
Functional TestingValidate user workflowsYes
RBAC TestingValidate role and permission restrictionsYes
Cross-Tenant TestingValidate tenant isolationYes
API TestingValidate endpoint behaviorYes
Regression TestingValidate existing features after changesYes
Security TestingValidate authentication, authorization, and input handlingYes
Performance TestingValidate page and report response timesYes
Backup / Restore TestingValidate recovery capabilityYes
Audit Log TestingValidate critical actions are recordedYes

Required Negative Tests

ScenarioExpected Result
Unauthenticated user accesses protected endpoint401 Unauthorized
School Manager accesses another school record403 Forbidden
Supplier accesses another supplier order403 Forbidden
Operator accesses another cafeteria record403 Forbidden
School Manager attempts credential deactivation403 Forbidden
User exports report outside scope403 Forbidden
User submits invalid inputValidation error
User retries financial action causing duplicate effectDuplicate must be prevented

Open Items

ItemOwnerStatusNotes
Confirm actual API route namesTBDOpenReplace all TBD endpoints
Confirm actual database table namesTBDOpenReplace generic entities
Confirm RBAC middleware implementationTBDOpenBackend verification required
Confirm tenant isolation testsTBDOpenRequired before production sign-off
Confirm audit log implementationTBDOpenCritical for financial and credential actions
Confirm OpenAPI availabilityDraft AvailableOpen/openapi.yaml exists; backend validation required before final approval
Confirm performance test resultsTBDOpenRequired for page and export targets

Rules

  • Do not mark any requirement as tested unless validation evidence exists.
  • Do not assume implementation details without confirming code, database, or environment.
  • Use TBD where details are unknown.
  • Use Needs Confirmation where implementation may exist but has not been verified.
  • Link each implemented feature to at least one test case.