Alliance Platform

Note

Work in progress. The platform itself is in use but has some rough edges, and the documentation is currently a work in progress and may not be complete. Please bear with us as we continue to improve the platform and its documentation. If you are unsure about something or need help, please drop into the #alliance-platform channel in Slack.

Installation

Alliance Platform is a collection of packages available under the alliance_platform namespace. Each package can be installed based on the requirements of the project, with alliance_platform_core being a common dependency for all packages.

poetry add alliance_platform_core alliance_platform_codegen alliance_platform_frontend alliance_platform_audit

Javascript Packages

See the alliance-platform-js repository for where the Javascript packages live.

For the UI components, see the storybook documentation.

Configuration

To configure each package, set the relevant key in the ALLIANCE_PLATFORM dictionary in your Django settings file.

To include type information for the settings, you can use the following example, noting that you only need to include the attributes for the packages you are using:

from alliance_platform.core.settings import AlliancePlatformCoreSettingsType
from alliance_platform.codegen.settings import AlliancePlatformCodegenSettingsType
from alliance_platform.frontend.settings import AlliancePlatformFrontendSettingsType

class AlliancePlatformSettings(TypedDict):
    # Core should always be included
    CORE: AlliancePlatformCoreSettingsType
    # Include the following if you are using the package
    FRONTEND: AlliancePlatformFrontendSettingsType
    CODEGEN: AlliancePlatformCodegenSettingsType


ALLIANCE_PLATFORM: AlliancePlatformSettings = {
    "CORE": {"PROJECT_DIR": PROJECT_DIR},
    "CODEGEN": {
        # Omitted for brevity
    },
    "FRONTEND": {
        # Omitted for brevity
    },
}

See the individual package documentation for more information on the available settings.