How suhailsaqan/swae works
Swae is an iPhone live-streaming studio built around Nostr identity and Lightning payments. The primary workflow is account setup, stream configuration and broadcast, then audience interaction through chat and zaps; discovery and playback form a parallel audience workflow. The graph also preserves documented effects, collaboration, hardware, dashboard, and Watch capabilities. Several capabilities are represented by their exact enclosing directories because their implementation files were not sampled; those links rely on README descriptions rather than inspected call sites.
Main entry points: AppState.swift Nostr App State · CameraViewController.swift Camera Studio · Media Media Pipeline · LiveChatController.swift Live Chat
Components 23
App and Identity
- App Shell
swae/RootViewController.swift - Nostr App State
swae/Controllers/AppState.swift - Account Setup
swae/Controllers/Onboarding - Profiles
swae/Controllers/ProfileViewController.swift - Nostr Events
swae/Services/RelayEventProcessor.swift
Broadcast Studio
- Camera Studio
swae/Controllers/Camera/CameraViewController.swift - Media Pipeline
swae/Media - Video Effects
swae/VideoEffects - Stream Protocols
swae/Media/HaishinKit - Adaptive Bitrate
swae/Media/AdaptiveBitrate - Streamer Dashboard
swae/Controllers/ControlPanel/ControlPanelViewController.swift
Audience and Social
- Stream Discovery
swae/Views/VideoListViewController.swift - Live Player
swae/GenericLivePlayer/Controllers/PlayerController.swift - Live Chat
swae/GenericLivePlayer/Controllers/LiveChatController.swift
Wallet and Payments
- Lightning Wallet
swae/Models/WalletModel.swift - Zap Payments
swae/Services/ZapService.swift
Integrations and Companions
- Guest Collaboration
swae/Services/CallSignalingService.swift - Hardware Devices
swae/Integrations - Apple Watch App
Swae Watch Watch App
Other components
- Creator
- Viewer
- Nostr Relays
- Lightning Wallet Services
Connections 23
- Creator → Account Setup: creates account
- Account Setup → Nostr App State: sets identity
swae/Controllers/Onboarding/CreateProfileViewController.swift - App Shell → Nostr App State: sets up
swae/RootViewController.swift - Nostr App State → Nostr Events: processes events
swae/Controllers/AppState.swift - Profiles → Nostr App State: reads profile state
swae/Controllers/ProfileViewController.swift - Viewer → Stream Discovery: browses streams
- Stream Discovery → Live Player: opens playback
- Creator → Camera Studio: configures broadcast
- Camera Studio → Media Pipeline: captures media
- Media Pipeline → Video Effects: composites effects
- Media Pipeline → Stream Protocols: encodes and streams
swae/Media/RtspClient/RtspClient.swift - Camera Studio → Adaptive Bitrate: adjusts bitrate
- Camera Studio → Streamer Dashboard: opens controls
- Viewer → Live Player: watches stream
- Live Player → Live Chat: shows live chat
swae/GenericLivePlayer/Controllers/LiveChatController.swift - Live Chat → Nostr App State: publishes messages
swae/GenericLivePlayer/Controllers/LiveChatController.swift - Nostr App State → Nostr Relays: publishes events
swae/Controllers/AppState.swift - Live Chat → Zap Payments: initiates zaps
swae/GenericLivePlayer/Controllers/LiveChatController.swift - Zap Payments → Lightning Wallet: uses wallet
- Lightning Wallet → Lightning Wallet Services: connects wallet
- Camera Studio → Guest Collaboration: coordinates guests
- Camera Studio → Hardware Devices: uses device sources
swae/Controllers/Camera/CameraViewController.swift - Nostr App State → Apple Watch App: shares stream controls