From 83b0a40d6c9d037eac0c0a2fd14df81cc05ec480 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 5 May 2026 19:46:22 +0000 Subject: [PATCH] docs: add Cursor Cloud specific instructions to AGENTS.md Co-authored-by: Augie --- AGENTS.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 5548ea1..874f75b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,3 +24,39 @@ npx opensrc / # GitHub repo (e.g., npx opensrc vercel/ai) ``` + +## Cursor Cloud specific instructions + +### Overview + +Whisp is a T3 Turbo monorepo with two apps: +- **`apps/nextjs`** — Next.js 15 backend API server (port 3000) +- **`apps/expo`** — React Native/Expo mobile app (requires physical device or emulator, not runnable in Cloud VM) + +### Running services + +- **Next.js dev server:** `bun dev:next` (runs Next.js with Turbopack on http://localhost:3000) +- The homepage (`/`) requires a real Turso database connection; it will 500 with placeholder credentials. +- The health endpoint (`/api/health`) works without any external services. + +### Code quality commands + +All commands are run from the workspace root: +- `bun lint` — oxlint (not ESLint) +- `bun lint:ws` — workspace lint via sherif +- `bun format` — oxfmt format check (`bun format:fix` to auto-fix) +- `bun typecheck` — TypeScript checking across all packages via Turborepo + +### Environment setup + +- Requires Node.js >= 22.19.0 and Bun 1.2.23 (see `package.json#packageManager`) +- Copy `.env.example` to `.env` and populate values (see `.env.example` for required keys) +- Required env vars for the Next.js server: `DATABASE_URL`, `DATABASE_TOKEN`, `AUTH_DISCORD_ID`, `AUTH_DISCORD_SECRET`, `AUTH_SECRET`, `DISCORD_BOT_TOKEN`, `UPSTASH_REDIS_REST_URL`, `UPSTASH_REDIS_REST_TOKEN` +- Env validation is skipped when `CI=true` is set (useful for lint/typecheck-only workflows) + +### Gotchas + +- The linter/formatter is **oxlint/oxfmt** (not ESLint/Prettier). The README references ESLint/Prettier but those have been replaced. +- The `postinstall` script runs `bun lint:ws` (sherif) automatically after `bun install`. +- The Expo app cannot be tested in a headless Cloud VM environment — focus on the Next.js backend for server-side testing. +- `bun dev` starts both Next.js and Expo simultaneously; use `bun dev:next` to start only the backend.