Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,39 @@ npx opensrc <owner>/<repo> # GitHub repo (e.g., npx opensrc vercel/ai)
```

<!-- opensrc:end -->

## 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.
Loading