-
Notifications
You must be signed in to change notification settings - Fork 27
docs: add Cursor Cloud dev environment setup notes #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ephraimduncan
wants to merge
1
commit into
main
Choose a base branch
from
cursor/setup-dev-environment-5f2d
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # AGENTS.md | ||
|
|
||
| ## Cursor Cloud specific instructions | ||
|
|
||
| Weekday is a single-product Bun + Turborepo monorepo: a Next.js 16 web app | ||
| (`apps/web`, the only runnable service, on port 3000) backed by PostgreSQL via | ||
| Drizzle ORM, tRPC, and Better Auth. Packages under `packages/*` (`api`, `auth`, | ||
| `db`, `env`, `google-calendar`, `lib`) are libraries consumed by the web app. | ||
|
|
||
| Standard commands live in the root `package.json` and `readme.md`; prefer those. | ||
| The notes below are only the non-obvious caveats for this environment. | ||
|
|
||
| ### Services | ||
|
|
||
| - PostgreSQL must be running on port **5433** (not the default 5432) to match | ||
| `DATABASE_URL` in `.env` and `docker-compose.yml`. Docker is not available | ||
| here; Postgres 16 is installed as a system cluster instead. Start it with | ||
| `sudo pg_ctlcluster 16 main start` (the cluster is preconfigured for port 5433 | ||
| and the `postgres` user password is `password`). It does not auto-start on | ||
| boot. | ||
| - Run only the web app with `bun run dev:next` (filters to `@weekday/web`). | ||
| Plain `bun run dev` also works but only `@weekday/web` has a `dev` task. | ||
|
|
||
| ### Environment file | ||
|
|
||
| - `.env` is gitignored and required (env schema in `packages/env/index.js` | ||
| validates it at startup). If it is missing, copy `.env.example` to `.env` and | ||
| set: `DATABASE_URL=postgresql://postgres:password@localhost:5433/postgres`, | ||
| a generated `BETTER_AUTH_SECRET` (`openssl rand -base64 32`), and | ||
| `BETTER_AUTH_URL=http://localhost:3000`. `BETTER_AUTH_GOOGLE_ID`, | ||
| `BETTER_AUTH_GOOGLE_SECRET`, and `AI_GATEWAY_API_KEY` are required by the | ||
| schema (non-empty), so use placeholders to boot; real values are only needed | ||
| for actual Google login / AI features. | ||
| - After `.env` exists and Postgres is up, run `bun run db:push` to sync the | ||
| Drizzle schema (creates the `weekday_*` tables). This is not part of the | ||
| startup update script. | ||
|
|
||
| ### Auth caveat (login is Google-only) | ||
|
|
||
| - The only sign-in method is Google OAuth (`/login` -> "Login with Google"). | ||
| Completing a real login requires valid `BETTER_AUTH_GOOGLE_ID` / | ||
| `BETTER_AUTH_GOOGLE_SECRET` from a Google Cloud OAuth client whose redirect | ||
| URI is `http://localhost:3000/api/auth/callback/google`, plus a Google | ||
| account. With placeholder credentials the app boots and all public routes and | ||
| the auth API work (the sign-in endpoint generates a real Google OAuth URL and | ||
| writes state to the DB), but the OAuth round-trip cannot complete. | ||
|
|
||
| ### Lint | ||
|
|
||
| - `turbo lint` / root `bun run lint` fails: `turbo.json` defines no `lint` task. | ||
| Run lint per package instead (e.g. `cd apps/web && bun run lint`). | ||
| - On this commit `apps/web` ESLint itself throws | ||
| `Converting circular structure to JSON` — a known incompatibility between | ||
| `eslint-config-next@16` and the `FlatCompat` layer, unrelated to environment | ||
| setup. | ||
|
|
||
| ### Tests | ||
|
|
||
| - There are no automated test scripts in this repo. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cursor specific?