From 4b4fcd3688b5c86948182795d0666b58a8984962 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 17 Mar 2026 00:48:04 +0000 Subject: [PATCH 1/2] docs: add Cursor Cloud specific instructions and fix dev server port - Add '## Cursor Cloud specific instructions' section to AGENTS.md with non-obvious gotchas for cloud agents (port 3742, .env setup, mock servers, test account seeding) - Fix incorrect dev server port in .cursor/CLOUD.md (3742, not 8787) Co-authored-by: Kent C. Dodds --- .cursor/CLOUD.md | 2 +- AGENTS.md | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.cursor/CLOUD.md b/.cursor/CLOUD.md index 2276096..a58c1b8 100644 --- a/.cursor/CLOUD.md +++ b/.cursor/CLOUD.md @@ -17,7 +17,7 @@ A full-stack web application starter built on Cloudflare Workers with Remix 3 ## Services -- **Dev server**: Runs at `localhost:8787` (Cloudflare Workers local) +- **Dev server**: Runs at `localhost:3742` (Cloudflare Workers local) - `bun run dev` starts both the client esbuild watcher and Wrangler worker server diff --git a/AGENTS.md b/AGENTS.md index d42758c..f71ac38 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,3 +26,22 @@ This file is intentionally brief. Detailed instructions live in focused docs: - [docs/architecture/request-lifecycle.md](./docs/architecture/request-lifecycle.md) - [docs/architecture/authentication.md](./docs/architecture/authentication.md) - [docs/architecture/data-storage.md](./docs/architecture/data-storage.md) + +## Cursor Cloud specific instructions + +See [.cursor/CLOUD.md](./.cursor/CLOUD.md) for the full quick-reference table. + +### Non-obvious gotchas + +- **Dev server port is 3742**, not 8787. The CLI (`cli.ts`) defaults to port + 3742 and auto-finds a free port in the range 3742-3751. +- **`.env` must exist** before running `bun run dev`. Copy `.env.example` to + `.env` and ensure `COOKIE_SECRET` is at least 32 characters (generate with + `openssl rand -hex 32`). +- **Mock servers auto-start**: `bun run dev` automatically starts mock Resend + (email) and mock AI workers. No external services or Docker needed. +- **Seed test account** before testing login flows: + `bun run migrate:local && bun tools/seed-test-data.ts --local` + (email: `kody@kcd.dev`, password: `kodylovesyou`). +- **No git hooks or pre-commit** checks are configured. Run `bun run validate` + manually before pushing. From 2d74ade5bffe6503cae1007a44f30755e30af2f5 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 17 Mar 2026 00:54:50 +0000 Subject: [PATCH 2/2] docs: add admin test account credentials (me@kentcdodds.com) Document the admin test account across all relevant files: - docs/agents/setup.md: add admin seed command and credentials - docs/getting-started.md: add admin credentials section - AGENTS.md: add admin account to cloud-specific instructions - .github/workflows/preview.yml: seed admin account in preview deploys Co-authored-by: Kent C. Dodds --- .github/workflows/preview.yml | 1 + AGENTS.md | 10 +++++++--- docs/agents/setup.md | 4 ++++ docs/getting-started.md | 17 ++++++++++++++--- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 2dd2461..be52db1 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -266,6 +266,7 @@ jobs: run: | set -euo pipefail bun tools/seed-test-data.ts --remote --config "$WRANGLER_CONFIG" --email kody@kcd.dev --password kodylovesyou + bun tools/seed-test-data.ts --remote --config "$WRANGLER_CONFIG" --email me@kentcdodds.com --password iliketwix - name: 🩺 Healthcheck (preview) shell: bash diff --git a/AGENTS.md b/AGENTS.md index f71ac38..1f488db 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,8 +40,12 @@ See [.cursor/CLOUD.md](./.cursor/CLOUD.md) for the full quick-reference table. `openssl rand -hex 32`). - **Mock servers auto-start**: `bun run dev` automatically starts mock Resend (email) and mock AI workers. No external services or Docker needed. -- **Seed test account** before testing login flows: - `bun run migrate:local && bun tools/seed-test-data.ts --local` - (email: `kody@kcd.dev`, password: `kodylovesyou`). +- **Seed test accounts** before testing login flows: + - Regular user: `bun run migrate:local && bun tools/seed-test-data.ts --local` + (email: `kody@kcd.dev`, password: `kodylovesyou`). + - Admin user: + `bun tools/seed-test-data.ts --local --email me@kentcdodds.com --password iliketwix` + (email: `me@kentcdodds.com`, password: `iliketwix`). Admin status is + determined by email match in `shared/admin.ts`. - **No git hooks or pre-commit** checks are configured. Run `bun run validate` manually before pushing. diff --git a/docs/agents/setup.md b/docs/agents/setup.md index ae44d7f..dd38ed1 100644 --- a/docs/agents/setup.md +++ b/docs/agents/setup.md @@ -66,6 +66,10 @@ Use this script to ensure a known test login exists in any deployed environment: - Default credentials: - email: `kody@kcd.dev` - password: `kodylovesyou` +- Admin account (has admin privileges via `shared/admin.ts`): + - `bun tools/seed-test-data.ts --local --email me@kentcdodds.com --password iliketwix` + - email: `me@kentcdodds.com` + - password: `iliketwix` - Override credentials when needed: - `bun tools/seed-test-data.ts --email --password ` - When changing DB schema/model definitions or migrations, review diff --git a/docs/getting-started.md b/docs/getting-started.md index 7a052fc..b634104 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -3,9 +3,9 @@ Use this guide to run `pea` locally and understand the minimum setup needed for development. -`pea` is the stakeholder simulation service used by the Epic Systems -Engineering Judgment Workshop. The separate workshop app owns the learner -experience; this repo owns the agent side of the system. +`pea` is the stakeholder simulation service used by the Epic Systems Engineering +Judgment Workshop. The separate workshop app owns the learner experience; this +repo owns the agent side of the system. ## Prerequisites @@ -72,6 +72,17 @@ Default test credentials: - Email: `kody@kcd.dev` - Password: `kodylovesyou` +Admin test credentials (seed separately): + +```bash +bun tools/seed-test-data.ts --local --email me@kentcdodds.com --password iliketwix +``` + +- Email: `me@kentcdodds.com` +- Password: `iliketwix` + +Admin status is determined by email match in `shared/admin.ts`. + ## Build Build the project: