# Phone Recorder - Future Ideas / TODO ## Questions to Address ### Key Rotation - What happens when server keypair changes? - Current behavior: Old encrypted files can't be decrypted with new key - Options: 1. Keep old private key archived for decrypting old files 2. Sync all files before rotating keys 3. Store key version/ID in encrypted file header ### Manual Decryption - Document steps to decrypt files copied via USB from phone - Need: Python script using server's private key - Consider: CLI tool in server/ directory ### No-Key Behavior - Current: Deletes recordings if no public key configured (security-first) - Alternatives to consider: 1. Store unencrypted with warning (less secure) 2. Queue recordings until key configured (could fill storage) 3. Current behavior is probably correct for security model --- ## Possible Features ### High Priority (if needed) - [ ] QR code for key import (avoid email/typing) - [ ] Server URL configuration in app UI (currently requires code change for non-defaults) - [ ] Manual sync trigger button - [ ] View sync history/status in app - [ ] **Display last successful sync time on phone** (e.g., "Last sync: 2 hours ago") - [ ] **Server status page** - HTML dashboard showing: - When phone last synced - Total recordings count - Recent uploads - Disk space usage - Could be at `/status` or `/dashboard` ### Medium Priority - [ ] Configurable recording quality (bitrate, sample rate) - [ ] Configurable segment duration (currently 2 hours) - [ ] Delete synced files automatically (with configurable retention) - [ ] Server: Authentication for upload endpoint - [ ] Server: HTTPS with Let's Encrypt ### Audio Analysis & Intelligence - [ ] **Speech detection bar** - Visual indicator showing when speech is detected vs silence - Display as additional bar in recording detail view alongside waveform - Data comes from batch processing script - [ ] **Sleeping detection** - Detect periods of sleep/silence for overnight recordings - Could help skip to interesting parts - Visual indicator in timeline - [ ] **Auto voice recognition / Speaker identification** - Identify who is talking (requires training on voice samples) - Label segments by speaker - Not text-based (transcripts are unreliable) - [ ] **Auto highlight generation** - Audio-based detection (not text search since transcripts are bad) - Example: detect phrase patterns like "Ok, note taken" acoustically - Auto-create highlights with tags like "note_taken" - Use audio fingerprinting or keyword spotting models ### Viewer UX - [ ] **Background audio playback** - Keep playing current audio while browsing other recordings - Mini player that persists across views - Allows reviewing recordings list while listening - [ ] **Highlight duration** - Currently highlights mark only a point; consider adding end time/duration - [ ] **Auto-scroll timeline to recordings** - If recordings are only at end of day, auto-scroll so user doesn't have to scroll down to see them ### Low Priority / Nice to Have - [ ] Multiple server destinations - [ ] Compression before encryption - [ ] Resume interrupted uploads - [ ] Server: Web UI to browse/play recordings - [ ] Server: Transcription integration ### Infrastructure - [ ] Systemd service file for server - [ ] Docker container for server - [ ] NixOS module for server - [ ] Backup strategy for server private key --- ## Known Limitations 1. **No streaming encryption**: Entire temp file must complete before encryption 2. **No partial sync**: If upload fails, whole file retries 3. **Single server**: Can only sync to one destination at a time 4. **No authentication**: Anyone who can reach server can upload (relies on encryption for confidentiality) --- ## Testing Notes ### Unit Tests (server/) ```bash python test_crypto.py ``` ### Integration Tests (server/) ```bash # Start server first python main.py & python test_integration.py ``` ### Manual Testing Checklist - [ ] Record short clip, verify .ogg.enc created - [ ] Verify temp file deleted after encryption - [ ] Check sync triggers after recording stops - [ ] Verify hash verification (corrupt a file, see it retry) - [ ] Test LAN detection with different subnets - [ ] Test sync mode transitions