|
| 1 | +# Phase 17 Planning - Mobile Integration & Chat Enhancements |
| 2 | + |
| 3 | +**Version:** 1.0.0 |
| 4 | +**Created:** 2026-01-21 |
| 5 | +**Status:** Planning |
| 6 | +**Prerequisites:** Phase 16 Complete (v1.6.2) |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Executive Summary |
| 11 | + |
| 12 | +Phase 17 focuses on completing the WRAITH protocol integration in mobile clients and enhancing WRAITH-Chat with voice/video capabilities and group messaging improvements. |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +## Deferred Items from Phase 16 |
| 17 | + |
| 18 | +The following items were identified during Phase 16 completion as requiring dedicated sprints: |
| 19 | + |
| 20 | +### 1. Mobile Client Protocol Integration |
| 21 | + |
| 22 | +**Current State:** Android and iOS clients have placeholder implementations. |
| 23 | + |
| 24 | +**Android Client (`clients/wraith-android/`)** |
| 25 | +- Replace placeholder with actual wraith-ffi JNI bindings via cargo-ndk |
| 26 | +- Implement proper Noise_XX handshake on mobile |
| 27 | +- Add secure key storage using Android Keystore |
| 28 | +- Integrate with WRAITH discovery for peer finding |
| 29 | + |
| 30 | +**iOS Client (`clients/wraith-ios/`)** |
| 31 | +- Replace placeholder with actual UniFFI bindings |
| 32 | +- Implement proper Noise_XX handshake on mobile |
| 33 | +- Add secure key storage using iOS Keychain |
| 34 | +- Integrate with WRAITH discovery for peer finding |
| 35 | + |
| 36 | +**Estimated Story Points:** 80-100 SP |
| 37 | +**Duration:** 4-6 weeks |
| 38 | + |
| 39 | +### 2. Push Notifications for Mobile Apps |
| 40 | + |
| 41 | +**Android:** |
| 42 | +- Firebase Cloud Messaging (FCM) integration |
| 43 | +- Background service for message delivery |
| 44 | +- Notification channels and customization |
| 45 | + |
| 46 | +**iOS:** |
| 47 | +- Apple Push Notification Service (APNs) integration |
| 48 | +- Background app refresh |
| 49 | +- Notification extensions for rich content |
| 50 | + |
| 51 | +**Estimated Story Points:** 30-40 SP |
| 52 | +**Duration:** 2-3 weeks |
| 53 | + |
| 54 | +### 3. Voice/Video Calls in WRAITH-Chat |
| 55 | + |
| 56 | +**Audio:** |
| 57 | +- Opus codec integration for voice |
| 58 | +- Real-time transport over WRAITH streams |
| 59 | +- Echo cancellation and noise suppression |
| 60 | + |
| 61 | +**Video:** |
| 62 | +- AV1/VP9 codec integration |
| 63 | +- Adaptive bitrate streaming |
| 64 | +- Camera/screen capture integration |
| 65 | + |
| 66 | +**WebRTC-like Features:** |
| 67 | +- ICE candidate exchange via WRAITH |
| 68 | +- TURN relay fallback |
| 69 | +- Quality adaptation |
| 70 | + |
| 71 | +**Estimated Story Points:** 100-130 SP |
| 72 | +**Duration:** 6-8 weeks |
| 73 | + |
| 74 | +### 4. Group Messaging Enhancements |
| 75 | + |
| 76 | +**Protocol:** |
| 77 | +- Multi-party Double Ratchet implementation |
| 78 | +- Sender keys for efficient group encryption |
| 79 | +- Group key rotation |
| 80 | + |
| 81 | +**Features:** |
| 82 | +- Admin controls and permissions |
| 83 | +- Member management (add/remove/ban) |
| 84 | +- Group settings synchronization |
| 85 | + |
| 86 | +**Estimated Story Points:** 50-70 SP |
| 87 | +**Duration:** 3-4 weeks |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## Phase 17 Sprint Breakdown |
| 92 | + |
| 93 | +### Sprint 17.1: Mobile FFI Integration (2 weeks) |
| 94 | +- [ ] Android JNI bindings implementation |
| 95 | +- [ ] iOS UniFFI bindings implementation |
| 96 | +- [ ] Shared FFI test suite |
| 97 | + |
| 98 | +### Sprint 17.2: Mobile Secure Storage (2 weeks) |
| 99 | +- [ ] Android Keystore integration |
| 100 | +- [ ] iOS Keychain integration |
| 101 | +- [ ] Key migration utilities |
| 102 | + |
| 103 | +### Sprint 17.3: Mobile Discovery Integration (2 weeks) |
| 104 | +- [ ] WRAITH discovery on mobile |
| 105 | +- [ ] NAT traversal for mobile networks |
| 106 | +- [ ] Connection keep-alive for mobile |
| 107 | + |
| 108 | +### Sprint 17.4: Push Notifications (2 weeks) |
| 109 | +- [ ] FCM integration (Android) |
| 110 | +- [ ] APNs integration (iOS) |
| 111 | +- [ ] Background message handling |
| 112 | + |
| 113 | +### Sprint 17.5: Voice Calling (3 weeks) |
| 114 | +- [ ] Opus codec integration |
| 115 | +- [ ] Voice stream protocol |
| 116 | +- [ ] Echo/noise processing |
| 117 | + |
| 118 | +### Sprint 17.6: Video Calling (3 weeks) |
| 119 | +- [ ] Video codec integration (AV1/VP9) |
| 120 | +- [ ] Camera capture integration |
| 121 | +- [ ] Adaptive bitrate |
| 122 | + |
| 123 | +### Sprint 17.7: Group Messaging (3 weeks) |
| 124 | +- [ ] Multi-party Double Ratchet |
| 125 | +- [ ] Group key management |
| 126 | +- [ ] Admin controls |
| 127 | + |
| 128 | +### Sprint 17.8: Integration Testing (2 weeks) |
| 129 | +- [ ] End-to-end mobile testing |
| 130 | +- [ ] Cross-platform interoperability |
| 131 | +- [ ] Performance benchmarks |
| 132 | + |
| 133 | +--- |
| 134 | + |
| 135 | +## Total Estimates |
| 136 | + |
| 137 | +| Category | Story Points | Duration | |
| 138 | +|----------|--------------|----------| |
| 139 | +| Mobile Protocol Integration | 80-100 | 4-6 weeks | |
| 140 | +| Push Notifications | 30-40 | 2-3 weeks | |
| 141 | +| Voice/Video Calls | 100-130 | 6-8 weeks | |
| 142 | +| Group Messaging | 50-70 | 3-4 weeks | |
| 143 | +| Integration Testing | 20-30 | 2 weeks | |
| 144 | +| **Total** | **280-370** | **17-23 weeks** | |
| 145 | + |
| 146 | +--- |
| 147 | + |
| 148 | +## Dependencies |
| 149 | + |
| 150 | +### External |
| 151 | +- cargo-ndk for Android FFI |
| 152 | +- uniffi-rs for iOS bindings |
| 153 | +- Opus codec library |
| 154 | +- AV1/VP9 codec libraries |
| 155 | + |
| 156 | +### Internal |
| 157 | +- wraith-ffi crate (complete) |
| 158 | +- wraith-crypto (complete) |
| 159 | +- wraith-discovery (complete) |
| 160 | +- wraith-transport (complete) |
| 161 | + |
| 162 | +--- |
| 163 | + |
| 164 | +## Risks & Mitigations |
| 165 | + |
| 166 | +| Risk | Impact | Mitigation | |
| 167 | +|------|--------|------------| |
| 168 | +| Mobile platform API changes | Medium | Pin SDK versions, maintain compatibility layer | |
| 169 | +| Codec licensing | Low | Use open source implementations (libopus, dav1d) | |
| 170 | +| Battery consumption | Medium | Optimize background processing, adaptive polling | |
| 171 | +| Network reliability | Medium | Robust reconnection, message queuing | |
| 172 | + |
| 173 | +--- |
| 174 | + |
| 175 | +## Success Criteria |
| 176 | + |
| 177 | +- [ ] Mobile clients connect using actual WRAITH protocol (not placeholders) |
| 178 | +- [ ] Push notifications work reliably on both platforms |
| 179 | +- [ ] Voice calls with <200ms latency |
| 180 | +- [ ] Video calls at 720p/30fps |
| 181 | +- [ ] Group chats support 100+ members |
| 182 | +- [ ] All existing tests pass |
| 183 | +- [ ] New functionality has >80% test coverage |
| 184 | + |
| 185 | +--- |
| 186 | + |
| 187 | +## Future Considerations (Post-Phase 17) |
| 188 | + |
| 189 | +1. **XDP Support:** wraith-xdp crate for kernel bypass (requires eBPF toolchain) |
| 190 | +2. **Post-Quantum Crypto:** Hybrid mode with Kyber/Dilithium |
| 191 | +3. **WRAITH-Sync:** Serverless backup synchronization client |
| 192 | +4. **WRAITH-Share:** Distributed file sharing client |
| 193 | + |
| 194 | +--- |
| 195 | + |
| 196 | +**See Also:** |
| 197 | +- [Phase 16 Completion Summary](../completed/PHASE-16-SUMMARY.md) |
| 198 | +- [Client Roadmap](../ROADMAP-clients.md) |
| 199 | +- [Protocol Roadmap](../ROADMAP.md) |
0 commit comments