ByteKit is designed for teams that want a typed HTTP layer, async control primitives, and production helpers without stacking several small runtime libraries.
Build reliable networked apps with fewer dependencies
ByteKit gives you a typed HTTP client, async primitives, and production-focused helpers in one package.Quickstart
Install
bytekit and make your first request.HTTP client
Learn the core
ApiClient patterns.Async toolkit
Control retries, concurrency, timing, and flow.
Reference
Review modules, exports, and import paths.
Why ByteKit
- Isomorphic HTTP client for Node.js 18+ and modern browsers
- Built-in resilience with retries, circuit breaker support, caching, and deduplication
- Async utilities such as
retry,parallel,race,timeout,debounceAsync, andthrottleAsync - Zero runtime dependencies
- Modular exports so you can import only what you need
What you can build with it
Typed API layer
Centralize headers, validation, timeouts, and request policies in one client.
Failure-tolerant integrations
Add retries, circuit breaker behavior, rate limiting, and cache-aware patterns.
Heavy async workflows
Coordinate concurrency, backoff, timeouts, and cancellation-friendly flows.
Realtime and streaming flows
Consume NDJSON streams, SSE endpoints, and streamed downloads.
Core modules at a glance
| Area | What it covers | Start here |
|---|---|---|
| HTTP | ApiClient, request config, typed responses, schema validation | /guides/http-client |
| Resilience | RetryPolicy, RateLimiter, RequestCache, RequestDeduplicator | /guides/resilience |
| Async | retry, parallel, sequential, race, timeout, sleep | /guides/async-toolkit |
| Observability | Logger, Profiler, debug helpers | /reference/overview |
| Helpers | Streaming, WebSocket, crypto, storage, cache, env helpers | /reference/overview |
Typical starting point
Create one shared client
Put
ApiClient behind a small app-specific wrapper so your base URL, auth headers, timeout policy, and interceptors live in one place.Validate risky boundaries
Use
zodAdapter or valibotAdapter on requests where a malformed backend response would break your UI or job.Add resilience where failures are expensive
Turn on retries, circuit breaking, and rate limiting for external APIs or unstable internal services.
Example setup
Start with the right guide
Resilience patterns
Combine retries, caching, deduplication, and rate limiting.
Streaming and realtime
Work with NDJSON streams, SSE, and streamed downloads.
Local development
Preview docs locally and validate links before publishing.
Import paths
See the public module entrypoints exposed by the package.
Choose the right import surface
- Use
bytekitif you want convenience and a single import surface. - Use
bytekit/api-clientwhen you only need HTTP features. - Use
bytekit/asyncwhen you only need flow-control utilities. - Use focused helper entrypoints when you want explicit boundaries in a larger codebase.