from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware app = FastAPI( title="TK-MP BOM System API", description="BOM (Bill of Materials) 시스템 API", version="1.0.0" ) # CORS 설정 app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/") async def root(): return { "message": "TK-MP BOM System API", "version": "1.0.0", "status": "running" } @app.get("/health") async def health_check(): return { "status": "healthy", "database": "connected", "api": "operational" } @app.get("/api/projects") async def get_projects(): return { "projects": [], "message": "프로젝트 목록 (추후 데이터베이스 연결)" }