Skip to main content

Context

0023 makes Stackra the framework tier with reference members. 0029 then put one Encore application under services/ as if the product backend lived here. The owner has since fixed the product architecture: Figentra OS is a product of 12 to 15 services built on Stackra packages and sold as SaaS, on-prem and air-gapped. Stackra packages are also sold on their own. If product services lived in this repository, every Stackra release would carry a product, and the packages could not be proven independent of it.

Decision

  1. Stackra ships packages only: @stackra/* and @stackra-pro/* (0077). Nothing deployable that Stackra produces is a product.
  2. services/ and apps/ in this repository are reference apps and test beds. They prove packages, exercise the generator and feed the create-stackra-app templates. They never carry a product feature.
  3. Product services live in the Figentra OS repository and install Stackra packages from npm.figentra.com (0025). Figentra OS is sold as SaaS, on-prem and air-gapped (0076). Other products install the packages the same way (0023 decision 2).
  4. Encore.ts stays the service runtime for services built on Stackra, here and in Figentra OS. The reference services in this repository are one Encore application, and a service never imports another service’s source. stackra gen generates it into .stackra/encore/ (0091).
  5. Packages never import encore.dev. stackra gen emits the Encore declarations for a service (0041, 0078).
  6. The Encore plus legacy-decorator spike (0005) still runs before any service depends on the combination.
  7. Service-sizing rules for products (0031) apply where product services live, in Figentra OS, not to the reference services here.

Consequences

  • A diff that adds a product feature under services/ or apps/ is rejected, citing this page.
  • Reference services stay small. They need just enough breadth to prove the messaging, tenancy and identity packages end to end.
  • How the generated Encore application maps to workspace members and tier:service tags is still open (0029 decision 5 carried over); see 0091.
  • When accepted, this amends 0010 decisions 5 and 6 (the runtime is Encore, for reference services) and 0023 decision 1 (product services are named as living in Figentra OS). Both are Accepted, so their status lines change only when this ADR is accepted.
  • Member names in apps/ and services/ change scope per 0083.

Enforcement

packages/tooling/oxlint/src/boundaries.jsonc bans encore.dev in packages. Planned: the product-literal check of 0003 and 0023 extended to services/ and apps/. Review by the architecture-guardian agent of any new folder under services/.

Supersedes and sources

Supersedes: 0029 (it restates decisions 1, 3, 4 and 6 of 0029 and narrows decision 2 to reference services). Will amend, on acceptance: 0010, 0023. Sources: owner decisions in chat, 2026-10-19 (Round 8, “product architecture” and “services/ in Stackra”).