You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vibed/quotesdb/.beans/quotesdb-q8u2--create-envex...

2.5 KiB

title status type priority created_at updated_at blocked_by
Create .env.example documenting DATABASE_URL and all local dev environment variables completed task normal 2026-03-10T23:32:09Z 2026-03-10T23:32:16Z
quotesdb-td4l
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:
# 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:

.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:
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`