How fly-apps/live_beats works
Main Components Identification
The system should be represented with these key components:
a) Web Layer (Phoenix LiveView)
• Live Views (Profile, Player, Settings, SignIn)
• Controllers (OAuth, File, Redirect)
• Components (Layouts, Core Components)
b) Core Business Logic
• Accounts System
• Media Library
• Audio Processing
c) External Services
• GitHub OAuth
• Database (Postgres, indicated by Ecto usage)
• File Storage System
Component Relationships
a) User Flow
• GitHub OAuth authentication flow
• File upload pathway
• Real-time music playback flow
b) Data Flow
• WebSocket communications for live updates
• File storage and retrieval paths
• Database interactions
Technical Details
Specific technical elements:
• Blue: Phoenix/LiveView components
• Green: External services
• Yellow: Data stores
• Purple: Real-time features
• Gray: Supporting services
Specific Implementation Notes
a) Phoenix LiveView Architecture
• Real-time socket connection
• Presence functionality
• Pub/sub system
b) Media Handling
• MP3 processing flow
• File storage and retrieval
• Song position tracking
c) Authentication Flow
• GitHub OAuth integration
• User session management
• Authorization checks