from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api.routes import api_router app = FastAPI( title="SaaS Invoicing Application", description="A comprehensive invoicing solution for SaaS businesses", version="1.0.0", openapi_url="/openapi.json", docs_url="/docs", redoc_url="/redoc", ) app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) app.include_router(api_router) @app.get("/") async def root(): return { "title": "SaaS Invoicing Application", "documentation": "/docs", "health": "/health", } @app.get("/health") async def health_check(): return {"status": "healthy", "service": "invoicing-api"}