Sistine Docs

Customization

How to customize pricing, AI settings, and more.

Modify Pricing Plans

Edit constants/billing.ts:

starter_monthly: {
  priceCents: 2900,               // Minimum currency units (integer)
  creditsPerCycle: 1000,          // Credits granted per billing cycle
  productIds: {
    dodo: "pdt_xxx",              // Product ID at Dodo
    waffo: "PROD_xxx",            // Product ID at Waffo
  },
  grantSchedule: { mode: "per_cycle" },
}

Two rules that are easy to get wrong:

  • priceCents is minimum currency units, not dollars. USD 29.00 → 2900. Currencies differ in decimals (JPY/KRW have none, KWD has 3), so never write price * 100 anywhere — use fromMinorUnits() from lib/payments/money.ts.
  • The price here is the only source of truth. It is never read back from the provider, and the provider price is only used for reconciliation. Changing it in only one place is how "page says $29, charge says $99" happens.

After editing, run pnpm doctor:online — it will tell you if a product ID does not exist at the provider.

Modify Credit Costs

Edit the cost constants:

FeatureFileVariable
Chatlib/credits.tsCHAT_CREDIT_COST
Imageapp/api/image/generate/route.tsInline constant
Videoapp/api/video/generate/route.tsInline constant

Replace AI Provider

To switch from Volcano Engine to OpenAI:

  1. Install the OpenAI SDK: pnpm add openai
  2. Replace files in lib/volcano-engine/ with OpenAI equivalents
  3. Update environment variables
  4. Keep the same credit deduction pattern in API routes

Add a New Language

  1. Copy messages/en.json to messages/XX.json (new locale)
  2. Translate all strings
  3. Add locale to i18n.config.ts:
export const locales = ['en', 'zh', 'XX'] as const;
  1. Update proxy.ts and lib/i18n.ts

Customize Theme

Colors are defined in app/globals.css using CSS custom properties:

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 3.9%;
  --primary: 0 0% 9%;
  /* ... */
}

Dark mode variables are in the .dark class.

Add New Protected Pages

  1. Create a new page in app/[locale]/(protected)/your-page/page.tsx
  2. It's automatically protected by the layout's session check
  3. Add navigation in features/navigation/config.ts

On this page