AIAI SaaS

Configuration

One config file, one env file — that's most of the customization.

Site config

src/config/website.ts is the single place for branding and pricing:

  • Site name, description, social links
  • Plan list with monthly/yearly prices and bundled credits
  • Credit packages (up to 4 tiers)
  • Feature flags: credits, register gift, email verification, analytics

Change a number, restart dev server, done. Stripe Price IDs come from environment variables, so display prices and live prices stay in sync manually.

Environment variables

Every variable is documented in .env.example. The rules:

  • Required in production: DATABASE_URL, BETTER_AUTH_SECRET
  • Public vars (NEXT_PUBLIC_*) are baked at build time — redeploy after changing them
  • Optional keys (Stripe, Resend, R2, Turnstile, OpenAI) enable features when present

i18n

The site ships bilingual (English/Chinese). All UI strings live in src/messages/{en,zh}.json. Blog and docs content live in content/{blog,docs}/{en,zh}/ as MDX files with frontmatter.

Theming

Colors, radius, and fonts are CSS variables in src/app/globals.css (Tailwind v4 tokens). Swap the palette once and both light and dark modes follow.