Skip to content

feat: implement backend notification system for comment mentions#69

Open
Arcadi4 wants to merge 10 commits into
developfrom
feat/user-notifications-backend
Open

feat: implement backend notification system for comment mentions#69
Arcadi4 wants to merge 10 commits into
developfrom
feat/user-notifications-backend

Conversation

@Arcadi4
Copy link
Copy Markdown
Contributor

@Arcadi4 Arcadi4 commented May 11, 2026

Summary

Implements backend-only in-app notification MVP for issue #61, focused on comment mention notifications.

What Changed

New notifications app (apps/backend/notifications/):

  • Notification model with UUID, timestamps, recipient FK, actor/target/action_object GFKs, notification_type, verb, is_read, data, dedupe_key
  • Service layer with idempotent notification creation and read state management
  • REST API at /v1/notifications/ with list, retrieve, unread_count, mark_read, mark_all_read
  • Admin registration with filters and search

Comment mention integration (apps/backend/comments/services.py):

  • create_comment() creates mention notifications after comment creation
  • update_comment() creates notifications only for newly added mentions
  • Self-mentions filtered, duplicate notifications prevented via dedupe_key

Registration updates:

  • Added to INSTALLED_APPS in base.py and test.py
  • Registered in backend URLs at /v1/
  • Updated backend-lint.yml workflow
  • Updated README.md and AGENTS.md

API Endpoints

  • GET /v1/notifications/ - List user's notifications (filterable by is_read, notification_type)
  • GET /v1/notifications/{id}/ - Retrieve single notification
  • GET /v1/notifications/unread_count/ - Get unread count
  • POST /v1/notifications/{id}/mark_read/ - Mark one as read
  • POST /v1/notifications/mark_all_read/ - Mark all as read

All endpoints require authentication and are scoped to request.user.

Closes #61

@Arcadi4 Arcadi4 requested a review from Typogalaxy as a code owner May 11, 2026 07:43
@github-actions github-actions Bot added backend This changes files in app/backend/. .github This modifies files in .github/. release A new project release. labels May 11, 2026
@Typogalaxy Typogalaxy changed the base branch from main to develop May 11, 2026 09:41
@Typogalaxy Typogalaxy removed the release A new project release. label May 11, 2026
@Typogalaxy Typogalaxy added the feature This asks for a new feature or enhancement. label May 12, 2026
@Arcadi4 Arcadi4 deleted the branch develop May 13, 2026 09:20
@Arcadi4 Arcadi4 closed this May 13, 2026
@Arcadi4 Arcadi4 reopened this May 13, 2026
@github-actions github-actions Bot added frontend This changes files in app/frontend/. docs This modifies files in docs/. labels May 13, 2026
@Arcadi4 Arcadi4 force-pushed the feat/user-notifications-backend branch from 813872c to 52ff6e1 Compare May 13, 2026 11:48
@Arcadi4 Arcadi4 enabled auto-merge (rebase) May 13, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend This changes files in app/backend/. docs This modifies files in docs/. feature This asks for a new feature or enhancement. frontend This changes files in app/frontend/. .github This modifies files in .github/.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] User Notifications

2 participants