From 9c239e565b75f8b8f5bff55cc5d84dbe3ec1dd17 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Mon, 1 Jun 2026 23:21:21 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20update=20README=20=E2=80=94=20binary=20?= =?UTF-8?q?name,=20update=20process,=20config=20table,=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Binary name: receiptnext → app - Update: no sudo, adds backups, templates/static sync - Config table: added AI_MODEL, AI_BASE_URL, OPENAI_API_KEY - Structure: added backups/ directory - Security: .env is optional, not root-owned --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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 | ---