A repository presents domain data as a collection-like capability: fetch courses, observe progress, save a lesson completion. Callers ask in product language and do not need to know whether results come from HTTP, a database, memory, or a cache. A repository may coordinate several data sources and apply freshness or conflict rules.
A service represents a focused capability or operation that is not naturally collection-shaped, such as authentication, image processing, analytics, or certificate generation. A client is commonly a lower-level adapter for a protocol or system, such as an HTTP client. A use case coordinates a product workflow and may call repositories or services while applying policy.
Introduce a boundary when it hides a meaningful decision, supports replacement, or provides a stable domain vocabulary. A type that simply renames every API-client method adds indirection without isolation. Define error semantics, caching expectations, concurrency, and consistency at the boundary so callers know what the capability promises.