a working product with ugly ui

This commit is contained in:
2025-12-12 20:15:27 +05:00
parent e6d04f986f
commit 4d3085623a
77 changed files with 8750 additions and 0 deletions

44
app/main.py Normal file
View File

@@ -0,0 +1,44 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.config import settings
from app.routers import auth, maps, items
# Create FastAPI application
app = FastAPI(
title="ISP Wiremap API",
description="API for ISP cable and network infrastructure mapping",
version="1.0.0"
)
# Configure CORS
app.add_middleware(
CORSMiddleware,
allow_origins=settings.cors_origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Register routers
app.include_router(auth.router)
app.include_router(maps.router)
app.include_router(items.router)
@app.get("/")
async def root():
"""Root endpoint for API health check."""
return {
"message": "ISP Wiremap API",
"version": "1.0.0",
"status": "running"
}
@app.get("/api/health")
async def health_check():
"""Health check endpoint for monitoring."""
return {
"status": "healthy",
"environment": settings.ENVIRONMENT
}