Commit Graph

1 Commits

Author SHA1 Message Date
Mike Kell 9eafc68fec feat(core): extract shared composition pattern into core package (Stage 4B)
Validate Docs / validate-docs (push) Successful in 1m13s Details
Extract AppConfig/AppEnvironment, AppServices, Bootstrap, and AppScope into core package as KcAppConfig, KcAppServices, KcBootstrap, and KcAppScope generic abstractions.

New core composition types:

- KcAppConfig: runtime config from --dart-define (KC_ENV, WC credentials)

- KcAppEnvironment: enum for fake/wordpress environments

- KcAppServices: abstract base for app service containers

- KcServiceFactory<T>: generic factory for fake/wordpress service creation

- KcBootstrap: shared bootstrap with env switch and WP credential fallback

- KcAppScope<T>: InheritedWidget exposing typed services + config to tree

kell_web backward compatibility:

- AppConfig/AppEnvironment are now typedefs to Kc-prefixed types

- AppServices extends KcAppServices with concrete repositories

- AppScope extends KcAppScope<AppServices> with direct InheritedWidget lookup

- Bootstrap delegates to KcBootstrap.run with app-specific factory

Tests: 20 new core tests, all 379 tests passing (core 20, design_system 41, feature_wordpress 294, kell_web 24). dart analyze clean.
2026-05-22 09:57:51 -04:00