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 mappingApplication- use-cases and orchestrationDelivery- presenter/store layer, async workflows, validationUI- 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:
deliverydepends onapplicationapplicationdepends ondomaincontractsinfrastructureimplementsdomaincontractsdomaindepends on nothing external
Recommended package split
- Keep architectural/runtime logic in
@azure-net/kit - Keep visual/UI-specific behavior in
@azure-net/ui-kit