summaryrefslogtreecommitdiff
path: root/AGENTS.md
diff options
context:
space:
mode:
Diffstat (limited to 'AGENTS.md')
-rw-r--r--AGENTS.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/AGENTS.md b/AGENTS.md
index eedd586..2bbaf40 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -21,15 +21,17 @@ cd frontend && npm install
NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8001 npm run dev -- --hostname 127.0.0.1 --port 3001
# Tests + lint
-pytest
+backend/.venv/bin/pytest
cd frontend && npm run lint && npm run build
```
-## Production
+## Running And Deployment
-Topology: uvicorn on `127.0.0.1:8001`, `next start` on `127.0.0.1:3001`, nginx TLS reverse-proxy (`/api/` → backend, `/` → frontend). See `README.md` for the full deploy and redeploy commands. Service user is `www-data`; code lives at `/var/www/prism-v2/`.
+Local runtime: uvicorn on `127.0.0.1:8001`, Next.js on `127.0.0.1:3001`. See `README.md` for clone-to-run instructions.
-Deploy flow: bare repo at `/srv/git/prism-v2.git`; pushing master triggers a post-receive hook that `git checkout -f`s the tree into `/var/www/prism-v2/` and runs `scripts/deploy.sh` (build + restart + smoke check). `/var/www/prism-v2/` has no `.git/`. Manual deploy on the server: `sudo ./scripts/deploy.sh` (add `--install` to refresh systemd units / nginx site). See README for first-time setup.
+`scripts/deploy.sh` is only a build/setup helper. It creates `backend/.venv` if needed, installs backend requirements, runs `npm ci`, and builds the frontend. It does not install `systemd`, configure `nginx`, restart services, or manage git hooks.
+
+`systemd/` and `nginx/` are optional reference templates for users who want to wire Prism into their own server setup.
## Coding Style
@@ -38,7 +40,7 @@ Deploy flow: bare repo at `/srv/git/prism-v2.git`; pushing master triggers a pos
## Testing
-Backend tests are `test_*.py` under `backend/tests/`. Stub `data_service` with `monkeypatch` — never hit live yfinance. Use `tmp_path` for any test that touches SQLite. No frontend test runner; rely on `npm run lint` and `npm run build`.
+Backend tests are `test_*.py` under `backend/tests/`. Run them with `backend/.venv/bin/pytest` unless you have already activated the backend virtualenv. Stub `data_service` with `monkeypatch` — never hit live yfinance. Use `tmp_path` for any test that touches SQLite. No frontend test runner; rely on `npm run lint` and `npm run build`.
## Commits & PRs