Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (42 loc) · 1.91 KB
/
Copy pathMakefile
File metadata and controls
53 lines (42 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Pack — one entry point for the dev loop (Doc 05 §03: `make dev` runs both halves).
#
# Windows note: `make` is not native. Use `pwsh scripts/dev.ps1` (see that file) or run the
# per-service targets in separate terminals. On macOS/Linux/WSL/git-bash, `make` works.
.PHONY: help dev infra backend gateway frontend test sync-fixtures install hooks
help:
@echo "Targets:"
@echo " make install - install backend, frontend, gateway deps"
@echo " make infra - start redis + postgres (docker compose)"
@echo " make dev - infra + backend + gateway + frontend (needs 'make -j' or 3 terminals)"
@echo " make backend - run the FastAPI engine (:8000)"
@echo " make gateway - run the Rust gateway (:8080)"
@echo " make frontend - run the Vite dev server (:5173)"
@echo " make test - backend contract tests + frontend reducer tests + cargo check"
@echo " make sync-fixtures - copy canonical backend/fixtures -> frontend/fixtures"
@echo " make hooks - install pre-commit hooks"
install:
cd backend && (uv sync --extra dev || python -m pip install -e ".[dev]")
cd frontend && pnpm install
cd gateway && cargo fetch
infra:
docker compose up -d redis postgres
# Run these three in separate terminals, or `make -j3 dev-all`.
backend:
cd backend && (uv run uvicorn app.main:app --reload --port 8000 || uvicorn app.main:app --reload --port 8000)
gateway:
cd gateway && cargo run
frontend:
cd frontend && pnpm dev
dev: infra
@echo "Infra up. Now run, in three terminals: make backend | make gateway | make frontend"
@echo "Or on Windows: pwsh scripts/dev.ps1"
test:
cd backend && (uv run pytest -q || pytest -q)
cd frontend && pnpm test
cd gateway && cargo check
# backend/fixtures is canonical; the frontend keeps a synced copy so it stays
# self-contained. Run this whenever the fixture pack changes.
sync-fixtures:
cp backend/fixtures/*.jsonl frontend/fixtures/
hooks:
pre-commit install