Skip to content

Main Admin Panel schema

  • brilliance_admin.schema.AdminSchema

It is the main configuration object that describes the entire admin panel: title, authentication, groups and categories (tables, dashboards, links etc).

Main config

ParameterDescription
categories requiredList of root categories (tables, dashboards, links) displayed in the sidebar
auth requiredAuthentication provider (see Authentication)
language_manageri18n configuration (see Translations)

Info

ParameterDescription
titleAdmin panel title, shown in the navbar and browser tab
descriptionPanel description
login_greetings_messageMessage displayed on the login page

Customization

ParameterDescription
favicon_imageURL to the favicon
logo_imageURL to the logo image in the navbar
navbar_densitySidebar density: 'default', 'comfortable' or 'compact'
default_themeDefault color theme name
custom_themesList of custom color theme objects

Urls

ParameterDescription
main_pageRedirect path after login and when clicking the logo (e.g. '/group/category')
backend_prefixCustom backend URL prefix (auto-detected if not set)
static_prefixCustom static files URL prefix (auto-detected if not set)

Usage

from brilliance_admin import schema

admin_schema = schema.AdminSchema(
    title='My Admin Panel',
    auth=your_auth,
    categories=[
        YourDashboard(),
        YourTableCategory(),
    ],
    language_manager=schema.LanguageManager(
        languages={'en': 'English', 'ru': 'Russian'},
        locales_dir='locales',
    ),
)

admin_app = admin_schema.generate_app()

generate_app()

Generates a FastAPI ASGI application. Mount it to your backend at any path.

Optional arguments:

  • debug - enable debug mode
  • default_cors - add CORS middleware (enabled by default)
  • include_docs - enable Swagger UI at /docs
  • include_scalar - enable Scalar docs
  • include_redoc - enable ReDoc
admin_app = admin_schema.generate_app(
    debug=True,
    include_docs=True,
)

TIP

All string parameters (title, description, login_greetings_message) support TranslateText for i18n.

AI/LLM: Documentation index available at https://docs.brilliance-admin.com/llms.txt