What problem does it solve?
Shared dependencies are how modules access cross-cutting concerns (auth, config, HTTP client, analytics, feature flags). They come in three flavors:
- Zustand stores - reactive state that components subscribe to via useStore().
- Plain services - stable instances (HTTP clients, loggers) that don't trigger re-renders. Accessed via useService().
- Reactive services - external sources you observe but don't control (call adapters, websockets, presence systems). Accessed via useReactiveService().
CLI shortcut for stores: reactive create store <name> automates steps 1-4 for Zustand stores. Use manual wiring for plain services, reactive services, or when the CLI doesn't fit.
Core Features & Use Cases
- Declares dependencies as contracts (zustand stores, plain services, reactive services) and wires them into the host app.
- Enables modules to access services via typed hooks (useStore, useService, useReactiveService) against AppDependencies.
- Supports optional dependencies via useOptional and optionalRequires for environment-specific wiring.
Quick Start
Define the contract, implement in the shell, register in the registry, and use it from modules via the corresponding hook.