Nitha is a Music streaming app that lets you listen to music from multiple platforms including Spotify, Saavn, and Youtube without ads and paid subscriptions. Inspired by Blackhole.
Overview
Nitha is a music streaming app developed in Flutter to provide an ad-free and subscription-free listening experience. Frustrated with constant interruptions on platforms like Spotify, I decided to build an app that prioritizes uninterrupted music streaming. Inspired by Blackhole, Nitha brings a smooth, high-quality, and clutter-free music experience to users.
Key Features
- Ad-Free Streaming: Enjoy music without annoying ads or interruptions.
- No Paid Subscriptions: No need for premium plans—listen to unlimited music for free.
- High-Quality Audio: Supports multiple bitrates for the best listening experience.
- Offline Playback: Download your favorite tracks and listen offline.
- Beautiful UI: Smooth and intuitive design built with Flutter.
- Fast & Lightweight: Optimized performance for quick loading and seamless playback.
- Custom Playlists: Create and manage personalized playlists effortlessly.
- Dark Mode Support: User-friendly UI with light and dark themes.
Technologies Used
- Flutter & Dart: Cross-platform development for a smooth mobile experience.
- Audio Service & Just Audio: Handles music playback efficiently.
- SQLite & Hive: Local storage for offline music and playlists.
- Provider & Riverpod: State management for responsive UI updates.
- API Integration: Fetches music data from various sources.
Challenges and Learnings
Building Nitha was a challenging yet rewarding experience. Handling background audio playback, and building a module to fetch songs from multiple sources while avoiding ads were key technical hurdles.
I also gained deep insights into:
- State management techniques in Flutter.
- Optimizing API calls to reduce latency.
- Enhancing UI/UX for a clean and engaging experience.
Deep Dive: The Architecture of Nitha
1️⃣ Cross-Platform Architecture with Flutter & Dart
Nitha is built using Flutter, leveraging its single codebase to deliver a high-performance and native-like experience on both Android and iOS. The app is structured using the MVVM (Model-View-ViewModel) pattern, ensuring clean separation of concerns, better maintainability, and testability.
🔹 Key Considerations:
- Used Dart isolates to handle background tasks without blocking the UI.
- Optimized UI rendering using const constructors and widget refactoring to avoid unnecessary rebuilds.
- Implemented Flutter’s Skia rendering engine for smooth animations and transitions.
2️⃣ Seamless Music Playback & Background Audio Management
Handling continuous playback and background audio is one of the biggest challenges in music streaming apps. Nitha uses Just Audio + Audio Service to support:
- Gapless playback for an uninterrupted experience.
- Background audio with media controls (lock screen & notifications).
- Automatic buffering & caching to minimize latency.
- Adaptive streaming to switch between different bitrates dynamically.
🔹 Technical Breakdown:
- Implemented preloading & lazy loading of the next track for instant playback.
- Integrated system-wide media controls via Android Media Session API.
- Used ExoPlayer (Android) under the hood via Just Audio.
3️⃣ Bypassing Ads & Subscription Restrictions
Nitha sources music from multiple platforms (Spotify, Saavn, YouTube, etc.) without ads or paywalls. This is achieved using a multi-source music aggregation engine, which:
- Fetches direct streaming URLs from public APIs & reverse-engineered endpoints.
- Circumvents rate limits & captchas using rotating proxies & request header spoofing.
- Extracts high-quality audio from video sources like YouTube using
yt-dlp.
🔹 Challenges & Solutions:
- YouTube API limits - Used server-side proxying + CDN caching to reduce request overhead.
- DRM-locked content - Prioritized open/free sources while ensuring high bitrate availability.
- Metadata inconsistency - Implemented LLM-powered (GPT-4) metadata normalization for accurate song tagging.
5️⃣ Offline Playback with Smart Caching
Nitha allows users to download songs for offline playback, using a combination of:
- SQLite (structured metadata storage) for tracking downloaded songs.
- Hive (key-value storage) for quick access to cached songs.
🔹 Optimizations:
- LRU Cache Eviction: Automatically removes least-used songs when storage is full.
- Background Download Queue: Songs download in the background using Flutter WorkManager.
- Fast Resume: Partially downloaded songs resume from the last checkpoint.
Links
Outcome
Nitha successfully provides a free, high-quality, and ad-free music streaming experience. With a smooth UI, offline playback, and no subscriptions, it stands as a solid alternative to mainstream platforms.
This project showcases my skills in Flutter mobile app development, and UI/UX design while solving a real-world problem. 🚀
