feat: scaffold backend with FastAPI, config files, and health endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 08:04:13 +00:00
parent c393f76563
commit f1c20c0461
7 changed files with 69 additions and 0 deletions

View File

View File

@@ -0,0 +1,20 @@
nodes:
- name: "Router Principal"
ip: "192.168.1.1"
username: "admin"
password: "admin"
icon: "router"
connections: []
- name: "Servidor Ejemplo"
ip: "192.168.1.10"
username: "root"
password: "password"
public_url: "https://ejemplo.com"
icon: "server"
connections: ["Router Principal"]
network_scan:
enabled: true
subnet: "192.168.1.0/24"
interval_minutes: 10

View File

@@ -0,0 +1,16 @@
display:
resolution: "3840x2160"
rotation_interval_seconds: 30
transition: "fade"
theme: "dark"
odoo:
url: "http://localhost:8069"
database: "odoo"
username: "admin"
password: "admin"
refresh:
odoo_minutes: 5
network_minutes: 10
ping_seconds: 60

25
backend/main.py Normal file
View File

@@ -0,0 +1,25 @@
from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
@asynccontextmanager
async def lifespan(app: FastAPI):
# Startup
yield
# Shutdown
app = FastAPI(title="TV Dashboard API", lifespan=lifespan)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/api/health")
async def health():
return {"status": "ok"}

View File

8
backend/requirements.txt Normal file
View File

@@ -0,0 +1,8 @@
fastapi==0.115.6
uvicorn[standard]==0.34.0
python-nmap==0.7.1
PyYAML==6.0.2
websockets==14.1
httpx==0.28.1
pydantic==2.10.4
pydantic-settings==2.7.1

View File