How krishnanx/noctune works
Main Components
a. Mobile Client (React Native)
• UI Layer: Pages (Home, Search, Player, etc.) & Reusable Components
• Navigation Module: RootStack, AuthStack, MainTab, Universal
• State Management: Redux Store with slices (Auth, Music, Playlist, Download, Timer, Theme, User, Keyboard)
• Local Assets & Media Loader (AudioLoader, Waveform, etc.)
• WebSocket Client for real-time events
• Native Bridge: iOS (AppDelegate, Swift/Objective-C) & Android (MainActivity, Kotlin)
b. Backend Services
• Authentication & User API (Express.js)
• Music Metadata & Streaming API (FastAPI)
• Real-Time Events Server (WebSocket endpoint)
c. Data Layer
• Supabase (PostgreSQL) for user data, playlists, preferences
• Cloudflare CDN for caching audio streams and static assets
Relationships & Data Flows
• From Mobile Client → Backend REST APIs (HTTP/HTTPS) for login, search, playlist CRUD
• Mobile Client ↔ WebSocket Server for live updates (e.g., collaborative queue)
• Backend → Supabase for database reads/writes
• Backend → Cloudflare for publishing/caching audio streams
Architectural Patterns
• Single-Page Application pattern inside React Native with Redux for state centralization
• Modular Navigation (stack + tabs) for auth vs. main flows
• Separation of concerns: UI Components ←→ Business Logic (Redux thunks) ←→ API Layer
• Native–JavaScript bridge: React Native core mediates between JS code and native modules
Incorporate Technologies & Frameworks
• WebSocket library and key slices (AuthThunk, MusicSlice, DownloadSlice) where they live
Detailed Component Breakdown (inside “Mobile App” container)
• State Management: show Redux store with individual slices branching off