Source Engine
The lib/source_engine acts as a universal abstraction layer. Because ShonenX integrates multiple discrete sources (both native code and external extensions), the core application cannot be tightly coupled to any individual source's API.
Unified Media
Features consume data via the UnifiedMedia model. The source_engine is responsible for parsing raw foreign payloads and normalizing them into this model.
Source Types
- Inbuilt Sources: Located in
lib/source_engine/inbuilt_sources/. These are hardcoded Dart implementations for specialized APIs. - Extensions: Sandboxed, dynamically loaded scripts originating from external communities (Mangayomi, Cloudstream, Aniyomi). See the Extension Bridge.
Adding an Inbuilt Source
- Create a new file in
lib/source_engine/inbuilt_sources/. - Implement the required interface based on the target media type (Anime, Manga, Novel).
- Register your implementation in
inbuiltSourcesProviderinsidesource_registry.dart.