All configuration (including secrets) now lives in a single file: bin/config.yaml. The separate .env file has been eliminated. Changes: - config.go: Added SMTPSettings struct + AI.APIKey to Config; removed godotenv import, Environment struct, and all os.Getenv() calls - config.yaml: Added smtp section (host/port/username/password) and ai.api_key field with placeholder values - main.go: Reads SMTP and API key from cfg instead of env - smtp.go: Changed Port field from string to int - otp_test.go: Updated Port values to int - .env.example: Deleted (all config is in config.yaml) - .gitignore: Removed .env.example; kept .env for safety - go.mod/go.sum: Removed github.com/joho/godotenv dependency - install.sh: No longer creates .env or uses EnvironmentFile; warns about placeholder values in config.yaml instead
63 lines
No EOL
1.4 KiB
YAML
63 lines
No EOL
1.4 KiB
YAML
# inBOXER Configuration
|
|
# ======================
|
|
# Single configuration file — all settings including secrets live here.
|
|
# Replace placeholder values before deploying to production.
|
|
|
|
# Server configuration
|
|
server:
|
|
port: 8080
|
|
host: "0.0.0.0"
|
|
session_secret: "change-me-in-production"
|
|
|
|
# Database configuration
|
|
database:
|
|
path: "bin/db.sqlite"
|
|
auto_migrate: true
|
|
|
|
# SMTP credentials for sending OTP login emails
|
|
smtp:
|
|
host: "your.smtp.host.example.com"
|
|
port: 587
|
|
username: "your-email@example.com"
|
|
password: "your-smtp-password"
|
|
|
|
# IMAP configuration (user-specific, stored encrypted in database)
|
|
imap_defaults:
|
|
host: "imap.example.com"
|
|
port: 993
|
|
tls: true
|
|
batch_size: 10
|
|
poll_interval_minutes: 5
|
|
|
|
# AI classification configuration
|
|
ai:
|
|
model: "deepseek-chat"
|
|
api_key: "your_deepseek_api_key_here"
|
|
max_tokens: 1000
|
|
temperature: 0.1
|
|
prompt_file: "bin/prompt.txt"
|
|
|
|
# Worker configuration
|
|
worker:
|
|
steady_state_batch_size: 10
|
|
steady_state_interval_minutes: 5
|
|
catch_up_batch_size: 50
|
|
catch_up_cooldown_seconds: 5
|
|
|
|
# Email folders (will be created if they don't exist)
|
|
folders:
|
|
important: "Important"
|
|
ecommerce: "eCommerce"
|
|
notifications: "Notifications"
|
|
finance: "Finance"
|
|
social: "Social"
|
|
other: "Other"
|
|
spam: "Spam"
|
|
|
|
# Logging
|
|
logging:
|
|
level: "info"
|
|
file: "bin/inboxer.log"
|
|
max_size_mb: 10
|
|
max_backups: 3
|
|
max_age_days: 30 |