chore: Makefile→justfile + 개발 포트 unique화(31300/31800)
- Makefile 삭제 → justfile. `just run dev`(둘 다) / `just run fe` / `just run be` + install/test/e2e/lint/format/health/seed/migrate/clean 레시피 - 개발 포트를 흔한 dev 포트(3000/5173/8000/8080)와 충돌 없는 31xxx 대역으로: 프론트 :3000→:31300, 백엔드 :8000→:31800. 전 참조 일괄 변경 (package.json/next.config/lib api 기본값/playwright config·fixture/.env*.example/ config.py FRONTEND_ORIGIN/scripts/dev.sh/CI/README) - E2E 견고화: inbox/tasks/dashboard spec 에 beforeAll(resetSeed) 추가 → 직렬 전체 실행에서 앞 spec 의 캡처 누적과 격리(결정성↑, 전체 39 e2e 29.7s) 검증(새 포트): 백엔드 pytest 63 · 프론트 vitest 69 · playwright 39 전부 통과, tsc/eslint/ruff clean, build OK. 라이브: :31300↔:31800 CORS·SSR fetch·/ 리다이렉트 정상, `just health`/`just run` 동작, 옛 포트 참조 0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>main
parent
c4e86e06ec
commit
b3d21f17d2
@ -1,59 +0,0 @@
|
|||||||
# Makefile (레포 루트)
|
|
||||||
.PHONY: help install fe be dev test lint format health seed migrate clean
|
|
||||||
|
|
||||||
FRONT := frontend
|
|
||||||
BACK := backend
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo "make install - 프론트/백 의존성 설치"
|
|
||||||
@echo "make dev - 프론트(3000)+백(8000) 동시 실행"
|
|
||||||
@echo "make fe - 프론트만 (next dev)"
|
|
||||||
@echo "make be - 백엔드만 (uvicorn --reload)"
|
|
||||||
@echo "make test - pytest + vitest"
|
|
||||||
@echo "make lint - ruff + eslint"
|
|
||||||
@echo "make health - 두 health 엔드포인트 curl"
|
|
||||||
@echo "make seed - DB 시드 적재"
|
|
||||||
@echo "make migrate - alembic upgrade head"
|
|
||||||
|
|
||||||
install:
|
|
||||||
cd $(FRONT) && pnpm install
|
|
||||||
cd $(BACK) && uv sync
|
|
||||||
|
|
||||||
fe:
|
|
||||||
cd $(FRONT) && pnpm dev
|
|
||||||
|
|
||||||
be:
|
|
||||||
cd $(BACK) && uv run uvicorn app.main:app --reload --port 8000
|
|
||||||
|
|
||||||
# 두 서버 동시 실행: Ctrl-C 시 둘 다 정리.
|
|
||||||
dev:
|
|
||||||
@echo "▶ backend :8000 / frontend :3000 (Ctrl-C 로 종료)"
|
|
||||||
@trap 'kill 0' INT TERM EXIT; \
|
|
||||||
( cd $(BACK) && uv run uvicorn app.main:app --reload --port 8000 ) & \
|
|
||||||
( cd $(FRONT) && pnpm dev ) & \
|
|
||||||
wait
|
|
||||||
|
|
||||||
test:
|
|
||||||
cd $(BACK) && uv run pytest
|
|
||||||
cd $(FRONT) && pnpm test
|
|
||||||
|
|
||||||
lint:
|
|
||||||
cd $(BACK) && uv run ruff check .
|
|
||||||
cd $(FRONT) && pnpm lint
|
|
||||||
|
|
||||||
format:
|
|
||||||
cd $(BACK) && uv run ruff format . && uv run black .
|
|
||||||
cd $(FRONT) && pnpm format
|
|
||||||
|
|
||||||
health:
|
|
||||||
@echo "── /api/health ──" && curl -s http://localhost:8000/api/health | python3 -m json.tool
|
|
||||||
@echo "── /api/llm/health ──" && curl -s http://localhost:8000/api/llm/health | python3 -m json.tool
|
|
||||||
|
|
||||||
seed:
|
|
||||||
cd $(BACK) && uv run python -m app.seed
|
|
||||||
|
|
||||||
migrate:
|
|
||||||
cd $(BACK) && uv run alembic upgrade head
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf $(FRONT)/.next $(BACK)/ari.db $(BACK)/.pytest_cache
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
DATABASE_URL=sqlite:///./ari.db
|
DATABASE_URL=sqlite:///./ari.db
|
||||||
FRONTEND_ORIGIN=http://localhost:3000
|
FRONTEND_ORIGIN=http://localhost:31300
|
||||||
OLLAMA_HOST=http://localhost:11434
|
OLLAMA_HOST=http://localhost:11434
|
||||||
OLLAMA_MODEL=llama3.1
|
OLLAMA_MODEL=llama3.1
|
||||||
|
|||||||
@ -0,0 +1,64 @@
|
|||||||
|
# 아리 — 작업 러너 (make 대체). `just --list` 로 전체 보기.
|
||||||
|
# 개발 포트는 흔한 dev 포트(3000/5173/8000/8080)와 충돌을 피해 31xxx 대역 사용.
|
||||||
|
|
||||||
|
be_port := "31800" # 백엔드 API
|
||||||
|
fe_port := "31300" # 프론트(package.json `dev` 스크립트도 -p {{fe_port}})
|
||||||
|
|
||||||
|
# 기본: 사용 가능한 레시피 목록
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# 의존성 설치 (프론트 pnpm + 백엔드 uv)
|
||||||
|
install:
|
||||||
|
cd frontend && pnpm install
|
||||||
|
cd backend && uv sync
|
||||||
|
|
||||||
|
# 실행: `just run dev`(둘 다) | `just run fe` | `just run be`
|
||||||
|
run target="dev":
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
case "{{target}}" in
|
||||||
|
dev)
|
||||||
|
echo "▶ backend :{{be_port}} / frontend :{{fe_port}} (Ctrl-C 로 종료)"
|
||||||
|
trap 'kill 0' INT TERM EXIT
|
||||||
|
( cd backend && uv run uvicorn app.main:app --reload --port {{be_port}} ) &
|
||||||
|
( cd frontend && pnpm dev ) &
|
||||||
|
wait ;;
|
||||||
|
fe) cd frontend && pnpm dev ;;
|
||||||
|
be) cd backend && uv run uvicorn app.main:app --reload --port {{be_port}} ;;
|
||||||
|
*) echo "알 수 없는 대상: {{target}} (dev|fe|be)"; exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# 테스트 (백엔드 pytest + 프론트 vitest)
|
||||||
|
test:
|
||||||
|
cd backend && uv run pytest
|
||||||
|
cd frontend && pnpm test
|
||||||
|
|
||||||
|
# E2E (Playwright). 백엔드는 ARI_ALLOW_TEST_RESET=1 LLM_PROVIDER=heuristic 로 기동해야 전부 통과.
|
||||||
|
e2e:
|
||||||
|
cd frontend && pnpm exec playwright test --workers=1
|
||||||
|
|
||||||
|
# 린트 (ruff + eslint) / 포맷
|
||||||
|
lint:
|
||||||
|
cd backend && uv run ruff check .
|
||||||
|
cd frontend && pnpm lint
|
||||||
|
|
||||||
|
format:
|
||||||
|
cd backend && uv run ruff format . && uv run black .
|
||||||
|
cd frontend && pnpm format
|
||||||
|
|
||||||
|
# health 엔드포인트 확인
|
||||||
|
health:
|
||||||
|
@echo "── /api/health ──" && curl -s http://localhost:{{be_port}}/api/health | python3 -m json.tool
|
||||||
|
@echo "── /api/llm/health ──" && curl -s http://localhost:{{be_port}}/api/llm/health | python3 -m json.tool
|
||||||
|
|
||||||
|
# DB 시드 / 마이그레이션
|
||||||
|
seed:
|
||||||
|
cd backend && uv run python -m app.seed
|
||||||
|
|
||||||
|
migrate:
|
||||||
|
cd backend && uv run alembic upgrade head
|
||||||
|
|
||||||
|
# 빌드 산출물 정리
|
||||||
|
clean:
|
||||||
|
rm -rf frontend/.next backend/ari.db backend/.pytest_cache
|
||||||
@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# 아리 — backend(:8000) + frontend(:3000) 동시 기동. Ctrl-C 로 둘 다 정리.
|
# 아리 — backend(:31800) + frontend(:31300) 동시 기동. Ctrl-C 로 둘 다 정리.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
|
||||||
trap 'kill 0' INT TERM EXIT
|
trap 'kill 0' INT TERM EXIT
|
||||||
( cd "$ROOT/backend" && uv run uvicorn app.main:app --reload --port 8000 ) &
|
( cd "$ROOT/backend" && uv run uvicorn app.main:app --reload --port 31800 ) &
|
||||||
( cd "$ROOT/frontend" && pnpm dev ) &
|
( cd "$ROOT/frontend" && pnpm dev ) &
|
||||||
wait
|
wait
|
||||||
|
|||||||
Loading…
Reference in New Issue