# CLAUDE.md ## Project Overview Galaxis-Po is a quant portfolio management application for DC pension (퇴직연금) investing. It implements the Kim Jong-bong (김종봉) strategy for backtesting, signal generation, and portfolio management. The strategy logic is defined in `quant.md` — do not modify it without explicit instruction. ## Tech Stack - **Backend:** FastAPI, Python 3.12, SQLAlchemy, PostgreSQL, uv (package manager) - **Frontend:** Next.js 15 (App Router), React 19, TypeScript, Tailwind CSS v4, shadcn/ui (Radix primitives) - **Infrastructure:** Docker Compose, PostgreSQL 18 ## Common Commands ```bash # Backend dev server (from repo root) cd backend && uv run uvicorn app.main:app --reload # Frontend dev server cd frontend && npm run dev # Run all backend tests cd backend && uv run pytest # Run e2e tests cd backend && uv run pytest tests/e2e/ -v # DB migration cd backend && uv run alembic upgrade head # Create new migration cd backend && uv run alembic revision --autogenerate -m "description" # Frontend lint cd frontend && npm run lint # Frontend type check cd frontend && npx tsc --noEmit ``` ## Development Rules 1. Check `docs/plans/` for relevant design documents before implementing features 2. All API endpoints go under `backend/app/api/` as routers 3. DB schema changes require an alembic migration — autogenerate 후 반드시 리뷰하고 즉시 `alembic upgrade head` 4. Do not modify `.env` or `docker-compose.prod.yml` (`.env` 설정 안내는 허용, 자동 수정은 금지) 5. External APIs: pykrx (한국 거래소 데이터, 백테스트/시그널 주력), KIS (실시간 매매), DART (재무제표) 6. Frontend 변경 후 `cd frontend && npx tsc --noEmit` 필수