# --- Server --- PORT=5000 # --- Database: sqlite (default) or mariadb --- DB_TYPE=sqlite # SQLite file (used when DB_TYPE=sqlite) DATABASE_PATH=./data/health.db # MariaDB (used when DB_TYPE=mariadb) — runs on the NAS # MARIADB_SOCKET=/run/mysqld/mysqld10.sock # MARIADB_HOST=127.0.0.1 # MARIADB_PORT=3306 # MARIADB_USER=root # MARIADB_PASSWORD=your_nas_mariadb_root_password # MARIADB_DATABASE=garmin_health_lab # --- Auth --- # CHANGE THIS in production! Used to sign JWTs (7-day expiry by default). JWT_SECRET=dev_secret_change_me JWT_EXPIRY_DAYS=7 # --- CORS (comma-separated allowed front-end origins) --- CORS_ORIGIN=http://localhost:3000,http://localhost:5173 # --- AI models (text-only, large context) --- # Put REAL keys in backend/.env — that file is gitignored. Never commit keys. # Any model whose key is absent is skipped automatically. # Google AI Studio -> the "gemini-flash" model id GEMINI_API_KEY= # NVIDIA NIM (OpenAI-compatible) -> "llama-70b", "qwen-72b", "deepseek-r1" NVIDIA_API_KEY= # NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1 # Preference order. The first configured model answers; if it fails or times # out, the next one is tried automatically. AI_MODEL_CHAIN=gemini-flash,llama-70b,qwen-72b # Max days of history sent to the model (CSV-encoded, ~4 chars/day). AI_DAY_BUDGET=365 AI_TIMEOUT_SECONDS=45