Skip to content

Config Options Reference

All options for simplicity-admin.config.ts. Pass these to defineConfig() or createAdmin().

  • Type: string
  • Default: none (required)
  • Description: PostgreSQL connection string.
database: 'postgres://user:password@localhost:5432/mydb'
  • Type: string
  • Default: 'public'
  • Description: The PostgreSQL schema to introspect for application tables.
  • Type: string
  • Default: '_simplicity'
  • Description: Schema name for SIMPLICITY-ADMIN internal tables (users, sessions, roles, audit log).
  • Type: number
  • Default: 3000
  • Description: Server port. Only used in standalone mode (not when embedded as middleware).
  • Type: string
  • Default: '/admin'
  • Description: URL base path for the admin UI and all API routes.
  • Type: boolean
  • Default: true
  • Description: Enable the GraphQL endpoint at {basePath}/graphql.
  • Type: boolean
  • Default: false
  • Description: Enable RESTful endpoints at {basePath}/api/{table} with OpenAPI spec.
  • Type: boolean
  • Default: true
  • Description: Enable the GraphiQL explorer at {basePath}/graphiql.
  • Type: string
  • Default: none (required)
  • Description: Secret key for signing and verifying JWTs. Use a strong random value in production.
  • Type: string
  • Default: '15m'
  • Description: Access token time-to-live. Accepts shorthand durations: '15m', '1h', '1d'.
  • Type: string
  • Default: '7d'
  • Description: Refresh token time-to-live.
  • Type: boolean
  • Default: false
  • Description: Enable multi-tenancy support.
  • Type: string
  • Default: 'header'
  • Description: How the tenant ID is resolved from incoming requests.
  • Type: string
  • Default: 'X-Tenant-ID'
  • Description: HTTP header name used for tenant resolution when tenancy.resolution is 'header'.
  • Type: object
  • Default: {}
  • Description: Custom provider overrides. Keys: database, api, auth, ui. Values must implement the corresponding provider interface from @mabulu-inc/simplicity-admin-core.
providers: {
auth: myCustomAuthProvider,
}
  • Type: Plugin[]
  • Default: []
  • Description: Array of plugin instances. Plugins execute lifecycle hooks in array order.
plugins: [requestLogger(), auditTrail()]