Some checks failed
Deploy / deploy (push) Has been cancelled
Full-stack web application for Telegram management - Frontend: Vue 3 + Vben Admin - Backend: NestJS - Features: User management, group broadcast, statistics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
94 lines
2.1 KiB
JavaScript
94 lines
2.1 KiB
JavaScript
import dotenv from 'dotenv';
|
|
|
|
dotenv.config();
|
|
|
|
export const config = {
|
|
env: process.env.NODE_ENV || 'development',
|
|
port: process.env.PORT || 3010,
|
|
|
|
mongodb: {
|
|
uri: process.env.MONGODB_URI || 'mongodb://localhost:27017/billing'
|
|
},
|
|
|
|
stripe: {
|
|
secretKey: process.env.STRIPE_SECRET_KEY || 'sk_test_...',
|
|
publishableKey: process.env.STRIPE_PUBLISHABLE_KEY || 'pk_test_...',
|
|
webhookSecret: process.env.STRIPE_WEBHOOK_SECRET || 'whsec_...'
|
|
},
|
|
|
|
jwt: {
|
|
secret: process.env.JWT_SECRET || 'your-secret-key',
|
|
expiresIn: '7d'
|
|
},
|
|
|
|
redis: {
|
|
url: process.env.REDIS_URL || 'redis://localhost:6379'
|
|
},
|
|
|
|
email: {
|
|
provider: process.env.EMAIL_PROVIDER || 'sendgrid',
|
|
apiKey: process.env.EMAIL_API_KEY || '',
|
|
from: process.env.EMAIL_FROM || 'billing@company.com'
|
|
},
|
|
|
|
cors: {
|
|
origin: process.env.CORS_ORIGIN?.split(',') || ['http://localhost:8080'],
|
|
credentials: true
|
|
},
|
|
|
|
rateLimit: {
|
|
windowMs: 15 * 60 * 1000, // 15 minutes
|
|
max: 100 // limit each IP to 100 requests per windowMs
|
|
},
|
|
|
|
billing: {
|
|
currency: 'USD',
|
|
taxRate: 0, // Default tax rate percentage
|
|
trialDays: 14,
|
|
gracePeriodDays: 7,
|
|
dunningAttempts: 3,
|
|
dunningIntervalDays: 3
|
|
},
|
|
|
|
plans: {
|
|
free: {
|
|
name: 'Free',
|
|
price: 0,
|
|
features: {
|
|
users: 5,
|
|
campaigns: 10,
|
|
messagesPerMonth: 1000
|
|
}
|
|
},
|
|
starter: {
|
|
name: 'Starter',
|
|
price: 29,
|
|
stripePriceId: 'price_starter_monthly',
|
|
features: {
|
|
users: 20,
|
|
campaigns: 50,
|
|
messagesPerMonth: 10000
|
|
}
|
|
},
|
|
professional: {
|
|
name: 'Professional',
|
|
price: 99,
|
|
stripePriceId: 'price_professional_monthly',
|
|
features: {
|
|
users: 100,
|
|
campaigns: 'unlimited',
|
|
messagesPerMonth: 100000
|
|
}
|
|
},
|
|
enterprise: {
|
|
name: 'Enterprise',
|
|
price: 299,
|
|
stripePriceId: 'price_enterprise_monthly',
|
|
features: {
|
|
users: 'unlimited',
|
|
campaigns: 'unlimited',
|
|
messagesPerMonth: 'unlimited'
|
|
}
|
|
}
|
|
}
|
|
}; |