Customization
How to customize pricing, AI settings, and more.
Modify Pricing Plans
Edit constants/billing.ts:
starter_monthly: {
priceCents: 2900, // Change price
creditsPerCycle: 1000, // Change credit amount
creemPriceId: "prod_xxx" // Match your Creem product ID
}Modify Credit Costs
Edit the cost constants:
| Feature | File | Variable |
|---|---|---|
| Chat | lib/credits.ts | CHAT_CREDIT_COST |
| Image | app/api/image/generate/route.ts | Inline constant |
| Video | app/api/video/generate/route.ts | Inline constant |
Replace AI Provider
To switch from Volcano Engine to OpenAI:
- Install the OpenAI SDK:
pnpm add openai - Replace files in
lib/volcano-engine/with OpenAI equivalents - Update environment variables
- Keep the same credit deduction pattern in API routes
Add a New Language
- Copy
messages/en.jsontomessages/XX.json(new locale) - Translate all strings
- Add locale to
i18n.config.ts:
export const locales = ['en', 'zh', 'XX'] as const;- Update
proxy.tsandlib/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
- Create a new page in
app/[locale]/(protected)/your-page/page.tsx - It's automatically protected by the layout's session check
- Add navigation in
features/navigation/config.ts