The missing toolkit
for production backends
Composable building blocks for resilient Node.js backends — built from production experience with distributed systems. Framework-agnostic cores with optional NestJS integration and adaptive auto-tuning.
Designed with intent
Three principles that guide every decision in the BackendKit ecosystem.
Composable over monolithic
Each package solves one problem and solves it well. Mix and match freely — use result without circuit-breaker, or wire the full stack. No hidden coupling.
Framework-agnostic core
Zero-dependency core packages work in any Node.js project. Optional NestJS bindings live in /nestjs subpath exports — import only what you actually use.
Types first
The type system guides you toward correct usage. Errors are values in function signatures — not surprises at runtime. If it compiles, it's explicit.
Explore the libraries
Ten focused packages. Install only what you need — no bundled bloat.
result
v0.2.1Result<T, E> is the semantic base of the entire BackendKit suite. Errors become first-class values in your type signatures: the compiler enforces that callers handle both the success and failure paths, map/flatMap compose chains without nesting, and run() safely wraps any throwing third-party code.
- Zero runtime dependencies
- map, flatMap, andThen, orElse, mapError
- run() catches exceptions at boundaries
- match() for declarative branching
import { ok, fail, type Result } from '@backendkit-labs/result'; interface User { id: string; name: string; email: string } interface NotFoundError { type: 'not_found'; id: string } async function getUser(id: string): Promise<Result<User, NotFoundError>> { const user = await db.users.findById(id); if (!user) return fail({ type: 'not_found', id }); return ok(user); } const result = await getUser('usr_123'); if (result.ok) { console.log(result.value.name); // TypeScript knows: User } else { console.error(result.error.type); // TypeScript knows: 'not_found' }
Your backend teaches itself
to be resilient
Manual threshold tuning is guesswork. A timeout that works in staging breaks in production. auto-learning closes the feedback loop automatically — no ML models, no cloud services.
Records latency percentiles, error rates, and call frequency per endpoint in a sliding window — continuously, in the background.
Z-score analysis and percentile thresholds flag latency spikes, error surges, and unknown traffic patterns before they cascade.
Updates circuit breaker thresholds, bulkhead concurrency limits, and HTTP client timeouts automatically. No restart, no manual tuning.
Built from experience,
not from theory
BackendKit started as internal utilities while working on Node.js backends that needed resilience under real production load — circuit breakers for payment integrations, bulkheads for third-party API isolation, typed errors to make failure visible across large codebases.
The patterns worked. I open-sourced them so others don't have to wire the same pieces together from scratch — or discover the edge cases the hard way.
The packages are battle-tested. The community around them is just getting started. That means your use cases, bug reports, and ideas have real weight in shaping what comes next.
Built from real production problems — payment integrations, third-party API isolation, cascading failures under load. Not theoretical patterns.
Packages designed to compose, not just coexist. Result, circuit breaker, retry, and pipeline share the same error model so they wire together without glue code.
auto-learning closes the feedback loop between observability and resilience config. Statistical analysis — percentiles, z-score — no external ML models required.
Result is within 5% of raw try/catch. Circuit breaker uses an AsyncMutex for safe concurrent state transitions — the trade-off is explicit and measured.
View full results →Start in seconds
Install only what you need. Each package is independent.