Files
orion/app/api/v1/admin/__init__.py
Samir Boulahtit 238c1ec9b8 refactor: modernize code quality tooling with Ruff
- Replace black, isort, and flake8 with Ruff (all-in-one linter and formatter)
- Add comprehensive pyproject.toml configuration
- Simplify Makefile code quality targets
- Configure exclusions for venv/.venv in pyproject.toml
- Auto-fix 1,359 linting issues across codebase

Benefits:
- Much faster builds (Ruff is written in Rust)
- Single tool replaces multiple tools
- More comprehensive rule set (UP, B, C4, SIM, PIE, RET, Q)
- All configuration centralized in pyproject.toml
- Better import sorting and formatting consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:37:38 +01:00

126 lines
3.8 KiB
Python

# app/api/v1/admin/__init__.py
"""
Admin API router aggregation.
This module combines all admin-related JSON API endpoints:
- Authentication (login/logout)
- Vendor management (CRUD, bulk operations)
- Vendor domains management (custom domains, DNS verification)
- Vendor themes management (theme editor, presets)
- User management (status, roles)
- Dashboard and statistics
- Marketplace monitoring
- Audit logging
- Platform settings
- Notifications and alerts
- Code quality and architecture validation
IMPORTANT:
- This router is for JSON API endpoints only
- HTML page routes are mounted separately in main.py at /vendor/*
- Do NOT include pages.router here - it causes route conflicts
"""
from fastapi import APIRouter
# Import all admin routers
from . import (
audit,
auth,
code_quality,
content_pages,
dashboard,
marketplace,
monitoring,
notifications,
settings,
users,
vendor_domains,
vendor_themes,
vendors,
)
# Create admin router
router = APIRouter()
# ============================================================================
# Authentication & Authorization
# ============================================================================
# Include authentication endpoints
router.include_router(auth.router, tags=["admin-auth"])
# ============================================================================
# Vendor Management
# ============================================================================
# Include vendor management endpoints
router.include_router(vendors.router, tags=["admin-vendors"])
# Include vendor domains management endpoints
router.include_router(vendor_domains.router, tags=["admin-vendor-domains"])
# Include vendor themes management endpoints
router.include_router(vendor_themes.router, tags=["admin-vendor-themes"])
# Include content pages management endpoints
router.include_router(
content_pages.router, prefix="/content-pages", tags=["admin-content-pages"]
)
# ============================================================================
# User Management
# ============================================================================
# Include user management endpoints
router.include_router(users.router, tags=["admin-users"])
# ============================================================================
# Dashboard & Statistics
# ============================================================================
# Include dashboard and statistics endpoints
router.include_router(dashboard.router, tags=["admin-dashboard"])
# ============================================================================
# Marketplace & Imports
# ============================================================================
# Include marketplace monitoring endpoints
router.include_router(marketplace.router, tags=["admin-marketplace"])
# ============================================================================
# Platform Administration
# ============================================================================
# Include monitoring endpoints (placeholder for future implementation)
# router.include_router(monitoring.router, tags=["admin-monitoring"])
# Include audit logging endpoints
router.include_router(audit.router, tags=["admin-audit"])
# Include platform settings endpoints
router.include_router(settings.router, tags=["admin-settings"])
# Include notifications and alerts endpoints
router.include_router(notifications.router, tags=["admin-notifications"])
# ============================================================================
# Code Quality & Architecture
# ============================================================================
# Include code quality and architecture validation endpoints
router.include_router(
code_quality.router, prefix="/code-quality", tags=["admin-code-quality"]
)
# Export the router
__all__ = ["router"]