70 lines
5.1 KiB
Markdown
70 lines
5.1 KiB
Markdown
# Mattermost Push Plugin Extraction
|
|
|
|
## 목표
|
|
|
|
Flutter 앱 내부에 직접 이식된 Mattermost push notification 기능을 `../mattermost-push-plugin` 독립 Flutter plugin repo로 분리한다. NomadCode 앱은 Firebase 설정, 로그인/라우팅, 제품 UI만 유지하고, Mattermost push 수신/표시/답장/ACK/토큰 저장 경계는 plugin API를 통해 소비하도록 전환한다.
|
|
|
|
## 단계
|
|
|
|
Mattermost Push Plugin Extraction
|
|
|
|
## 상태
|
|
|
|
진행 중
|
|
|
|
## 구현 잠금
|
|
|
|
- 상태: 해제
|
|
- 결정 필요: 없음
|
|
|
|
## 범위
|
|
|
|
- `../mattermost-push-plugin` repo를 Flutter plugin 프로젝트로 구성
|
|
- `apps/mobile/lib/services/push_notification_service.dart`의 public Dart facade를 plugin API로 승격
|
|
- Android native FCM service, notification builder, reply/dismiss receiver, ACK delivery, Room DB helper, network helper, notification resource를 plugin 소유로 이동
|
|
- 앱 `MainActivity`와 `MainApplication` 직접 의존을 제거하고 Flutter plugin 등록/초기화 경계로 전환
|
|
- NomadCode 앱은 plugin path dependency, Firebase project 설정, Mattermost 로그인/credential 관리, 알림 클릭 라우팅만 보유
|
|
- 현재 Android-first 구현을 기준으로 하되 iOS/macOS는 no-op 또는 후속 확장 지점을 명확히 둠
|
|
- 기존 `push-notification-todo.md`의 남은 Android DB stub과 singleton DB close 위험을 plugin extraction 과정에서 추적 가능한 작업으로 재배치
|
|
|
|
## 필수 기능
|
|
|
|
- [ ] [plugin-scaffold] `../mattermost-push-plugin`을 `mattermost_push_plugin` Flutter plugin repo로 구성한다.
|
|
- [ ] [dart-api] push 초기화, 알림 stream, opened event, device token, auth token, signing key 저장 API를 plugin Dart surface로 정의한다.
|
|
- [ ] [android-native] Android FCM service, notification builder, ACK, inline reply, dismiss, Room DB, network helper, notification resource를 plugin Android implementation으로 이동한다.
|
|
- [ ] [host-boundary] `MainActivity`/`MainApplication` 직접 참조를 제거하고 launch intent, lifecycle, channel registration, DB/channel 초기화를 plugin-safe 방식으로 정리한다.
|
|
- [ ] [app-consumer] `apps/mobile`을 plugin consumer로 전환하고 앱에는 Firebase 설정, Mattermost auth flow, 라우팅 콜백만 남긴다.
|
|
- [ ] [risk-hardening] Room DB singleton close, `PushNotificationDataHelper` DAO stub, Firebase Messaging manifest 충돌 같은 extraction 위험을 처리하거나 명시적 follow-up으로 남긴다.
|
|
- [ ] [docs-verify] plugin README, host app 통합 메모, 검증 명령과 수동 smoke 기준을 작성한다.
|
|
|
|
## 완료 기준
|
|
|
|
- [ ] `../mattermost-push-plugin`에 Flutter plugin 구조, Dart API, Android implementation, Android manifest/resource/dependency가 존재한다.
|
|
- [ ] `apps/mobile`은 Mattermost push 관련 native service/helper/resource를 직접 소유하지 않고 plugin path dependency로 연동한다.
|
|
- [ ] Android 알림 수신, 시스템 알림 표시, 알림 탭 event, inline reply, ACK, device/auth/signing key 저장 경계가 plugin API 또는 plugin native 구현으로 닫힌다.
|
|
- [ ] host 앱이 유지해야 하는 Firebase 설정, `google-services.json`, Mattermost login/credential, 라우팅 callback 책임이 문서화되어 있다.
|
|
- [ ] `apps/mobile`의 `flutter test`가 통과하고, Android build 또는 명시한 대체 검증으로 plugin 통합이 깨지지 않음을 확인한다.
|
|
- [ ] iOS/macOS 지원 범위가 no-op인지 후속 구현인지 문서에 명확히 남아 있다.
|
|
|
|
## 범위 제외
|
|
|
|
- Mattermost 서버 push gateway 또는 server-side plugin 구현
|
|
- pub.dev 공개 배포, semantic versioning, release automation
|
|
- iOS/macOS native push full implementation
|
|
- NomadCode project/workspace UX 화면 재설계
|
|
- Mattermost auth 제품 UI 완성
|
|
- core service notification event 또는 Mattermost adapter 구현
|
|
|
|
## 작업 컨텍스트
|
|
|
|
- 관련 경로: `apps/mobile/`, `../mattermost-push-plugin/`
|
|
- 현재 plugin repo: `../mattermost-push-plugin`은 사용자가 생성한 빈 git repo다.
|
|
- 표준선(선택): repo명은 `mattermost-push-plugin`, Dart package name은 `mattermost_push_plugin`으로 둔다. 첫 구현은 Android-first Flutter plugin으로 잡고, host app이 Firebase project 설정과 Mattermost login/라우팅을 소유한다.
|
|
- 선행 작업: Flutter-first Client Consolidation
|
|
- 후속 작업: Project Workspace Management UX, External Integration의 Mattermost 사용자-facing 흐름
|
|
- 분석 근거:
|
|
- `apps/mobile/lib/services/push_notification_service.dart`는 EventChannel/MethodChannel과 FCM token facade를 제공한다.
|
|
- `apps/mobile/android/app/src/main/java/com/tokilabs/mattermost/MattermostFirebaseMessagingService.kt`는 native FCM 수신, signature verification, ACK, notification build, EventChannel 전달을 수행한다.
|
|
- `apps/mobile/android/app/src/main/java/com/tokilabs/mattermost/MainActivity.kt`와 `MainApplication.kt`는 현재 plugin으로 옮겨야 할 channel registration, DB init, notification channel init, lifecycle tracker를 직접 보유한다.
|
|
- `apps/mobile/android/app/build.gradle.kts`는 Firebase Messaging, JJWT, OkHttp, coroutines, Room/kapt 의존성을 앱에 직접 둔다.
|
|
- 확인 필요: 없음
|