Skip to content
AdiosDocumentation
Browse documentation

How the kit works

Your app has public pages, customer screens, an API, and a PostgreSQL database. Read this overview when deciding where a feature belongs. You can follow the quickstart without learning every layer first.

Deployment boundary

A founder runs a copy of this kit inside their own Adios team. That deployment owns its PostgreSQL database. Customers of the founder's product are users and workspaces inside that database. They do not need to become members of the founder's Adios team.

A personal workspace and a team workspace use the same schema. Turning a personal workspace into a team changes its kind and memberships; it does not migrate its records to another database.

Layers

LayerOwnershipCurrent implementation
kitMigration ledger and installed modulesSQL and administration CLI
coreUsers, identities, workspaces, memberships, billing records, usage, audit, outbox, agent-run referencesDatabase foundation
contacts / filesShared contacts, organizations, and object-storage metadataDatabase foundation
crm / booking / documents / support / cmsProduct-specific recordsDatabase foundation
BackendVerified identity, membership, action authorization, transaction boundariesJavaScript account/team/CRM/billing endpoints; Python/Go adapters
FrontendPublic site and authenticated customer appKit landing page and JavaScript CRM app
Adios integrationProvisioning, workloads, workflows, secrets, managed agentsadios kit deploy and adios kit delete for PostgreSQL and the CRM app; workflows and agents pending

Keep large files in object storage and their metadata in PostgreSQL. The files table records an opaque storage key, not a publicly accessible URL. Download authorization must recheck workspace access.

Module selection versus customer entitlements

Module installation is a founder/deployment decision: it creates schemas and enables code paths for the SaaS. Customer entitlements are separate workspace-scoped records describing access to paid features. Installing CRM must not automatically grant every customer a paid CRM plan.

Request flow

  1. Verify the session or API credential on the server.
  2. Resolve the requested customer workspace.
  3. Acquire a runtime connection and start a transaction.
  4. Set app.workspace_id locally and verify membership for the authenticated user.
  5. Check action-level role permissions, module state, and feature entitlement.
  6. Read/write domain records using parameters; record events in the same transaction.
  7. Commit; dispatch external effects asynchronously with idempotency keys.

The JavaScript runtime implements authentication, membership checks, CRM role checks, and free/Pro limits on top of the transaction adapters. Event workers and broader module authorization remain work. See the runtime guide for current behavior.

AI boundaries

Company, Product, and Tech agents support the founder's business. Customer-facing AI features belong to the application modules and must be scoped to the customer workspace. Existing Agent Kit definitions are candidates for integration, not embedded running services in this increment.