JSPM

  • Created
  • Published
  • Downloads 2431
  • Score
    100M100P100Q120336F
  • License Apache-2.0

The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.

Package Exports

  • @daiso-tech/core/backoff-policies
  • @daiso-tech/core/cache
  • @daiso-tech/core/cache/contracts
  • @daiso-tech/core/cache/kysely-cache-adapter
  • @daiso-tech/core/cache/memory-cache-adapter
  • @daiso-tech/core/cache/mongodb-cache-adapter
  • @daiso-tech/core/cache/no-op-cache-adapter
  • @daiso-tech/core/cache/redis-cache-adapter
  • @daiso-tech/core/cache/test-utilities
  • @daiso-tech/core/circuit-breaker
  • @daiso-tech/core/circuit-breaker/contracts
  • @daiso-tech/core/circuit-breaker/database-circuit-breaker-adapter
  • @daiso-tech/core/circuit-breaker/kysely-circuit-breaker-storage-adapter
  • @daiso-tech/core/circuit-breaker/memory-circuit-breaker-storage-adapter
  • @daiso-tech/core/circuit-breaker/mongodb-circuit-breaker-storage-adapter
  • @daiso-tech/core/circuit-breaker/no-op-circuit-breaker-adapter
  • @daiso-tech/core/circuit-breaker/no-op-circuit-breaker-storage-adapter
  • @daiso-tech/core/circuit-breaker/policies
  • @daiso-tech/core/circuit-breaker/redis-circuit-breaker-adapter
  • @daiso-tech/core/circuit-breaker/test-utilities
  • @daiso-tech/core/collection
  • @daiso-tech/core/collection/contracts
  • @daiso-tech/core/event-bus
  • @daiso-tech/core/event-bus/contracts
  • @daiso-tech/core/event-bus/memory-event-bus-adapter
  • @daiso-tech/core/event-bus/no-op-event-bus-adapter
  • @daiso-tech/core/event-bus/redis-pub-sub-event-bus-adapter
  • @daiso-tech/core/event-bus/test-utilities
  • @daiso-tech/core/hooks
  • @daiso-tech/core/lock
  • @daiso-tech/core/lock/contracts
  • @daiso-tech/core/lock/kysely-lock-adapter
  • @daiso-tech/core/lock/memory-lock-adapter
  • @daiso-tech/core/lock/mongodb-lock-adapter
  • @daiso-tech/core/lock/no-op-lock-adapter
  • @daiso-tech/core/lock/redis-lock-adapter
  • @daiso-tech/core/lock/test-utilities
  • @daiso-tech/core/namespace
  • @daiso-tech/core/namespace/contracts
  • @daiso-tech/core/rate-limiter
  • @daiso-tech/core/rate-limiter/contracts
  • @daiso-tech/core/rate-limiter/database-rate-limiter-adapter
  • @daiso-tech/core/rate-limiter/kysely-rate-limiter-storage-adapter
  • @daiso-tech/core/rate-limiter/memory-rate-limiter-storage-adapter
  • @daiso-tech/core/rate-limiter/mongodb-rate-limiter-storage-adapter
  • @daiso-tech/core/rate-limiter/no-op-rate-limiter-adapter
  • @daiso-tech/core/rate-limiter/no-op-rate-limiter-storage-adapter
  • @daiso-tech/core/rate-limiter/policies
  • @daiso-tech/core/rate-limiter/redis-rate-limiter-adapter
  • @daiso-tech/core/rate-limiter/test-utilities
  • @daiso-tech/core/resilience
  • @daiso-tech/core/semaphore
  • @daiso-tech/core/semaphore/contracts
  • @daiso-tech/core/semaphore/kysely-semaphore-adapter
  • @daiso-tech/core/semaphore/memory-semaphore-adapter
  • @daiso-tech/core/semaphore/mongodb-semaphore-adapter
  • @daiso-tech/core/semaphore/no-op-semaphore-adapter
  • @daiso-tech/core/semaphore/redis-semaphore-adapter
  • @daiso-tech/core/semaphore/test-utilities
  • @daiso-tech/core/serde
  • @daiso-tech/core/serde/contracts
  • @daiso-tech/core/serde/no-op-serde-adapter
  • @daiso-tech/core/serde/super-json-serde-adapter
  • @daiso-tech/core/serde/test-utilities
  • @daiso-tech/core/shared-lock/contracts
  • @daiso-tech/core/shared-lock/kysely-shared-lock-adapter
  • @daiso-tech/core/shared-lock/memory-shared-lock-adapter
  • @daiso-tech/core/shared-lock/mongodb-shared-lock-adapter
  • @daiso-tech/core/shared-lock/no-op-shared-lock-adapter
  • @daiso-tech/core/shared-lock/redis-shared-lock-adapter
  • @daiso-tech/core/shared-lock/test-utilities
  • @daiso-tech/core/task
  • @daiso-tech/core/task/contracts
  • @daiso-tech/core/time-span
  • @daiso-tech/core/time-span/contracts
  • @daiso-tech/core/utilities

Readme

@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


🚀 Key Features

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

🛠 Quick Start

npm install @daiso-tech/core

📦 Core Components

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

Resilience

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.

Concurrency

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.

Misc

Cache High-performance caching with support for multiple store adapters.
EventBus Decoupled event-driven communication (In-memory or Distributed via redis).

Utilities

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.

🛠 Quick Start

npm install @daiso-tech/core