Architecture and choices
Start with the layer that solves your current problem. Fetcher sends HTTP requests and provides shared defaults, interceptors, and result extraction. It does not require React, a Wow backend, or an authentication service. Its configuration and request pipeline live in packages/fetcher/src/fetcher.ts:150.
| Your decision | Read | What you will decide |
|---|---|---|
| Which packages belong in the application? | Package boundaries | Runtime clients, peer installation requirements, and development tools |
| Where will the client run? | Runtime support | Browser capabilities, Node requirements, and SSR identity scope |
| Where should cross-cutting behavior run? | Request lifecycle | Request/response interception versus result extraction |
| Who owns data and cleanup? | State and resources | Hook state, stale results, subscriptions, and resource disposal |
| What does a rejected request mean? | Failure model | Transport, status, decoding, cancellation, and stream failures |
| Which API style fits? | Integration decisions | Direct calls, declared services, and service-specific integrations |
Add a layer for a concrete responsibility
Use the HTTP guides for ordinary endpoints, service guides when endpoint declarations repeat, and React guides when components need request state.
Each added layer has a contract. SSE needs a readable event stream; CoSec needs its token and refresh endpoints. Installing a client does not create those server capabilities. Stream extraction checks for a readable body in packages/eventstream/src/eventStreamResultExtractor.ts:41.
The Wow client, its React hooks, the generator and the data-view components moved to the Wow repository; see packages that moved.
Keep guarantees at their boundary
TypeScript types describe data but do not validate a response at runtime. UI stale-result protection does not enforce server authorization. A command being processed does not make every projection immediately current. Decide validation, permissions, idempotency, and data freshness with the service that owns them, then connect that service through the appropriate client. The reference documents individual exported APIs; these architecture pages explain where their responsibilities stop.
