from config.reuseable import FastAPI, API_URL, CORSMiddleware, register_tortoise app = FastAPI( title="Growth AI API and Agent", description="API dor Growth AI", version="1.0.0", docs_url="/docs", openapi_tags=[ { "name": "Test", "description": "Test related operations", }, { "name": "Auth", "description": "Authentication related operations", }, { "name": "User", "description": "User related operations", }, { "name": "Challenge", "description": "Challenge related operations", }, { "name": "Agent", "description": "AI Agent related operations", }, ], ) # Middleware app.add_middleware( CORSMiddleware, allow_origins=[ "http://127.0.0.1:5173", "http://localhost:5173", ], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/", tags=["Test"]) def read_root(): return {"message": "Growth AI Agent Ready"} # other routes