PhoenixKitProjects.Archetypes (PhoenixKitProjects v0.21.1)

Copy Markdown View Source

Creation starting points — the outcome-oriented cards on the New project page (the 2026-08-06 five-AI brainstorm's strongest consensus: one transparent choice that BUNDLES a feature preset + extension seeds, replacing the bare preset select as the page's primary control).

An archetype is a RECIPE applied once at creation, not a stored mode:

  • preset — the Features preset key it seeds (the flag bundle).
  • extensions — extension keys enabled on create, LISTED ONLY when their registry entry is available (an uninstalled CRM never shows on the card face).
  • The user's explicit customizations always win over the recipe (the union rule: recipes seed, users override, nothing is silently dropped).

The card list is fixed and small by design; per-site tuning happens through the site default preset (which picks the preselected card) and the post-create Modules & Features panel.

Summary

Functions

The card preselected on page load: the one whose preset matches the site-wide default preset setting (falling back to Standard).

One archetype by key, from the availability-filtered list.

The card list with each archetype's extensions filtered to the AVAILABLE catalog. A requires_extensions card whose seeds are ALL unavailable is dropped entirely (its promise can't be kept).

Types

t()

@type t() :: %{
  key: String.t(),
  name: String.t(),
  description: String.t(),
  outcomes: [String.t()],
  icon: String.t(),
  preset: String.t(),
  extensions: [String.t()],
  extensions_off: [String.t()],
  requires_extensions: boolean()
}

Functions

default_key()

@spec default_key() :: String.t()

The card preselected on page load: the one whose preset matches the site-wide default preset setting (falling back to Standard).

get(key)

@spec get(String.t() | nil) :: t() | nil

One archetype by key, from the availability-filtered list.

list()

@spec list() :: [t()]

The card list with each archetype's extensions filtered to the AVAILABLE catalog. A requires_extensions card whose seeds are ALL unavailable is dropped entirely (its promise can't be kept).