Skip to main content

SKOLE-NOTF — Notifications Module

Module ID: SKOLE-NOTF | Version: 1.0 | Status: Active
Products: Teacher App · Parent App (FCM token registered on auth)

1. Overview

FieldValue
Module NamePush Notifications
Module CodeNOTF
Business ValueReal-time push alerts to parent and teacher devices for new diary entries, write-to updates, activity posts. Requires FCM tokens stored on login.

2. Requirements

Functional Requirements (FR)

What the module must DO — actions, behaviors, and outcomes.
  • SKOLE-NOTF-FR001: The module shall allow teachers and staff to view a recent history of sent notification records.
  • SKOLE-NOTF-FR002: The module shall automatically send push notifications when critical events occur: new diary entries, leave approvals, and write-to replies.
  • SKOLE-NOTF-FR003: The module shall register and refresh FCM tokens for all users during the login process and upon device info updates.
  • SKOLE-NOTF-FR004: The module shall allow users to mark notifications as read to track their interaction.

Non-Functional Requirements (NFR)

How well the module must do it — performance, security, and reliability.
  • SKOLE-NOTF-NFR001: The module shall perform low-latency delivery of push notifications to ensure timely communication.
  • SKOLE-NOTF-NFR002: The module shall behave reliably by ensuring push tokens are unique per user+device combination to prevent duplicate or misdirected alerts.
  • SKOLE-NOTF-NFR003: The module shall perform multi-tenant isolation of notification records by skole_id.

Constraints

Rules and boundaries — tech choices and platform restrictions.
  • C001: We must use Firebase Cloud Messaging (FCM) as our primary push notification provider to ensure cross-platform (iOS/Android) compatibility.
  • C002: We cannot guarantee 100% delivery of notifications if the user’s device is offline or has push notifications disabled at the OS level.

3. UI Requirements

Teacher App

IDScreenRouteDescription
SKOLE-NOTF-UI001NotificationsScreen/notificationsList of recent push notifications with read/unread state

Parent App

IDScreenRouteDescription
SKOLE-NOTF-UI002NotificationsScreen/notificationsList of recent push alerts with deep-links to source modules
Components:
IDComponentProps
SKOLE-NOTF-UC001NotificationItemnotification, isRead, onPress
SKOLE-NOTF-UC002NotificationBadgecount — unread count on tab bar

4. API Endpoints

IDMethodRouteAuthDescription
SKOLE-NOTF-EP001GET/teachers-app/notificationsJWT (staff)View notification history
SKOLE-NOTF-EP002POST/teachers-app/notifications/mark-readJWT (staff)Mark notification as read