Configuration Guide
platformkit uses YAML configuration with environment variable overrides.
Configuration File
The main configuration file is config.yaml in your application root:
app:
name: "My SaaS"
port: 3000
environment: development
database:
host: localhost
port: 5432
name: completesaas
user: postgres
password: postgres
ssl_mode: disable
redis:
host: localhost
port: 6379
nats:
url: nats://localhost:4222
auth:
jwt_secret: your-secret-key
token_expiry: 24h
security:
cors:
allowed_origins:
- http://localhost:8080
csrf:
enabled: true
rate_limit:
requests_per_second: 100
Environment Variables
Every config key can be overridden with environment variables using the PLATFORMKIT_ prefix:
PLATFORMKIT_APP_PORT=8080
PLATFORMKIT_DATABASE_HOST=db.example.com
PLATFORMKIT_AUTH_JWT_SECRET=production-secret
Module Configuration
Individual modules can be configured in the modules section:
modules:
auth_management:
providers: [email, google]
session_timeout: 30m
billing_management:
provider: stripe
currency: EUR
content_management:
enable_rss: true
markdown_unsafe: false
Per-Environment Files
Use environment-specific config files:
config.yaml— defaultsconfig.dev.yaml— development overridesconfig.local.yaml— local machine overrides (gitignored)config.prod.yaml— production settings
Files are merged in order, with later files taking precedence.