Automated Action 0fc3927871 Build comprehensive SaaS invoicing application with FastAPI
- Implemented complete authentication system with JWT tokens
- Created user management with registration and profile endpoints
- Built client management with full CRUD operations
- Developed invoice system with line items and automatic calculations
- Set up SQLite database with proper migrations using Alembic
- Added health monitoring and API documentation
- Configured CORS for cross-origin requests
- Included comprehensive README with usage examples
2025-06-23 14:56:50 +00:00

36 lines
1.0 KiB
Python

from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.routers import auth, users, clients, invoices, health
from app.db.session import engine
from app.db.base import Base
app = FastAPI(
title="SaaS Invoicing Application",
description="A comprehensive invoicing solution for businesses",
version="1.0.0",
openapi_url="/openapi.json"
)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
Base.metadata.create_all(bind=engine)
app.include_router(auth.router, prefix="/auth", tags=["Authentication"])
app.include_router(users.router, prefix="/users", tags=["Users"])
app.include_router(clients.router, prefix="/clients", tags=["Clients"])
app.include_router(invoices.router, prefix="/invoices", tags=["Invoices"])
app.include_router(health.router, tags=["Health"])
@app.get("/")
async def root():
return {
"title": "SaaS Invoicing Application",
"documentation": "/docs",
"health_check": "/health"
}