-
Notifications
You must be signed in to change notification settings - Fork 2
Add AGENTS.md with Cursor Cloud development environment instructions #407
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||
| # AGENTS.md | ||||||
|
|
||||||
| ## Cursor Cloud specific instructions | ||||||
|
|
||||||
| ### Overview | ||||||
|
|
||||||
| StormCom is a multi-tenant SaaS e-commerce platform built with Next.js 16 (App Router), React 19, TypeScript, Prisma (PostgreSQL), and Tailwind CSS v4 + shadcn/ui. | ||||||
|
|
||||||
| ### Required services | ||||||
|
|
||||||
| | Service | How to start | Port | | ||||||
| |---------|-------------|------| | ||||||
| | PostgreSQL 16 | `sudo docker compose up -d postgres` | 5432 | | ||||||
| | Next.js dev server | `npm run dev` | 3000 | | ||||||
|
|
||||||
| ### Environment files | ||||||
|
|
||||||
| - `.env.local` (and `.env` as a copy for Prisma CLI) must have at minimum: `DATABASE_URL`, `NEXTAUTH_URL`, `NEXTAUTH_SECRET`, `RESEND_API_KEY` (can be dummy value `re_dummy_key_for_build` for dev). | ||||||
| - Prisma CLI reads `.env` by default (not `.env.local`), so keep both files in sync or use `dotenv-cli`. | ||||||
|
|
||||||
| ### Database setup | ||||||
|
|
||||||
| After PostgreSQL is running: | ||||||
|
|
||||||
| ```bash | ||||||
| npx prisma migrate deploy # apply all migrations | ||||||
| npm run prisma:seed # seed demo data (131 entities) | ||||||
| ``` | ||||||
|
|
||||||
| ### Key commands | ||||||
|
|
||||||
| | Task | Command | | ||||||
| |------|---------| | ||||||
| | Lint | `npm run lint` | | ||||||
| | Type check | `npm run type-check` | | ||||||
| | Unit tests | `npm run test:run` | | ||||||
| | E2E tests | `npm run test:e2e` | | ||||||
| | Dev server | `npm run dev` | | ||||||
| | Prisma Studio | `npm run prisma:studio` | | ||||||
| | Prisma generate | `npm run prisma:generate` | | ||||||
|
|
||||||
| ### Test credentials (after seeding) | ||||||
|
|
||||||
| - Super Admin: `admin@stormcom.io` / `Admin@123456` | ||||||
| - Store Owner (TechBazar): `rafiq@techbazar.io` / `Owner@123456` | ||||||
| - Store Owner (GadgetZone): `farida@gadgetzone.io` / `Owner@123456` | ||||||
|
|
||||||
| ### Gotchas | ||||||
|
|
||||||
| - The Vitest run reports `playwright.config.test.ts` as a failed suite because it contains no Vitest tests — this is a known false positive and safe to ignore. | ||||||
|
||||||
| - The Vitest run reports `playwright.config.test.ts` as a failed suite because it contains no Vitest tests — this is a known false positive and safe to ignore. | |
| - If Vitest reports `playwright.config.test.ts` as a failed suite, update `vitest.config.ts` to exclude this file (for example via `test.exclude`) or rename/move the Playwright config so it no longer matches the `**/*.{test,spec}.{ts,tsx}` pattern, rather than ignoring the failure. |
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.
The database setup snippet uses
npx prisma migrate deployand then seeds, but it doesn’t mention generating the Prisma Client afterward. In a fresh environment (or ifpostinstallskipped becauseDATABASE_URLwasn’t set at install time), this can leave@prisma/clientmissing/out of date and cause runtime errors. Consider updating these steps to runnpm run prisma:generateafter migrations, or use an existing npm script that already combines migrate + generate (e.g.npm run prisma:migrate:dev:seed/npm run prisma:migrate:dev).