from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api import routes app = FastAPI( title="EXONYX AI-assisted Exoplanet Discovery API", description="Backend API for light curve processing, transit detection, and validation.", version="1.0.0" ) # Configure CORS for frontend access app.add_middleware( CORSMiddleware, allow_origins=["*"], # In production, restrict to frontend URL allow_credentials=False, allow_methods=["*"], allow_headers=["*"], ) app.include_router(routes.router, prefix="/api/v1") @app.get("/") async def root(): return {"message": "Welcome to the EXONYX API"}