cardinal

Manifest reference

Every key app.exs accepts, what it does, and where it is covered.

app.exs needs five keys: name, version, modules, roles and fixtures. Every other key is optional and defaults to [] (folded_modules and sidebars to %{}, frontend and assignment_pool to nil, priority to 0). An unknown key fails the build.

All keys

KeyWhat it holdsMore
nameThe app's name, an atom such as :crmApp layout
versionA semantic version, such as 1.2.0Publishing
modulesModule names its RecTypes may useApp layout
rolesRoles the app declares. Two apps may not declare the same rolePermissions
fixturesRecTypes whose records the app ships, in install orderFixtures and patches
requiresCardinal's version range and the apps it needsApp layout
priorityOrders apps that no requirement orders, lower firstApp layout
scheduler{frequency, worker} pairsJobs and scheduler
rec_eventsHooks on other apps' RecTypesControllers
createEntries in a form's Create menuPlatform modules
connectionsGroups on a record's Connections panelForm and list options
global_searchRecTypes in search priority orderForm and list options
pages, widgetsDesk pages and workspace widgets a plugin rendersWorkspaces and dashboards
apps_screen, sidebars, folded_modulesTiles on /desk and module panelsApp layout
route_rules, redirectsWebsite routingWeb pages
frontendThe app's own single-page appDesk plugins
clicardinal <app>:<command> commandsCLI commands
envEnvironment variables the app readsApp layout
api_routesModules answering /api/<app>/<path>API routes
automation_stepsStep types for the automation builderAutomation steps
principal_setsNamed user sets for row rulesRole rules and sets
grants, widenable, user_invitationWhat other users may hand outRole rules and sets
assignment_poolNarrows an Assignment Rule's usersBelow
ignore_links_on_deleteRecTypes whose Links never block a deleteBelow
log_retentionHow long log rows liveBelow
naming_series_variablesCustom parts in a naming seriesBelow

A Link from these RecTypes does not stop the linked record's delete. Eden's AI Calls never keep a conversation alive:

eden/app.exs
ignore_links_on_delete: ["AI Call", "MCP Event"]

log_retention

{rectype, days} pairs. The daily prune deletes older rows. A later app may list a RecType again to change its period, and a site overrides it in Log Settings.

eden/app.exs
log_retention: [{"AI Call", 7}, {"MCP OAuth State", 1}, {"MCP Event", 30}]

naming_series_variables

{part, module} pairs. The module exports naming_series_variable(part, rec, ctx) and returns the text the part puts in a name, so a series such as INV-.FY.-.#### can use FY. A later app's entry for the same part replaces an earlier one.

assignment_pool

A module exporting assignment_pool(rule, users, rec, ctx). Before a Round Robin, Load Balancing or Weighted Distribution pick, each installed app's module returns the users the rule may pick. Each app narrows the previous app's list. A user a module adds is ignored, and an empty list leaves the rule without a user.

CRM prefers users whose availability is Active:

crm/lib/assignment_pool.ex
defmodule Crm.AssignmentPool do
  @rectypes ["CRM Lead", "CRM Deal"]

  def assignment_pool(%{"document_type" => rectype}, users, _rec, ctx)
      when rectype in @rectypes and users != [] do
    category = categories(ctx, users)
    active = Enum.filter(users, &(category[&1] == "Active"))
    reachable = Enum.filter(users, &(category[&1] in ["Active", "Away"]))

    cond do
      active != [] -> active
      reachable != [] -> reachable
      true -> users
    end
  end

  def assignment_pool(_rule, users, _rec, _ctx), do: users
end
crm/app.exs
assignment_pool: Crm.AssignmentPool

The ctx is a system ctx inside the record's transaction.

On this page