Skip to content

Configuration

SmartTable supports flexible configuration through environment variables and configuration files.

Basic Configuration

Application Configuration

Environment VariableDescriptionDefault Value
APP_ENVRunning environmentdevelopment
APP_PORTService port3000
APP_HOSTService host0.0.0.0
APP_SECRET_KEYApplication secret keyRequired

Database Configuration

Environment VariableDescriptionDefault Value
DATABASE_URLDatabase connection stringRequired
DATABASE_POOL_SIZEConnection pool size20

Example:

env
DATABASE_URL=postgresql://user:password@localhost:5432/smarttable

Cache Configuration

Environment VariableDescriptionDefault Value
REDIS_URLRedis connection addressOptional
CACHE_TTLCache expiration time (seconds)3600

Security Configuration

JWT Configuration

Environment VariableDescriptionDefault Value
JWT_ACCESS_TOKEN_EXPIRE_MINUTESAccess token expiration time30
JWT_REFRESH_TOKEN_EXPIRE_DAYSRefresh token expiration time7

Email Configuration

Environment VariableDescriptionDefault Value
SMTP_HOSTSMTP server addressOptional
SMTP_PORTSMTP port587
SMTP_USERSMTP usernameOptional
SMTP_PASSWORDSMTP passwordOptional

Advanced Configuration

File Storage

Environment VariableDescriptionDefault Value
STORAGE_TYPEStorage type (local/s3)local
STORAGE_LOCAL_PATHLocal storage path./uploads
S3_BUCKETS3 bucket nameOptional
S3_REGIONS3 regionOptional

Webhook Configuration

Environment VariableDescriptionDefault Value
WEBHOOK_TIMEOUTWebhook timeout (seconds)30
WEBHOOK_RETRY_COUNTWebhook retry count3

Released under the MIT License.