[importlinter]
root_package = loadcoach
include_external_packages = True

[importlinter:contract:layers]
name = LoadCoach internal layering
type = layers
layers =
    web
    cli
    services
    domain
containers = loadcoach

[importlinter:contract:web-cli-independence]
name = Web and CLI never import each other
type = independence
modules =
    loadcoach.web
    loadcoach.cli

[importlinter:contract:domain-purity]
name = Domain imports no frameworks
type = forbidden
source_modules = loadcoach.domain
forbidden_modules =
    fastapi
    starlette
    sqlalchemy
    typer
    httpx
    jinja2

[importlinter:contract:no-other-applications]
name = LoadCoach must not import other applications
type = forbidden
source_modules = loadcoach
forbidden_modules =
    freeweight
    ideapress
