- Add PostgreSQL database schema (users, subscriptions, tenants, sessions) - Implement authentication service with Argon2id password hashing - Add JWT-based session management with access/refresh tokens - Create REST API routes (auth, agent, usage, billing) - Add encryption utilities (AES-256-GCM) and Vault integration - Set up Docker Compose development environment - Add Hono-based API server with middleware This establishes the foundation for transforming moltbot into a multi-tenant SaaS platform with secure authentication and per-tenant encryption. https://claude.ai/code/session_01UzVUSnxfEecZE8Yes3Zqw9
54 lines
1.2 KiB
Plaintext
54 lines
1.2 KiB
Plaintext
# Moltbot SaaS Configuration
|
|
# Copy this file to .env and fill in your values
|
|
|
|
# Server
|
|
NODE_ENV=development
|
|
PORT=3000
|
|
HOST=0.0.0.0
|
|
|
|
# Database
|
|
DATABASE_URL=postgresql://moltbot:moltbot_dev_password@localhost:5432/moltbot_saas
|
|
|
|
# Redis (optional in development)
|
|
REDIS_URL=redis://localhost:6379
|
|
|
|
# JWT Secrets (generate with: openssl rand -base64 32)
|
|
JWT_ACCESS_SECRET=your-access-secret-minimum-32-characters-long
|
|
JWT_REFRESH_SECRET=your-refresh-secret-minimum-32-characters-long
|
|
|
|
# JWT Expiry
|
|
JWT_ACCESS_EXPIRY=15m
|
|
JWT_REFRESH_EXPIRY=7d
|
|
|
|
# Encryption (generate with: openssl rand -base64 32)
|
|
ENCRYPTION_KEY=your-encryption-key-minimum-32-characters
|
|
|
|
# Vault (optional in development)
|
|
VAULT_ADDR=http://localhost:8200
|
|
VAULT_TOKEN=dev-root-token
|
|
|
|
# Stripe (optional)
|
|
STRIPE_SECRET_KEY=sk_test_...
|
|
STRIPE_WEBHOOK_SECRET=whsec_...
|
|
|
|
# Kubernetes (for orchestration)
|
|
KUBERNETES_NAMESPACE=moltbot-tenants
|
|
KUBERNETES_IN_CLUSTER=false
|
|
|
|
# Email (optional)
|
|
SMTP_HOST=smtp.example.com
|
|
SMTP_PORT=587
|
|
SMTP_USER=noreply@example.com
|
|
SMTP_PASS=your-smtp-password
|
|
SMTP_FROM=noreply@example.com
|
|
|
|
# Frontend URL
|
|
FRONTEND_URL=http://localhost:5173
|
|
|
|
# Rate Limiting
|
|
RATE_LIMIT_WINDOW_MS=60000
|
|
RATE_LIMIT_MAX_REQUESTS=100
|
|
|
|
# Logging
|
|
LOG_LEVEL=debug
|