Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/inspectionProfiles/Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

108 changes: 57 additions & 51 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
BACKEND_DIR := backend
BACKEND_DIR := backend
FRONTEND_DIR := frontend
OPENAPI_JSON := $(BACKEND_DIR)/openapi.json

.PHONY: help \
backend frontend \
export-schema generate-client openapi \
install install-backend install-frontend \
update update-backend update-frontend \
format format-backend format-frontend \
test test-backend test-frontend
RECIPES := help \
backend frontend \
export-schema generate-client openapi \
install-backend install-frontend install \
update-backend update-frontend update \
lint-backend lint-frontend lint \
format-backend format-frontend format \
test-backend test-frontend test

.PHONY: $(RECIPES)
.SILENT: $(RECIPES)

help:
@echo ""
@echo "Usage: make <target>"
@echo ""
@echo " Development servers"
@echo " backend Run the FastAPI dev server"
@echo " frontend Run the Vite dev server"
@echo ""
@echo " OpenAPI client generation"
@echo " export-schema Export openapi.json from FastAPI"
@echo " generate-client Generate TypeScript client from openapi.json"
@echo " openapi Run the full pipeline (export + generate)"
@echo ""
@echo " Dependencies"
@echo " install Install all dependencies (backend + frontend)"
@echo " install-backend Install Python dependencies via uv"
@echo " install-frontend Install Node.js dependencies via pnpm"
@echo ""
@echo " update Update all dependencies (backend + frontend)"
@echo " update-backend Update Python dependencies via uv"
@echo " update-frontend Update Node.js dependencies via pnpm"
@echo ""
@echo " Linting"
@echo " lint Lint all (backend + frontend)"
@echo " lint-backend Lint back end"
@echo " lint-frontend Lint front end"
@echo ""
@echo " Formatting"
@echo " format Format all (backend + frontend)"
@echo " format-backend Format back end"
@echo " format-frontend Format front end"
@echo ""
@echo " Testing"
@echo " test Test all (backend + frontend)"
@echo " test-backend Test back end"
@echo " test-frontend Test front end"
echo ''
echo 'Usage: make <target>'
echo ''
echo ' help Show this message'
echo ''
echo ' Development servers'
echo ' backend Run the FastAPI dev server'
echo ' frontend Run the Vite dev server'
echo ''
echo ' OpenAPI client generation'
echo ' export-schema Export openapi.json from FastAPI'
echo ' generate-client Generate TypeScript client from openapi.json'
echo ' openapi Run the full pipeline (export + generate)'
echo ''
echo ' Dependencies'
echo ' install-backend Install Python dependencies via uv'
echo ' install-frontend Install Node.js dependencies via pnpm'
echo ' install Install all dependencies (backend + frontend)'
echo ''
echo ' update-backend Update Python dependencies via uv'
echo ' update-frontend Update Node.js dependencies via pnpm'
echo ' update Update all dependencies (backend + frontend)'
echo ''
echo ' Linting'
echo ' lint-backend Lint back end'
echo ' lint-frontend Lint front end'
echo ' lint Lint all (backend + frontend)'
echo ''
echo ' Formatting'
echo ' format-backend Format back end'
echo ' format-frontend Format front end'
echo ' format Format all (backend + frontend)'
echo ''
echo ' Testing'
echo ' test-backend Test back end'
echo ' test-frontend Test front end'
echo ' test Test all (backend + frontend)'

backend:
cd $(BACKEND_DIR) && uv run fastapi dev
Expand All @@ -64,48 +70,48 @@ openapi: export-schema generate-client
$(OPENAPI_JSON): $(BACKEND_DIR)/app/main.py $(BACKEND_DIR)/export_openapi.py
cd $(BACKEND_DIR) && uv run python export_openapi.py

install: install-backend install-frontend

install-backend:
cd $(BACKEND_DIR) && uv sync

install-frontend:
cd $(FRONTEND_DIR) && pnpm install

update: update-backend update-frontend
install: install-backend install-frontend

update-backend:
cd $(BACKEND_DIR) && uv sync -U

update-frontend:
cd $(FRONTEND_DIR) && pnpm update

lint: lint-backend lint-frontend
update: update-backend update-frontend

lint-backend:
- cd $(BACKEND_DIR) && { \
uv run ruff check; \
uv run basedpyright; \
}
}

lint-frontend:
- cd $(FRONTEND_DIR) && { \
pnpm lint; \
pnpm tsc:check; \
}
}

format: format-backend format-frontend
lint: lint-backend lint-frontend

format-backend:
cd $(BACKEND_DIR) && uv run ruff format

format-frontend:
cd $(FRONTEND_DIR) && pnpm format

test: test-backend test-frontend
format: format-backend format-frontend

test-backend:
cd $(BACKEND_DIR) && uv run pytest --cov app --cov-report term-missing

test-frontend:
cd $(FRONTEND_DIR) && pnpm test

test: test-backend test-frontend
24 changes: 12 additions & 12 deletions backend/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"@mantine/form": "^9.1.1",
"@mantine/hooks": "^9.1.1",
"@tabler/icons-react": "^3.41.1",
"@tanstack/query-async-storage-persister": "^5.100.6",
"@tanstack/react-query": "^5.100.6",
"@tanstack/react-query-persist-client": "^5.100.6",
"@tanstack/query-async-storage-persister": "^5.100.8",
"@tanstack/react-query": "^5.100.8",
"@tanstack/react-query-persist-client": "^5.100.8",
"@turf/boolean-point-in-polygon": "^7.3.5",
"@turf/helpers": "^7.3.5",
"axios": "^1.15.2",
Expand All @@ -35,8 +35,8 @@
"@eslint/js": "^9.39.4",
"@hey-api/openapi-ts": "0.97.0",
"@rolldown/plugin-babel": "^0.2.3",
"@tanstack/eslint-plugin-query": "^5.100.6",
"@tanstack/react-query-devtools": "^5.100.6",
"@tanstack/eslint-plugin-query": "^5.100.8",
"@tanstack/react-query-devtools": "^5.100.8",
"@types/babel__core": "^7.20.5",
"@types/geojson": "^7946.0.16",
"@types/leaflet": "^1.9.21",
Expand All @@ -51,8 +51,8 @@
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.2",
"eslint-plugin-tsdoc": "^0.5.2",
"globals": "^17.5.0",
"postcss": "^8.5.12",
"globals": "^17.6.0",
"postcss": "^8.5.13",
"postcss-preset-mantine": "^1.18.0",
"postcss-simple-vars": "^7.0.1",
"prettier": "3.8.3",
Expand Down
Loading
Loading