from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api.inventory import router as inventory_router app = FastAPI( title="Small Business Inventory Management System", description="A FastAPI-based inventory management system for small businesses", version="1.0.0", ) app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) app.include_router(inventory_router, prefix="/api/inventory", tags=["inventory"]) @app.get("/") def read_root(): return { "title": "Small Business Inventory Management System", "documentation": "/docs", "health_check": "/health", } @app.get("/health") def health_check(): return {"status": "healthy", "service": "inventory-management-system"}