Configuration
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:
| Variable | Required | Description |
|---|---|---|
STRIPE_SECRET_KEY | Yes (backend) | Stripe API key for billing management. |
STRIPE_WEBHOOK_SECRET | Yes (backend) | Stripe webhook signing secret. |
BETTER_AUTH_SECRET | Yes (backend) | Better Auth session secret. |
NUXT_PUBLIC_API_BASE | No | Override 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:
| Option | Type | Default | Description |
|---|---|---|---|
showToast | boolean | true | When true, failed requests show a toast notification automatically. Pass false to handle errors manually. |
Dashboard refresh interval can be passed directly to useXAdminDashboard:
| Option | Type | Default | Description |
|---|---|---|---|
refreshInterval | number | — | Polling 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.
useXAdminAuditLog
Queries the system-wide audit log by user or resource and exports log data to CSV or other formats.
nuxt-x-marketing
Nuxt layer with 38+ marketing components — hero, features, pricing, testimonials, blog, affiliate, cookie/GDPR, and a full CSS design system. Zero required props on all components.
