π‘ MEDIUM: Modularize RemoteCameraStreamer (994 lines)
- Dominant language
- Swift
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 1
Description
## Problem
`RemoteCameraStreamer.swift` is **994 lines** handling multiple unrelated concerns.
## Mixed Concerns
1. **Bonjour/mDNS discovery** - Finding camera servers
2. **Network connection management** - TCP/WebSocket handling
3. **Video encoding** - Compression and format conversion
4. **UI state management** - Connection status, errors
5. **Protocol handling** - Custom streaming protocol
## Proposed Decomposition
```
Remote Camera Feature
βββ CameraServerDiscovery (~200 lines)
β βββ Bonjour browsing, service resolution
βββ RemoteCameraConnection (~250 lines)
β βββ Connection lifecycle, reconnection
βββ CameraStreamEncoder (~250 lines)
β βββ Video encoding, compression
βββ CameraStreamProtocol (~150 lines)
β βββ Message framing, serialization
βββ RemoteCameraViewModel (~150 lines)
βββ UI state only
```
## Acceptance Criteria
- [ ] Each component has single responsibility
- [ ] Discovery can be reused for other services
- [ ] Connection handling is testable
- [ ] Encoder can be unit tested with sample frames
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading RemoteCameraStreamer.swift and map its Bonjour/mDNS discovery, connection, encoding, protocol, and UI state responsibilities. Use the proposed component boundaries as a decomposition plan; done means each component has one responsibility, discovery is reusable, connection handling is testable, and the encoder can be unit tested with sample frames.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100