+++ title = "Create .env.example documenting DATABASE_URL and all local dev environment variables" priority = 5 status = "done" ticket_type = "task" dependencies = ["33ed29"] +++ TRIAGE 33ed29 resolved the local dev database strategy: rusqlite with a local SQLite file. The only environment variable required for local development is `DATABASE_URL` (optional — defaults to `./quotesdb.sqlite`). No Turso, no wrangler, no Cloudflare account needed locally. A `.env.example` file in the project root serves as self-documenting reference for contributors. The `.env` file itself is gitignored (never committed). `.env.example` is committed and documents all variables with their defaults and a brief description. Create `quotesdb/.env.example` with the following content: ```sh # quotesdb local development environment variables # Copy to .env and customise. The .env file is gitignored and must never be committed. # # All variables below have sensible defaults for local development and are OPTIONAL. # Path to the local SQLite database file used by `cargo run` (native API server). # The file is created automatically on first run; migrations run on startup. # In production this variable is unused — the Workers runtime uses the D1 binding. DATABASE_URL=./quotesdb.sqlite ``` Also ensure `.gitignore` in the `quotesdb/` root has an entry for `.env`: ```gitignore .env ``` - TRIAGE 33ed29: rusqlite + local SQLite file. `DATABASE_URL` is the only required env var. - No Cloudflare account, no wrangler, no Turso credentials needed for local dev. - `.env.example` must be committed to the repo. `.env` must be gitignored. - Only document variables that are actually used by the codebase (see ticket 6e829e / 00aff0 for where DATABASE_URL is read). - Do not add placeholder values for production secrets — `.env.example` is for local dev only. - If production-only secrets (e.g., Cloudflare API tokens for infra) are identified later, add them in a separate PR with appropriate comments. Verify `.env.example` is tracked and `.env` is gitignored: ```sh git status # .env.example should appear as a new untracked file echo "test" > .env git status # .env must NOT appear (should be ignored) rm .env ``` `chore(quotesdb): add .env.example documenting DATABASE_URL for local dev`