1- .PHONY : help lint lint-frontend lint-backend lint-go
1+ .PHONY : help lint lint-frontend lint-backend type-check-backend test test-frontend test-backend format format-frontend format-backend docker-build docker-build-frontend docker-build-backend docker-run-frontend docker-run-backend docker-clean
22
33help :
44 @echo " make"
99 @echo " install-backend"
1010 @echo " install backend dependencies (uv)"
1111 @echo " lint"
12- @echo " runs all linters (frontend, backend, and Go )"
12+ @echo " runs all linters and type checking (frontend, backend)"
1313 @echo " lint-frontend"
1414 @echo " lints frontend code with npm run lint"
1515 @echo " lint-backend"
1616 @echo " lints backend Python code with ruff"
17+ @echo " type-check-backend"
18+ @echo " type checks backend Python code with mypy"
19+ @echo " format"
20+ @echo " formats all code (frontend and backend)"
21+ @echo " format-frontend"
22+ @echo " formats frontend code with prettier"
1723 @echo " format-backend"
1824 @echo " formats backend Python code with ruff"
25+ @echo " test"
26+ @echo " runs all tests (frontend and backend)"
27+ @echo " test-frontend"
28+ @echo " runs frontend tests with vitest"
29+ @echo " test-backend"
30+ @echo " runs backend tests with pytest"
31+ @echo " docker-build"
32+ @echo " builds all Docker images (frontend and backend)"
33+ @echo " docker-build-frontend"
34+ @echo " builds frontend Docker image"
35+ @echo " docker-build-backend"
36+ @echo " builds backend Docker image"
37+ @echo " docker-run-frontend"
38+ @echo " runs frontend container on port 8080"
39+ @echo " docker-run-backend"
40+ @echo " runs backend container on port 8000"
41+ @echo " docker-clean"
42+ @echo " removes built Docker images"
1943
2044dev : install
2145
@@ -29,14 +53,52 @@ install-backend:
2953 cd src/backend && uv pip install -r requirements.txt
3054 cd src/backend && uv pip install -r requirements-dev.txt
3155
32- lint : lint-frontend lint-backend lint-go
56+ lint : lint-frontend lint-backend type-check-backend
3357
3458lint-frontend :
3559 cd src/frontend && npm run lint
3660
3761lint-backend :
3862 cd src/backend && uv run ruff check .
3963
64+ format : format-frontend format-backend
65+
66+ format-frontend :
67+ cd src/frontend && npx prettier --write .
68+
4069format-backend :
4170 cd src/backend && uv run ruff format .
4271
72+ type-check-backend :
73+ cd src/backend && uv run mypy .
74+
75+ test : test-frontend test-backend
76+
77+ test-frontend :
78+ cd src/frontend && npm test
79+
80+ test-backend :
81+ cd src/backend && uv run pytest
82+
83+ docker-build : docker-build-frontend docker-build-backend
84+
85+ docker-build-frontend :
86+ docker build -t robot-frontend:latest src/frontend
87+
88+ docker-build-backend :
89+ docker build -t robot-backend:latest src/backend
90+
91+ docker-run-frontend :
92+ @echo " Starting frontend container..."
93+ @docker run -d --rm -p 8080:80 --name robot-frontend-dev robot-frontend:latest
94+ @sleep 1
95+ @echo " Opening browser at http://localhost:8080"
96+ @open http://localhost:8080 || echo " Please open http://localhost:8080 in your browser"
97+ @echo " To stop: docker stop robot-frontend-dev"
98+
99+ docker-run-backend :
100+ docker run --rm -p 8000:8000 robot-backend:latest
101+
102+ docker-clean :
103+ docker rmi robot-frontend:latest robot-backend:latest || true
104+
0 commit comments