java-data-layer
Installation
SKILL.md
Java Data Layer: Repository + Room + Retrofit
Instructions
The data layer is the single source of truth for domain entities. The UI must never talk to Retrofit or Room directly.
1. Domain Contracts
Declare repositories as interfaces in the domain layer. Return domain entities only.
public interface ArticleRepository {
LiveData<List<Article>> observeArticles();
ListenableFuture<Void> refresh();
ListenableFuture<Article> getById(long id);
}