Skip to content
AdiosDocumentation
Browse documentation

Choose modules

A module adds a set of tables for a product area. Start with the modules your first customer workflow needs; add more as the product grows.

ModuleWhat it providesShared dependencies
crmContacts, pipelines, deals; a JavaScript app and APIcontacts
bookingService and appointment schemascontacts
documentsDocument processing and review schemasfiles
supportTicket, message, and knowledge schemascontacts, files
cmsContent, revision, and publication schemasfiles

Only CRM currently includes the customer interface and API. Other modules need those parts built. Use the application guides for a first workflow.

Use a module

adios kit deploy includes CRM and contacts. To include additional schemas on a new installation:

sh
adios kit deploy --name my-saas --modules crm,booking

For an existing database, configure the administration connection using manual database setup, then run:

sh
adios kit enable crm support
adios kit disable crm

Shared contacts and files install automatically as needed. Rerun adios kit grant-runtime saas_runtime after enabling new modules, using your actual runtime role name. Disabling CRM leaves support and shared contacts available. Disabling contacts is refused while support is enabled. Disable is reversible; customer data stays in the database.

Add a module

Use this section with your coding agent when the existing schemas do not cover your product. Ask it to build the UI, API, and tests as well as the tables.

Create modules/your_module/module.json, migrations/001.sql, and README.md. Use a lowercase identifier matching the directory and SQL schema. The manifest contains id, name, version, kind, dependencies, schema, migrations, tables, and status. Dependencies name other local modules. Migration paths must remain inside the module directory. The CLI validates paths and dependency cycles before database changes.

json
{
  "id": "tasks",
  "name": "Tasks",
  "version": "0.1.0",
  "kind": "application",
  "dependencies": ["contacts"],
  "schema": "tasks",
  "migrations": ["migrations/001.sql"],
  "tables": ["tasks"],
  "status": "database-foundation"
}

Use the existing modules as SQL examples. Every customer table needs workspace_id, a composite workspace/id unique constraint, workspace-qualified foreign keys, ENABLE and FORCE ROW LEVEL SECURITY, and a policy checking workspace and module state. Index queries by workspace and then their actual filtering/sorting columns.

Enable the module and rerun grant-runtime for the application role. Add database tests proving that another workspace cannot read, write, or link to its records. Add dependency and disable/re-enable cases.

Evolve a module

Append migration files and list them in execution order. Do not rewrite applied migrations. Table or column renames must account for deployed API versions and retained data. Increment the module version when its contract changes.

The current planned manifest field describes future route prefixes and navigation. It is not executable registration. The next runtime increment must provide explicit route/job registries and enforce module state at dispatch. Do not treat catalog metadata as implementation.

Remove a module

Disable it first. Retain its source and migrations so upgrades can verify the database history. Removing code from a distribution is a separate release change. Purging customer records or dropping schemas requires a deliberate, reviewed data-deletion operation; no normal module command does it.

adios kit deploy remembers the module selection from the first installation. A later deploy reapplies that selection, including re-enabling a selected module that you disabled manually. Account for this when changing your deployment workflow.