From ac7764c0d72c28591084d79c3c67a5ac68ba92e4 Mon Sep 17 00:00:00 2001 From: Woohyuck Jeong Date: Tue, 23 Jun 2026 10:33:50 +0900 Subject: [PATCH] fix: correct stale .env.example references to make dev auto-create flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The repo referenced a `.env.example` file that does not exist. The README was refactored so `make dev` auto-creates a local `.env` (the validate-dev-env target), but six stale references remained — in CLAUDE.md, backend/CLAUDE.md, backend/README.md, and three Makefile error messages — telling users to copy a nonexistent template. A new contributor following the setup, or running `make convex-push`/`make seed-public-datasets` standalone, hits a misleading instruction. Point all references at the actual auto-create flow instead. --- CLAUDE.md | 2 +- backend/CLAUDE.md | 2 +- backend/README.md | 5 ++--- makefiles/Makefile | 6 +++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index b9b15bd..c2c7882 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ Frontend on :3500, backend on :3501, Mastra Studio on :4111, Convex dashboard on ## Setup -1. Copy `.env.example` to `.env` and fill in your keys: +1. `make dev` auto-creates a local `.env` on first run (no template to copy). Fill in your keys there: - `TINYFISH_API_KEY` — from https://agent.tinyfish.ai/api-keys?utm_source=github&utm_medium=organic&utm_campaign=bigset-developer-2026q2 - `OPENROUTER_API_KEY` — from https://openrouter.ai/settings/keys - `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` — from Clerk API Keys diff --git a/backend/CLAUDE.md b/backend/CLAUDE.md index 53218a0..49ccf72 100644 --- a/backend/CLAUDE.md +++ b/backend/CLAUDE.md @@ -44,7 +44,7 @@ Writes to Convex via `ConvexHttpClient` in `src/convex.ts`. Import `{ convex, ap ## Environment -Required env vars (see `.env.example`): +Required env vars (loaded from the root `.env`; see `src/env.ts`): - `CONVEX_URL` — Convex instance URL - `CONVEX_SELF_HOSTED_ADMIN_KEY` — for system-level Convex writes (internal mutations) - `CLERK_SECRET_KEY`, `CLERK_PUBLISHABLE_KEY` — for JWT verification diff --git a/backend/README.md b/backend/README.md index 2507f84..1ac567c 100644 --- a/backend/README.md +++ b/backend/README.md @@ -5,9 +5,8 @@ Fastify server that handles auth, database, and talks to TinyFish APIs. ## Running ```bash -# From the repo root: -cp .env.example .env -# Fill in the root .env file. +# From the repo root: `make dev` auto-creates a local .env on first run. +# Fill in the root .env file (no template to copy). cd backend npm install npm run dev diff --git a/makefiles/Makefile b/makefiles/Makefile index cd7ef5e..0325ff1 100644 --- a/makefiles/Makefile +++ b/makefiles/Makefile @@ -188,7 +188,7 @@ ensure-admin-key: fi convex-env: - @test -f .env || { echo "Error: .env not found. Run: cp .env.example .env"; exit 1; } + @test -f .env || { echo "Error: .env not found. Run: make dev (it auto-creates a local .env)"; exit 1; } @prod="$$(grep '^PROD=' .env | cut -d= -f2-)"; \ admin_key="$$(grep '^CONVEX_SELF_HOSTED_ADMIN_KEY=' .env | cut -d= -f2-)"; \ if [[ -z "$$admin_key" ]]; then \ @@ -212,7 +212,7 @@ convex-env: 'npx convex env set CLERK_JWT_ISSUER_DOMAIN "$$CLERK_JWT_ISSUER_DOMAIN" --url $(CONVEX_CLI_URL) --admin-key "$$CONVEX_SELF_HOSTED_ADMIN_KEY"' convex-push: - @test -f .env || { echo "Error: .env not found. Run: cp .env.example .env"; exit 1; } + @test -f .env || { echo "Error: .env not found. Run: make dev (it auto-creates a local .env)"; exit 1; } @admin_key="$$(grep '^CONVEX_SELF_HOSTED_ADMIN_KEY=' .env | cut -d= -f2-)"; \ if [[ -z "$$admin_key" ]]; then \ echo "Error: CONVEX_SELF_HOSTED_ADMIN_KEY is missing in root .env"; \ @@ -223,7 +223,7 @@ convex-push: 'npx convex deploy --url $(CONVEX_CLI_URL) --admin-key "$$CONVEX_SELF_HOSTED_ADMIN_KEY"' seed-public-datasets: - @test -f .env || { echo "Error: .env not found. Run: cp .env.example .env"; exit 1; } + @test -f .env || { echo "Error: .env not found. Run: make dev (it auto-creates a local .env)"; exit 1; } @cd frontend && node ../scripts/with-root-env.mjs npx convex run publicSeed:seedPublicDatasets down: stop-local-keychain