Skip to content

Architecture Overview

@azure-net/kit is organized around layered application architecture.

Layers

  • Domain - business models and contracts (ports)
  • Infrastructure - HTTP/data adapters and DTO/resource mapping
  • Application - use-cases and orchestration
  • Delivery - presenter/store layer, async workflows, validation
  • UI - Svelte components/pages (outside of kit core)

Core building blocks from kit

  • Provider composition: createBoundaryProvider, cleanupProvider
  • Runtime middleware: createMiddlewareManager
  • Async orchestration: createAsyncHelpers, createAsyncSignal, createActiveForm
  • Validation: schema, createSchemaFactory, createRules
  • Networking: createHttpServiceInstance, createQueryInstance, BaseHttpDatasource

Typical context structure

txt
src/
  app/
    contexts/
      account/
        domain/
        infrastructure/
        application/
        delivery/
    core/
    shared/

Dependency direction

Keep dependencies inward:

  • delivery depends on application
  • application depends on domain contracts
  • infrastructure implements domain contracts
  • domain depends on nothing external
  • Keep architectural/runtime logic in @azure-net/kit
  • Keep visual/UI-specific behavior in @azure-net/ui-kit