-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (45 loc) · 2.33 KB
/
Copy pathMakefile
File metadata and controls
59 lines (45 loc) · 2.33 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
54
55
56
57
58
59
.PHONY: help up up-prod down logs dev test lint typecheck migrate migration front-dev front-lint front-build
help: ## Show this help
@echo Targets:
@echo make up start the full stack in dev, hot-reload
@echo make up-prod start the full stack in prod
@echo make down stop everything and wipe the database
@echo make logs follow container logs
@echo make dev run the backend locally
@echo make test run backend tests
@echo make lint ruff check and format the backend
@echo make typecheck pyright type-check the backend
@echo make migrate apply DB migrations
@echo make migration create a migration, use m=your_message
@echo make front-dev run the frontend locally
@echo make front-lint oxlint the frontend
@echo make front-build build the frontend
# ─── Docker ────────────────────────────────────────────
up: ## Start the full stack in DEV (hot-reload)
docker compose up --build
up-prod: ## Start the full stack in PROD
docker compose -f docker-compose.yml up --build
down: ## Stop everything and wipe the database
docker compose down -v
logs: ## Follow all container logs
docker compose logs -f
# ─── Backend ───────────────────────────────────────────
dev: ## Run the backend locally (uvicorn --reload)
cd backend && uv run uvicorn app.main:app --reload
test: ## Run the backend tests
cd backend && uv run pytest -v
lint: ## Lint + format the backend (ruff)
cd backend && uv run ruff check --fix . && uv run ruff format .
typecheck: ## Type-check the backend (pyright)
cd backend && uv run pyright
migrate: ## Apply DB migrations
cd backend && uv run alembic upgrade head
migration: ## Create a migration -> make migration m="your message"
cd backend && uv run alembic revision --autogenerate -m "$(m)"
# ─── Frontend ──────────────────────────────────────────
front-dev: ## Run the frontend locally (Vite)
cd frontend && bun run dev
front-lint: ## Lint the frontend (oxlint)
cd frontend && bun run lint
front-build: ## Build the frontend
cd frontend && bun run build