Files
css-test/app/core/app_factory.py
T
paul 35d70a7746 feat: add ReconConfig API and UI for managing configurations
- Added a new API endpoint for managing ReconConfigs at /api/configs, including GET, POST, PUT, and a test URL feature.
- Implemented a new configuration editor UI at /configs for creating and editing ReconConfigs.
- Introduced a new configs list page at /configs to display existing configurations with options to edit.
- Updated base HTML template to include a link to the new configs page.
- Created stub configuration and authentication models for workspace development.
- Added a stub configuration module to handle database configuration without a real database.
2026-05-26 21:58:04 +12:00

43 lines
1.4 KiB
Python

from pathlib import Path
from fastapi import FastAPI
from starlette.middleware.sessions import SessionMiddleware
from fastapi.staticfiles import StaticFiles
from app.api.reporting import router as reporting_router
from app.api.transactions import router as transactions_router
from app.api.configs import router as configs_router
from app.core.settings import get_settings
from app.views.auth import router as auth_router
from app.views.views import router as dashboard_router
from app.views.docs import router as docs_router
def create_app() -> FastAPI:
settings = get_settings()
app = FastAPI(
title="Recon Ranger",
description="Financial crime reconciliation API — patrol your data landscape for inconsistencies.",
version="0.1.0",
docs_url=None,
)
app.add_middleware(
SessionMiddleware,
secret_key=settings.session_secret_key,
same_site="lax",
https_only=False,
)
project_root = Path(__file__).resolve().parents[2]
static_dir = project_root / "data" / "static"
app.mount("/static", StaticFiles(directory=str(static_dir)), name="static")
app.include_router(transactions_router)
app.include_router(reporting_router)
app.include_router(configs_router)
app.include_router(auth_router)
app.include_router(dashboard_router)
app.include_router(docs_router)
return app