diff --git a/README.md b/README.md index 4e907c9..2715b67 100644 --- a/README.md +++ b/README.md @@ -41,10 +41,10 @@ The installer will: ## 🔄 Updating ```bash -sudo /opt/receiptnext/install.sh -update +bash /opt/receiptnext/install.sh -update ``` -This pulls the latest code, rebuilds the binary, and restarts the service. +Update pulls the latest code, copies updated templates/static, rebuilds the binary, automatically backs up the database, and restarts the service. --- @@ -105,13 +105,16 @@ Configuration is via environment variables in `.env`. The install script builds | **AI Provider** | | | | | `AI_PROVIDER` | No | `gemini` | `gemini` or `openai` | | `GEMINI_API_KEY` | For Gemini | — | Google Gemini API key | +| `OPENAI_API_KEY` | For OpenAI | — | API key (omit for Ollama via OpenAI compat) | +| `AI_MODEL` | For OpenAI | `gpt-4o-mini` | Model name | +| `AI_BASE_URL` | For OpenAI | `https://api.openai.com/v1` | API endpoint | | **SMTP** | | | | | `SMTP_HOST` | See note | — | SMTP server hostname | | `SMTP_PORT` | See note | `587` | SMTP server port | | `SMTP_USER` | See note | — | SMTP username | | `SMTP_PASS` | See note | — | SMTP password | -> **Note:** SMTP is optional without it, OTP codes are logged to the server console for testing. Reports cannot be emailed without SMTP. +> **Note:** SMTP is optional — without it, OTP codes are logged to the server console for testing and reports cannot be emailed. --- @@ -180,8 +183,11 @@ Navigate to `http://YOUR_SERVER:8080` ``` /opt/receiptnext/ -├── receiptnext # Compiled binary -├── .env # Configuration +├── app # Compiled binary +├── .env # Configuration (optional) +├── backups/ # Automatic DB backups (from -update) +├── templates/ # Go HTML templates +├── static/ # CSS, icons, favicon, service worker ├── templates/ # Go HTML templates ├── static/ # CSS, icons, favicon, service worker │ ├── css/style.css @@ -244,7 +250,7 @@ SQLite, auto-created on first run — 4 tables: `users`, `auth_otps`, `events`, | Cookies | HTTP-only, SameSite=Lax, path-restricted | | SQL | Parameterized queries everywhere | | Uploads | Magic byte validation, max 10MB, UUID filenames | -| Config | `.env` file is `chmod 600` — readable only by root | +| Config | `.env` is optional — app runs with defaults if absent | ---