Tutorials

Ark Data Layer tutorials

Build complete data-layer flows from project boundaries through lifecycle-safe composition.

v1.1.0Beginner

Ark Data Layer tutorials

Read Getting started first if DataSourceContainer, Repository<Data>, or replay-latest observation is unfamiliar. The tutorials assume you understand which layer owns domain interfaces and which layer owns concrete source implementations.

Choose a scenario

  1. Build a catalog data layer creates the domain contract, typed source, DTO mapping, concrete Repository, observation, Composition Root, and shutdown. Start here even if the real source will be HTTP or a database.
  2. Connect a Repository to UseCase Forge adds background behavior after a commit while keeping both packages independent. Read it only when a Repository change must trigger coordinated application work.

What the first tutorial produces

text
Domain: CatalogRepository + CatalogData + CatalogItem
Data:   CatalogRemoteDataSource + DTO + CatalogRepositoryImpl
Root:   concrete source + DataSourceContainer + Repository
Run:    subscribe → synchronize → commit → close by ownership

Each tutorial explains ownership and invocation points instead of presenting isolated syntax.