Commit b204386
authored
Set up Cursor Cloud dev environment (native backend + frontend + Postgres/Redis) (#18)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Summary
Sets up a full local development environment for DeepSQL (DBA Agent) in
the Cursor Cloud VM and documents the non-obvious caveats for future
agents. No application code was changed — only `AGENTS.md` gained a `##
Cursor Cloud specific instructions` section.
## Environment
Runs the stack **natively (no Docker)**:
- **Java 25** (Temurin) — required by `backend/pom.xml`
(`java.version=25`); set as default `java`/`javac` and `JAVA_HOME`.
- **PostgreSQL 16** + `pgvector` + `pg_stat_statements` — vault DB
`dba_agent` (port 5432), plus a demo target DB `demo_shop` with sample
data.
- **Redis** — cache on port 6379.
- **Backend** — `bash scripts/start-backend.sh` (`./mvnw
spring-boot:run`), Jetty on `:8080/api`.
- **Frontend** — `npm run dev` (Vite on `:3000`, proxies `/api` → 8080).
The startup **update script** is just `npm install` (system deps live in
the VM snapshot). Durable startup/run caveats are captured in
`AGENTS.md`.
## Verified
| Service | Command | Result |
|---|---|---|
| Backend | `bash scripts/start-backend.sh` | Started,
`/api/actuator/health` = `UP` (db, redis, dbScheduler all UP) |
| Frontend | `npm run dev` | Vite serving on `:3000` (HTTP 200) |
| Lint | `npm run lint` | Runs (pre-existing warnings/errors are the
repo baseline) |
| Tests | `./mvnw test -Dtest=ApiSmokeTest` | 3 tests, 0 failures |
## Hello-world
Registered a database connection to the local `demo_shop` DB through the
web UI and browsed its schema, exercising the credential vault,
`ConnectionService`, and schema introspection end to end.
## Key caveats documented in AGENTS.md
- `.env` is `source`d under `set -e` — dotted property keys abort the
script; use UPPERCASE Spring env names.
- `ENCRYPTION_KEYS` (not just `ENCRYPTION_KEY`) must be set or the
`EncryptionService` bean fails with a circular placeholder reference.
- `SECURITY_AUTH_ENABLED=false` enables the dev auto-admin bypass.
- `scheduled_tasks` table + extensions come from
`docker/postgres/init/*.sql` (applied by hand in the native setup).
- Stop the running backend before context-booting tests to avoid
`ddl-auto` deadlocks.
> Please merge the AGENTS.md updates so future agents remember these
setup caveats next time.
<!-- CURSOR_AGENT_PR_BODY_END -->
<div><a
href="https://cursor.com/agents/bc-8ce91e70-c67b-48c6-84b3-05bb9d06231a?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-8ce91e70-c67b-48c6-84b3-05bb9d06231a&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
---------1 parent 8498319 commit b204386
1 file changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
0 commit comments