Automated Action 246b4e058e Implement comprehensive FastAPI backend for landing page
Added complete backend infrastructure with:
- Authentication system with OAuth (Google, GitHub, Apple)
- Stripe payment processing with subscription management
- Testimonials management API
- Usage statistics tracking
- Email communication services
- Health monitoring endpoints
- Database migrations with Alembic
- Comprehensive API documentation

All APIs are production-ready with proper error handling,
security measures, and environment variable configuration.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-01 23:39:39 +00:00

46 lines
1.1 KiB
Python

from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.api.v1 import api_router
from app.db.session import create_tables
from app.core.config import settings
app = FastAPI(
title=settings.app_name,
description="Backend API for Landing Page with authentication, payments, and communication features",
version="1.0.0",
openapi_url="/openapi.json"
)
# CORS middleware
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Include API routes
app.include_router(api_router, prefix="/api/v1")
@app.on_event("startup")
async def startup_event():
create_tables()
@app.get("/")
async def root():
return {
"title": settings.app_name,
"description": "Backend API for Landing Page with authentication, payments, and communication features",
"documentation": "/docs",
"health_check": "/health",
"version": "1.0.0"
}
@app.get("/health")
async def health_check():
return {
"status": "healthy",
"service": settings.app_name,
"version": "1.0.0"
}