home: add minerva dashboard scaffold
Some checks failed
secret-guardrails / artifact-secret-scan (push) Has been cancelled
secret-guardrails / gitleaks (push) Has been cancelled

This commit is contained in:
Fizzlepoof
2026-05-25 15:40:26 +00:00
parent 6659fd929f
commit 2db6a23a2c
24 changed files with 1220 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
from __future__ import annotations
from pathlib import Path
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from app.config import Settings
from app.routes.api import router as api_router
from app.routes.ui import router as ui_router
from app.services.store import JSONStore
BASE_DIR = Path(__file__).resolve().parent
def create_app(state_dir: Path | str | None = None) -> FastAPI:
settings = Settings()
app = FastAPI(title=settings.app_name)
resolved_state_dir = Path(state_dir) if state_dir is not None else settings.default_state_dir
app.state.store = JSONStore(resolved_state_dir)
app.mount('/static', StaticFiles(directory=BASE_DIR / 'static'), name='static')
app.include_router(ui_router)
app.include_router(api_router)
return app
app = create_app()