"""FastAPI application entry point.""" from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.core.config import get_settings settings = get_settings() app = FastAPI( title=settings.app_name, version=settings.app_version, debug=settings.debug, ) # CORS middleware app.add_middleware( CORSMiddleware, allow_origins=settings.cors_origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/") async def root() -> dict[str, str]: """Root endpoint.""" return {"message": "Welcome to the API", "version": settings.app_version} @app.get("/health") async def health() -> dict[str, str]: """Health check endpoint.""" return {"status": "healthy"}