@daiso-tech/core - v0.48.2

@daiso-tech/core

npm version NPM Downloads TypeScript ES Modules License

@daiso-tech/core is a TypeScript-first backend toolkit designed for building resilient web applications and API servers. It provides a suite of decoupled, high-performance components that work seamlessly across any JavaScript runtime.

Explore the Docs | NPM Package


  • Framework Agnostic No Dependency Injection (DI) containers required. Effortlessly integrate with Express, NestJS, AdonisJS, or full-stack frameworks like Next.js, Nuxt, and TanStack Start.
  • Runtime Portability Leverages the Adapter Pattern to decouple your logic from the runtime. Switch between Node.js, Cloudflare Workers (Durable Objects), or AWS Lambda without rewriting core logic.
  • Test-Driven Excellence Every component includes a built-in "in-memory" adapter. Run unit tests instantly without spinning up databases or external infrastructure.
  • Type Safety & DX Deep IntelliSense support and strict type-safety. Designed for auto-imports and modern developer workflows.
  • Standard Schema Support Native integration with Standard Schema, allowing you to use Zod, Valibot, or ArkType for unified runtime validation.

npm install @daiso-tech/core

The @daiso-tech/core ecosystem provides a growing collection of officially maintained primitives for building robust systems:

Circuit Breaker Prevents cascading failures by stopping calls to failing external services.
Rate Limiter Controls traffic flow to protect your network interfaces and services.
Retry Retry middleware with support for different backoffs with jitter.
Timeout Timeout middleware that prevents resource exhaustion by killing long-running tasks.
Fallback Fallback middleware that ensures graceful degradation by returning default values.
Lock Ensures mutual exclusion for shared resources across servers or procceses.
Semaphore Limits the number of concurrent servers or procceses accessing a specific resource.
Shared Lock Reader-writer lock coordinating concurrent reads and exclusive writes.
Cache High-performance caching with support for multiple store adapters.
EventBus Decoupled event-driven communication (In-memory or Distributed via redis).
Hooks Agnostic sync/async middleware that integrates with all components.
Serde Custom serialization/deserialization logic that integrates with all components.
Collection Precision filtering and transformation for Arrays, Iterables, AsyncIterables and ArrayLike objects.
TimeSpan A duration class offering seamless time manipulation while integrating with all components.

npm install @daiso-tech/core