arkavo-org / arkavo-org/app

🟑 MEDIUM: Modularize RemoteCameraStreamer (994 lines)

Open
#218 0 comments 0 reactions 0 assignees View on GitHub
enhancement tech debt
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.