X Enterprises

Configuration

app.config.ts and runtimeConfig reference for @xenterprises/nuxt-x-app-admin.

Configuration

How to configure this module via environment variables.

app.config.ts

nuxt-x-app-admin does not expose an app.config.ts schema. All behaviour is controlled by props passed to components and the backend API endpoints your server implements.

Runtime Config (Environment Variables)

This layer does not read env vars directly. The backend API it calls typically needs the following variables configured on the server:

VariableRequiredDescription
STRIPE_SECRET_KEYYes (backend)Stripe API key for billing management.
STRIPE_WEBHOOK_SECRETYes (backend)Stripe webhook signing secret.
BETTER_AUTH_SECRETYes (backend)Better Auth session secret.
NUXT_PUBLIC_API_BASENoOverride the API base URL the layer uses (default: /api).

nuxt.config.ts

// nuxt.config.ts
export default defineNuxtConfig({
  extends: [
    "nuxt-x-app-admin", // automatically includes nuxt-x-app
    "nuxt-x-auth",      // Better Auth for admin sessions
  ],
})

Composable Options

All composables accept a showToast option to control error notification behaviour:

OptionTypeDefaultDescription
showToastbooleantrueWhen true, failed requests show a toast notification automatically. Pass false to handle errors manually.

Dashboard refresh interval can be passed directly to useXAdminDashboard:

OptionTypeDefaultDescription
refreshIntervalnumberPolling interval in milliseconds for dashboard data.

AI Context

package: "@xenterprises/nuxt-x-app-admin"
config-key: null
use-when: >
  There is no app.config.ts key for this layer. Configure the backend env vars
  (STRIPE_SECRET_KEY, BETTER_AUTH_SECRET) and optionally NUXT_PUBLIC_API_BASE
  to point components at a non-default API base path.
Copyright © 2026