Skip to content

G2-Pair1 (Module 20): Notification & Announcement Module v2 — final submission#1902

Open
KasuAbhishekReddy wants to merge 2 commits into
FusionIIIT:announcements-v2from
KasuAbhishekReddy:announcements-v2
Open

G2-Pair1 (Module 20): Notification & Announcement Module v2 — final submission#1902
KasuAbhishekReddy wants to merge 2 commits into
FusionIIIT:announcements-v2from
KasuAbhishekReddy:announcements-v2

Conversation

@KasuAbhishekReddy
Copy link
Copy Markdown

Module ID: 20
Module Name: Notification & Announcement Module
Pair: G2-Pair1 (AI-assisted development)
Roll Numbers: 23BCS131, 23BCS054, 23BCS005

Final submission for IT3C03.

New module at applications/notifications_extension/

  • services.py — business logic + custom exceptions; single _send chokepoint enforcing BR-NT-01..09
  • selectors.py — DB read queries only (no writes)
  • models.py — TextChoices + 4 models (NotificationPreference, NotificationEventType, Announcement with approval_id UUID for BR-NT-08, ArchivedNotification)
  • api/views.py — 52 thin DRF endpoints
  • api/serializers.py — field-level validation only
  • api/urls.py — URL routing (each route registered with + without trailing slash)
  • api/exception_handler.py — global JSON error envelope
  • migrations/0001..0009 — full schema including approval_id UUID
  • tests/test_module.py + test_use_cases.py + test_business_rules.py + test_workflows.py + conftest + runner + specs/ (yaml) + reports/ (csv). 39 spec-driven tests + 62 unit/integration, all passing.
  • Designated_Roles.md — role permission matrix

New SDK at notification_client/

  • client.py — public API for other Fusion modules to send notifications

Removed legacy stubs

  • notifications_extension/tests.py → replaced by tests/ folder
  • notifications_extension/urls.py → replaced by api/urls.py
  • notifications_extension/views.py → replaced by api/views.py

Roles defined in this module

  • NAM Admin (Authorized Sender) — institute admins; full CRUD on event types, broadcast announcements, trigger notifications
  • External Fusion Module (System Actor) — other Fusion apps emit notifications via notification_client SDK
  • Recipient (Student / Faculty / Staff) — sees notifications in navbar bell + dashboard tray; can mark read, archive, set per-module preferences

Use Cases / Business Rules / Workflows implemented

  • UCs (4/4): UC-NT-01 Register Event Type, UC-NT-02 Trigger by Event ID, UC-NT-03 Broadcast Manual Announcement, UC-NT-04 Global Notification Tray
  • BRs (9/9): BR-NT-01..09 — UI Centralization, Navbar Consistency, API Authorization, Idempotency/Dedup (60s), Critical Priority Bypass + Email, Automatic Expiry, RBAC Dependency, Audit Trail Integrity, Data Persistence (180-day soft-archive)
  • WFs (3/3): NAM-WF-101 (Register→Trigger→Deliver), NAM-WF-201 (Admin Broadcast Fan-Out), NAM-WF-301 (Tray Interaction)

No other modules touched.

Notification & Announcement Module backend (final submission for IT3C03).
Roll numbers: 23BCS131, 23BCS054, 23BCS005

New module at applications/notifications_extension/:
- services.py — business logic + custom exceptions (chokepoint for BR-NT-01..09)
- selectors.py — DB read queries only (no writes)
- models.py — TextChoices + 4 models (NotificationPreference, NotificationEventType,
  Announcement with approval_id UUID, ArchivedNotification)
- api/views.py — 52 thin DRF endpoints
- api/serializers.py — field-level validation only
- api/urls.py — URL routing (each route registered with + without trailing slash)
- api/exception_handler.py — global JSON error envelope
- migrations/0001..0009 — full schema including approval_id (BR-NT-08)
- tests/test_module.py + test_use_cases.py + test_business_rules.py + test_workflows.py
- tests/specs/ + tests/reports/ — 39 spec-driven tests + 62 unit/integration, all passing
- Designated_Roles.md — role permission matrix

New SDK at notification_client/:
- client.py — public API for other Fusion modules to send notifications

Removed legacy stubs:
- notifications_extension/tests.py — replaced by tests/ folder
- notifications_extension/urls.py — replaced by api/urls.py
- notifications_extension/views.py — replaced by api/views.py

Roles defined in this module:
- NAM Admin (Authorized Sender) — institute admins; full CRUD on event types, broadcasts, triggers
- External Fusion Module (System Actor) — other Fusion apps emit via notification_client SDK
- Recipient (Student / Faculty / Staff) — sees notifications in navbar bell + dashboard tray

No other modules touched.
The previous commit accidentally left the api/ folder files as the legacy stubs
because they existed on the announcements-v2 base branch. This commit replaces
them with the team's full implementation:

- api/serializers.py — DRF serializers with field-level validation (full version)
- api/urls.py — URL routing for all 52 endpoints (each with + without trailing slash)
- api/views.py — 52 thin DRF endpoints implementing UC-NT-01..04 and BR-NT-01..09
@FusionIIIT-Bot
Copy link
Copy Markdown
Collaborator

Congratulations for making your first Pull Request at Fusion!! 🎉 Someone from our team will review it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants