Skip to content

Commit f606b7a

Browse files
authored
docs: add AGENTS.md with Cursor Cloud development environment instructions (#369)
1 parent 5023eb6 commit f606b7a

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# AGENTS.md
2+
3+
## Cursor Cloud specific instructions
4+
5+
### Project overview
6+
7+
OpenZeppelin UI Builder — a pnpm monorepo (Node ≥20.19.0, pnpm 10.28.2) containing a client-side React/Vite SPA that generates front-end UIs for smart contract interactions across multiple blockchain ecosystems (EVM, Stellar, Polkadot, Midnight, Solana). No backend, database, or external infrastructure is required.
8+
9+
Adapter packages (`@openzeppelin/adapter-*`) have been extracted to a separate repo: [openzeppelin-adapters](https://github.com/OpenZeppelin/openzeppelin-adapters). This repo consumes them as published npm packages. For local adapter development, clone the sibling repo and use `pnpm dev:adapters:local` (see `docs/LOCAL_DEVELOPMENT.md`).
10+
11+
### Services
12+
13+
| Service | Command | Port | Notes |
14+
|---|---|---|---|
15+
| Vite dev server | `pnpm dev` | 5173 | Main app; requires `pnpm build` first |
16+
17+
### Key commands
18+
19+
Refer to the `scripts` section of the root `package.json` and the README for the full list. Highlights:
20+
21+
- **Install**: `pnpm install`
22+
- **Build**: `pnpm build` (must run before `pnpm dev`)
23+
- **Dev server**: `pnpm dev` (opens at http://localhost:5173)
24+
- **Lint**: `pnpm lint`
25+
- **Test**: `pnpm test` (runs Vitest for the builder app + script tests)
26+
- **Format + lint fix**: `pnpm fix-all`
27+
- **Local adapter dev**: `pnpm dev:adapters:local` (requires sibling `../openzeppelin-adapters` clone)
28+
- **Local UI kit dev**: `pnpm dev:uikit:local` (requires sibling `../openzeppelin-ui` clone)
29+
30+
### Non-obvious caveats
31+
32+
- **Build before dev**: You must run `pnpm build` at least once before `pnpm dev` so the Vite dev server can resolve built outputs.
33+
- **Ignored build scripts warning**: `pnpm install` may show a warning about ignored build scripts (esbuild, protobufjs, etc.). This is expected and does not affect functionality.
34+
- **Husky hooks**: Pre-commit runs `pnpm fix-all` on staged files. Pre-push runs `pnpm fix-all` and `pnpm update-export-versions`. Set `CI=true` to skip the commit-msg hook if needed.
35+
- **API keys are optional**: The app runs fully without Etherscan, Routescan, or WalletConnect API keys. Block explorer ABI auto-fetch won't work without them, but manual ABI paste works fine.
36+
- **Contract ABI can be fetched from Sourcify**: Even without Etherscan API keys, the app can fetch ABIs from Sourcify for verified contracts.
37+
- **Adapter packages are external**: `packages/adapter-*` directories are excluded from the pnpm workspace (`pnpm-workspace.yaml`). Any leftover `packages/adapter-*` paths on disk are build artifacts, not workspace packages.

0 commit comments

Comments
 (0)