Lune Plugin is the high-performance core engine of the Lune ecosystem. It orchestrates complex data flows between the desktop client and Spotify's internal GraphQL infrastructure, handling everything from secure TOTP-based authentication to advanced metadata retrieval.
- Auth Core — Secure TOTP-based authentication and token lifecycle management.
- GQL Engine — Specialized handlers for Spotify's internal Search, Browse, and Radio endpoints.
- Media Orchestrator — Direct interfaces for track metadata, user library state, and playlist orchestration.
- Type System — Comprehensive TypeScript definitions for complex internal GQL responses.
- Bypass Logic — Custom HTTP clients tailored to navigate around standard API limitations seamlessly.
- Resilience — Centralized error handling and intelligent request retry mechanisms.
- Efficiency — Optimized data fetching with minimal overhead, designed for smooth desktop performance.
Lune Plugin is built with focus on type-safety and performance:
- Logic: TypeScript for strict structural typing of GQL schemas.
- Networking: Axios with custom interceptors for session-based request handling.
- Authentication: Custom TOTP generation for Spotify's internal secure token exchange.
- Integration: Designed to hook directly into the Electron IPC layer.
├── gql/ # GraphQL query definitions & response types
│ ├── core/ # Specialized request logic (Album, Search, Radio, etc.)
│ └── types/ # Strict TypeScript interface definitions
├── assets/ # Branding and documentation assets
├── spotify-auth-core # TOTP & Token exchange logic
├── http-client # Custom Axios wrapper for internal requests
└── utils # Cryptographic and system helpers
Building the future of music streaming? Give us a ⭐ and join our Discord to contribute to the engine!
Lune Plugin is licensed under the MIT License.
This allows for broad usage within the open-source community, ensuring the core engine remains accessible for developers building within the Lune ecosystem.