CLAUDE.md for building production-grade REST APIs with FastAPI. Includes auth, error handling, and test conventions.
Python FastAPI 기반 REST API 서버. SQLAlchemy ORM + PostgreSQL.
uvicorn app.main:app --reload # 개발 서버
pytest # 테스트 실행
alembic upgrade head # DB 마이그레이션
docker compose up # 전체 스택 실행
app/
main.py # FastAPI 앱 + 미들웨어 설정
config.py # 환경변수 (pydantic-settings)
routers/ # API 엔드포인트
models/ # SQLAlchemy 모델
schemas/ # Pydantic 스키마
services/ # 비즈니스 로직
middleware/ # 인증, 로깅, CORS
tests/
conftest.py # pytest fixtures
test_routers/ # 라우터별 테스트