Skip to content

Commit dc14a03

Browse files
docs: add Cursor Cloud dev environment instructions for eShop
Co-authored-by: mattfromcursor <mattfromcursor@users.noreply.github.com>
1 parent fa9ac05 commit dc14a03

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,64 @@ Upstream: `https://github.com/dotnet/eShop`. Sync with `git fetch upstream && gi
4343
| Subagents | `.cursor/agents/` — eShop trio + `aspnet-reviewer` (upstream RoninForge), `dotnet-architect` (upstream dotnet-claude-kit) |
4444

4545
Presenter runbook: `../demo_scripts/presenter-guide.md` (sibling `nfl_temp` folder, not in this repo). Tag `demo-baseline` at repo root before workshops so `/reset-demo` works.
46+
47+
## Cursor Cloud specific instructions
48+
49+
### Prerequisites already on the VM
50+
51+
- .NET SDK **10.0.x** (see `global.json`)
52+
- Docker (start with `sudo service docker start`; if `docker ps` fails with permission denied, run `sudo chmod 666 /var/run/docker.sock` once per session)
53+
- Node.js/npm (Playwright E2E and Identity.API client-lib workaround)
54+
55+
### Restore / build gotchas
56+
57+
- **NuGet audit:** Intermittent TLS failures to `api.nuget.org` surface as `NU1900` and fail the build (`TreatWarningsAsErrors`). Use `-p:NuGetAudit=false` on restore/build until connectivity is stable.
58+
- **Identity.API libman:** `cdnjs` fetches during build can fail in this environment. `wwwroot/lib/` is gitignored. Either populate it once (see below) or build with `-p:LibraryRestore=False` after libs exist.
59+
60+
One-time Identity client libs via npm (when `wwwroot/lib` is missing):
61+
62+
```bash
63+
mkdir -p /tmp/libman-vendor && cd /tmp/libman-vendor && npm init -y && npm install jquery@3.6.3 bootstrap@5.2.3 jquery-validation@1.19.5 jquery-validation-unobtrusive@4.0.0
64+
ID_LIB=src/Identity.API/wwwroot/lib
65+
mkdir -p "$ID_LIB/jquery" "$ID_LIB/bootstrap/css" "$ID_LIB/bootstrap/js" "$ID_LIB/jquery-validate" "$ID_LIB/jquery-validation-unobtrusive"
66+
cp node_modules/jquery/dist/jquery*.js "$ID_LIB/jquery/"
67+
cp node_modules/bootstrap/dist/css/bootstrap* "$ID_LIB/bootstrap/css/"
68+
cp node_modules/bootstrap/dist/js/bootstrap.bundle*.js "$ID_LIB/bootstrap/js/"
69+
cp node_modules/jquery-validation/dist/jquery.validate*.js "$ID_LIB/jquery-validate/"
70+
cp node_modules/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive*.js "$ID_LIB/jquery-validation-unobtrusive/"
71+
```
72+
73+
Standard build (demo slice):
74+
75+
```bash
76+
dotnet restore eShop.Web.slnf -p:NuGetAudit=false
77+
dotnet build eShop.Web.slnf -p:NuGetAudit=false -p:LibraryRestore=False
78+
```
79+
80+
### Run full stack
81+
82+
```bash
83+
export ESHOP_USE_HTTP_ENDPOINTS=1
84+
dotnet run --project src/eShop.AppHost/eShop.AppHost.csproj -p:NuGetAudit=false -p:LibraryRestore=False
85+
```
86+
87+
- **WebApp:** `http://localhost:5045` (with `ESHOP_USE_HTTP_ENDPOINTS=1`)
88+
- **Aspire dashboard:** URL printed at startup (HTTPS on `19888`)
89+
- Demo login: `bob` / `Pass123$`
90+
91+
Run AppHost in a **tmux** session for long-lived processes; first startup pulls Postgres/Redis/RabbitMQ images and can take 1–2 minutes.
92+
93+
### Tests
94+
95+
- Unit tests (project, not solution filter — `global.json` test runner expects a registered tool):
96+
97+
```bash
98+
dotnet test --project tests/Ordering.UnitTests/Ordering.UnitTests.csproj
99+
```
100+
101+
- Playwright E2E (reuse running AppHost when not in CI):
102+
103+
```bash
104+
npm ci && npx playwright install chromium
105+
ESHOP_USE_HTTP_ENDPOINTS=1 USERNAME1=bob PASSWORD='Pass123$' npx playwright test
106+
```

0 commit comments

Comments
 (0)