--- domain: mobile last_rule_review_commit: e3b5dae725db62dd7a47c563abcce557e0557551 last_rule_updated_at: 2026-05-21 --- # mobile ## 목적 / 책임 NomadCode의 Flutter-first 제품 UI 도메인이다. 모바일/데스크톱/선택적 web target의 기준 클라이언트, 앱 entrypoint, Mattermost auth, push notification, platform integration을 담당한다. ## 포함 경로 - `apps/mobile/lib/` — Flutter application code. - `apps/mobile/lib/services/` — auth, notification, background handlers. - `apps/mobile/test/` — Flutter widget/service tests. - `apps/mobile/android/`, `apps/mobile/ios/`, `apps/mobile/macos/`, `apps/mobile/linux/`, `apps/mobile/windows/`, `apps/mobile/web/` — platform-specific runner/config. - `apps/mobile/pubspec.yaml`, `apps/mobile/pubspec.lock`, `apps/mobile/analysis_options.yaml` — Dart/Flutter dependencies and analysis. - `apps/mobile/README.md`, `apps/mobile/push-notification-todo.md` — mobile 운영 메모와 push notification 작업 메모. ## 제외 경로 - `services/core/` — backend orchestration/API implementation. - `apps/web/` — 이전 React/Vite browser console scaffold. - `packages/contracts/` — shared API/schema contracts. ## 주요 구성 요소 - `lib/main.dart` — Flutter app entrypoint. - `lib/services/mattermost_auth_service.dart` — Mattermost auth flow. - `lib/services/push_notification_service.dart` — foreground/background notification setup. - `lib/services/push_notification_background.dart` — background message handler. - `android/app/src/main/java/com/tokilabs/mattermost/MattermostFirebaseMessagingService.kt` — Android FCM 수신과 Flutter EventChannel bridge. - `android/app/src/main/java/com/tokilabs/mattermost/NotificationReplyBroadcastReceiver.java` — Android inline reply 처리. - `android/app/src/main/java/com/tokilabs/mattermost/helpers/` — Android notification, DB, network helper. - `test/widget_test.dart` — baseline widget test. ## 유지할 패턴 - platform-specific permission/capability 변경은 해당 platform 디렉터리와 Dart service 변경을 같이 확인한다. - Firebase Messaging 변경은 foreground, background, permission flow를 함께 검토한다. - Android native push 변경은 Kotlin/Java receiver/service, manifest, Dart bridge 영향을 함께 확인한다. - public API 호출을 추가하면 contracts/core 영향 여부를 확인한다. - project/task/agent/workspace 제품 UI는 Flutter 앱을 기준 구현으로 둔다. - `flutter test`를 기본 검증으로 사용한다. - 현재 baseline의 `avoid_print` info는 별도 cleanup 작업으로 다루고, 기능 변경과 섞지 않는다. ## 다른 도메인과의 경계 - **core**: mobile은 core API/notification 계약에 의존하되 core 내부 구현을 알지 않는다. - **contracts**: mobile이 사용하는 API/event shape는 contracts 후보로 올린다. - **web**: React/Vite web은 legacy scaffold이며 Flutter 제품 UI를 복제하지 않는다. - **workspace-ops**: root scripts와 agent rules는 mobile 내부에 복제하지 않는다. ## 금지 사항 - Android/iOS/macOS 권한 변경을 Dart service 변경 없이 단독으로 넣지 않는다. - Android native notification helper 변경을 FCM service와 reply/dismiss receiver 영향 검토 없이 단독으로 넣지 않는다. - Firebase 초기화/handler 변경을 테스트나 수동 검증 메모 없이 마무리하지 않는다. - generated/platform build output을 의도 없이 커밋하지 않는다. - mobile 내부에 별도 `agent-ops` scaffold를 다시 만들지 않는다.