All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 12s
- Sidebar: dynamic brand-accent colors, brainstorm section restyled - AI chat general: popup panel with expand/collapse, hides when contextual AI open - AI chat contextual: tabs reordered (Actions first), X close button, height fix - Settings: all tabs restyled, 6 new color presets (sage, terracotta, iron, etc.) - Global color cleanup: emerald/orange hardcoded → brand-accent dynamic - Brainstorm page: orange → brand-accent throughout - PageEntry animation component added to key pages - Floating AI button: bg-brand-accent instead of hardcoded black - i18n: all 15 locales updated with new AI/billing keys - Billing: freemium quota tracking, BYOK, stripe subscription scaffolding - Admin: integrated into new design - AGENTS.md + CLAUDE.md project rules added
19 lines
543 B
TypeScript
19 lines
543 B
TypeScript
import Stripe from 'stripe';
|
|
|
|
if (!process.env.STRIPE_SECRET_KEY) {
|
|
if (process.env.NODE_ENV === 'production') {
|
|
throw new Error('STRIPE_SECRET_KEY is required in production');
|
|
}
|
|
}
|
|
|
|
export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? 'sk_test_placeholder', {
|
|
apiVersion: '2026-04-22.dahlia',
|
|
typescript: true,
|
|
});
|
|
|
|
export function getPublishableKey(): string {
|
|
const key = process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY;
|
|
if (!key) throw new Error('NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY is not set');
|
|
return key;
|
|
}
|