Application Module

The application module is the path-independent state model that sigilaris-core ships today. It provides typed blueprints, path-bound mounted modules, reducer contracts, transaction envelopes, and store abstractions for composing application-specific blockchain state.

Current Surface

Why It Exists

Sigilaris separates stateful application logic into:

That split lets the same module logic be mounted under different deployment paths while still keeping schema validation, prefix-free safety, and provider projection at compile time.

Compile-Time Building Blocks

Current Blueprint Wiring

import cats.data.{EitherT, Kleisli}
import cats.effect.IO
import org.sigilaris.core.application.feature.accounts.module.AccountsBP
import org.sigilaris.core.application.feature.group.module.GroupsBP
import org.sigilaris.core.application.module.provider.TablesProvider
import org.sigilaris.core.application.module.runtime.StateModule
import org.sigilaris.core.merkle.{MerkleTrie, MerkleTrieNode}

given MerkleTrie.NodeStore[IO] = Kleisli: (_: MerkleTrieNode.MerkleHash) =>
  EitherT.rightT[IO, String](None)

val accountsModule =
  StateModule.mount[("app", "accounts")](AccountsBP[IO])
val accountsProvider = TablesProvider.fromModule(accountsModule)
val groupsModule =
  StateModule.mount[("app", "groups")](GroupsBP[IO](accountsProvider))

The current repository uses exactly this style of mounted-module wiring in its integration and scheduling tests. The assembly layer adds a thinner DSL over the same primitives; it does not replace the application module.

Current Baseline