X Enterprises

Configuration

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

Configuration

app.config.ts

export default defineAppConfig({
  xAffiliate: {
    referralParam: 'ref',
    referralBaseUrl: 'https://yoursite.com',
    cookieName: 'x_affiliate_ref',
    cookieDays: 30,
    currency: 'USD',
    shareMessage: 'Check this out!',
    landing: {
      hero: {
        title: '',
        description: '',
        ctaLabel: '',
        highlightText: '',
        variant: 'gradient',   // 'gradient' | 'primary' | 'dark'
      },
      benefits: [],
    },
    signup: {
      title: 'Join Our Affiliate Program',
      subtitle: 'Earn commissions...',
      submitLabel: 'Apply Now',
      showWebsite: true,
      showCompany: false,
      showMessage: true,
    },
  },
})

Schema Reference

KeyTypeDefaultDescription
referralParamstring'ref'URL query parameter name used to detect referral codes.
referralBaseUrlstring''Base URL prepended when generating referral links.
cookieNamestring'x_affiliate_ref'Cookie name used to persist the referral code.
cookieDaysnumber30Referral cookie expiration in days.
currencystring'USD'Default ISO 4217 currency code for earnings formatting.
shareMessagestring'Check this out!'Default message pre-filled in social share dialogs.
landing.hero.titlestring''Landing page hero headline.
landing.hero.descriptionstring''Landing page hero subtitle.
landing.hero.ctaLabelstring''Landing page hero CTA button label.
landing.hero.highlightTextstring''Highlight badge text shown in the hero.
landing.hero.variant'gradient' | 'primary' | 'dark''gradient'Visual style of the XAFBanner hero.
landing.benefits{ icon, title, description }[]3 defaultsBenefits cards shown on the landing page.
signup.titlestring'Join Our Affiliate Program'Signup form title.
signup.subtitlestring'Earn commissions...'Signup form subtitle.
signup.submitLabelstring'Apply Now'Signup form submit button label.
signup.showWebsitebooleantrueShow website URL field in signup form.
signup.showCompanybooleanfalseShow company name field in signup form.
signup.showMessagebooleantrueShow promotion strategy textarea in signup form.

Runtime Config / Environment Variables

None required. All configuration is through app.config.ts.


AI Context

package: "@xenterprises/nuxt-x-affiliate"
config-key: xAffiliate
Copyright © 2026