@daiso-tech/core - v0.49.1

@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.

This framework is specifically optimized for building modular monoliths or majestic monoliths rather than distributed server architectures.

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 integration and 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.

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

Component The Problem The Daiso Solution
Circuit Breaker Cascading failures from external services. Stops calls to failing services to maintain system stability.
Rate Limiter Network interfaces overwhelmed by traffic. Controls traffic flow to protect services.
Hooks Brittle retry/timeout logic. Agnostic middleware for Retry, Fallback, and Timeout.
Component Use Case Developer Benefit
Lock Shared resources accessed by multiple processes. Ensures mutual exclusion to prevent race conditions.
Semaphore Limiting access to a specific resource. Limits the number of concurrent processes.
Shared Lock Coordinating reads and writes. Manages concurrent reads and exclusive writes.
Component Description Adapters
Cache High-performance caching. Supports multiple store adapters.
FileStorage High-performance file storage. Supports multiple storage adapters.
Component Description Adapters
EventBus Decoupled communication. In-memory or Distributed.
Component Feature
Serde Custom serialization/deserialization that integrates with all other components.
TimeSpan Easily manage durations that seamlessly integrate with all other components.
FileSize Easily manage file-size that seamlessly integrate with all other components.
Collection Precision filtering and transformation for Arrays, Iterables, and AsyncIterables.

npm install