Skip to content

[FEAT] SSE 기반 실시간 알림 발송 #172

@GANGHYEON02

Description

@GANGHYEON02

📊 개발 단계 및 우선순위

  • P0 : 서비스 핵심 동작
  • P1 : 운영 및 확장 기능
  • P2 : 부가적인 고도화 기능

🎯 도메인 연관 관계 및 완료 조건 (Definition of Done)

  • 연관 도메인 : notification, community, notice, enrollment_management
  • 설명 : 각 도메인 이벤트(댓글, 대댓글, 채택, 공지, 수강신청, 신고) 발생 시 알림이 생성되고, SSE를 통해 실시간으로 수신자에게 전달되어야 함

💻 상세 작업 내용

  • Model / Policy: Notification 도메인 모델 활용 (기존)
  • UseCase / Command: NotificationCommandUseCase 추가 (알림 생성)
  • Service: NotificationCommandService 추가, SSE 연결 관리 서비스 추가
  • Port / Adapter: SseEmitter 기반 SSE 어댑터 추가
  • Repository: NotificationRepository 활용 (기존), SseEmitter 저장소 추가
  • Controller: SSE 구독 엔드포인트 추가 (GET /api/notifications/subscribe)
  • response / request: SSE 이벤트 응답 포맷 정의

🚨 검증 및 예외 처리 (TestCode)

  • 비즈니스 로직 정상 동작 테스트 작성
  • 잘못된 값 입력 시 의도한 예외(Exception) 발생 테스트 작성 (assertThrows 등 활용)
  • 예외 발생 시 적절한 HTTP 상태 코드 및 응답 메시지 반환 확인

🔗 참고 자료

  • API 명세 (문서 링크 첨부):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions