Skip to main content

Module catalog

The module catalog (adapters/acme-vue-encore/modules/) contains composable service modules that the generator can merge into a generated application at create time. Each module declares its composition through a manifest.json validated against the schema in scripts/lib/manifest.schema.ts.

Available modules

ModuleVersionStatusDescription
security-core2.0.0stableCross-cutting security configuration. Documents the CORS origin knob the base app's encore.app global_cors consumes.
api-gateway2.0.0stableBFF API gateway opt-in. Documents private-backend config knobs and contributes the frontend /connectivity test page.
data-postgres2.0.0stableDeclarative marker that PostgreSQL persistence is built into the base via Encore's SQLDatabase("app").
data-redis3.0.0stableOptional infra: composes an Encore infra.config.json redis block reached over the typed REDIS_HOST/REDIS_USER/REDIS_PASSWORD connection. Not a rate-limit backend (that is Postgres) or a session store; its first consumer is the cron large-scale lock.
user-management2.0.0stableApplication-side user + role management as an Encore service. The reference shape for feature modules.

Module taxonomy

Modules fall into two categories:

Cross-cutting modules (declarative only)

These modules ship no apps/api/src/** payload. They are declarative markers documenting configuration knobs already present in the base app:

  • security-core: CORS origin configuration (CORS_ORIGIN env var).
  • api-gateway: BFF proxy configuration (OAuth client secrets already declared by the base).
  • data-postgres: PostgreSQL via Encore's SQLDatabase("app").
  • data-redis: Optional Redis infrastructure. Ships no apps/api/src/** payload but composes an infra.config.json redis block (typed REDIS_HOST/REDIS_USER/REDIS_PASSWORD), consumed by the cron large-scale lock via the baseline lib/redis client. Not rate limiting (that is Postgres) and not a session store.

Service modules (files + declarations)

These modules ship an Encore service directory under files/ and declare services, migrations, secrets, and other composition payloads:

  • user-management: ships the user-management Encore service with role catalog tables, admin CRUD endpoints, and middleware declarations.

Manifest schema

Every module manifest declares:

FieldTypePurpose
namestringModule identifier (matches directory name).
versionstringSemver version.
descriptionstringHuman-readable description.
statusstringstable, beta, or deprecated.
requiresstring[]Hard dependencies (auto-installed).
requiresOneOfstring[]At least one must be present.
optionalPeersstring[]Enhanced behavior when present.
conflictsstring[]Cannot coexist (auto-removed on install).
servicesstring[]Encore services contributed.
secretsobject[]Encore secrets to bind.
corsEntriesstring[]CORS origins to merge.
middlewaresstring[]Middleware references.
migrationsobject[]Database migrations to merge.
filesobjectSource-to-destination file map.
authExportsstring[]Auth-related exports.
webSnippetFilestringFrontend registration snippet.
packageDepsobjectnpm dependencies to merge.
envVarsobjectEnvironment variables to declare.

user-management: the reference module

The user-management module is the reference implementation for service modules (spec 003). It demonstrates:

  • An Encore service directory (files/apps/api/user-management/) with typed endpoints behind auth + requireRole.
  • A database migration (db/1_user_management.up.sql) creating the app_role catalog and user_role assignments.
  • Middleware declarations (securityHeaders, csrfMiddleware, apiRateLimit).
  • A web snippet for frontend navigation registration.

Dependency graph

Only api-gateway declares a hard dependency (requires: ["security-core"]). All other modules are independent.