.PHONY: install seed api web dev test build clean

install:
	cd api && python3.12 -m venv .venv && .venv/bin/pip install -q -r requirements-dev.txt
	# Editable install of the scanner in this checkout, so browser scanning works
	# against the local version rather than whatever is on PyPI.
	cd api && .venv/bin/pip install -q -e ../..
	cd web && npm install

seed:
	cd api && .venv/bin/python seed.py

api:
	cd api && .venv/bin/uvicorn app.main:app --reload --port 8000

web:
	cd web && npm run dev

test:
	cd api && .venv/bin/python -m pytest -q
	cd web && npx tsc -b

build:
	cd web && npm run build

clean:
	rm -f api/ragsec.db
