from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware import uvicorn from datetime import datetime app = FastAPI( title="Console API Gateway", description="Central orchestrator for microservices", version="0.1.0" ) # CORS middleware app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/") async def root(): return { "message": "Console API Gateway", "status": "running", "timestamp": datetime.now().isoformat() } @app.get("/health") async def health_check(): return { "status": "healthy", "service": "console", "timestamp": datetime.now().isoformat() } @app.get("/api/status") async def system_status(): return { "console": "online", "services": { "users": "pending", "oauth": "pending", "images": "pending", "applications": "pending", "data": "pending", "statistics": "pending" }, "timestamp": datetime.now().isoformat() } if __name__ == "__main__": uvicorn.run( "main:app", host="0.0.0.0", port=8000, reload=True )