@daiso-tech/core 0.49.0 → 0.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -42
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,65 +6,64 @@
|
|
|
6
6
|
[](https://nodejs.org/api/esm.html)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
|
|
9
|
-
`@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.
|
|
9
|
+
`@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.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
This framework is specifically optimized for building **modular monoliths** or **majestic monoliths** rather than distributed server architectures.
|
|
12
|
+
|
|
13
|
+
[**Explore the Docs**](https://daiso-core.vercel.app/docs/Installation) | [**NPM Package**](https://www.npmjs.com/package/@daiso-tech/core)
|
|
12
14
|
|
|
13
15
|
---
|
|
14
16
|
|
|
15
17
|
## 🚀 Key Features
|
|
16
18
|
|
|
17
|
-
* **Framework Agnostic
|
|
18
|
-
* **Runtime Portability
|
|
19
|
-
* **Test-Driven Excellence
|
|
20
|
-
* **Type Safety & DX
|
|
21
|
-
* **Standard Schema Support
|
|
19
|
+
* **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.
|
|
20
|
+
* **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.
|
|
21
|
+
* **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.
|
|
22
|
+
* **Type Safety & DX**: Deep IntelliSense support and strict type-safety. Designed for auto-imports and modern developer workflows.
|
|
23
|
+
* **Standard Schema Support**: Native integration with [Standard Schema](https://standardschema.dev/), allowing you to use **Zod**, **Valibot**, or **ArkType** for unified runtime validation.
|
|
22
24
|
|
|
23
25
|
---
|
|
24
26
|
|
|
25
|
-
## 🛠 Quick Start
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npm install @daiso-tech/core
|
|
29
|
-
```
|
|
30
|
-
|
|
31
27
|
## 📦 Core Components
|
|
32
28
|
|
|
33
29
|
The `@daiso-tech/core` ecosystem provides a growing collection of officially maintained primitives for building robust systems:
|
|
34
30
|
|
|
35
|
-
### Resilience
|
|
36
|
-
| | |
|
|
31
|
+
### 🛡️ Resilience
|
|
32
|
+
| Component | The Problem | The Daiso Solution |
|
|
33
|
+
| :--- | :--- | :--- |
|
|
34
|
+
| **Circuit Breaker** | Cascading failures from external services. | Stops calls to failing services to maintain system stability. |
|
|
35
|
+
| **Rate Limiter** | Network interfaces overwhelmed by traffic. | Controls traffic flow to protect services. |
|
|
36
|
+
| **Hooks** | Brittle retry/timeout logic. | Agnostic middleware for **Retry, Fallback, and Timeout**. |
|
|
37
|
+
|
|
38
|
+
### 🚦 Concurrency
|
|
39
|
+
| Component | Use Case | Developer Benefit |
|
|
40
|
+
| :--- | :--- | :--- |
|
|
41
|
+
| **Lock** | Shared resources accessed by multiple processes. | Ensures mutual exclusion to prevent race conditions. |
|
|
42
|
+
| **Semaphore** | Limiting access to a specific resource. | Limits the number of concurrent processes. |
|
|
43
|
+
| **Shared Lock** | Coordinating reads and writes. | Manages concurrent reads and exclusive writes. |
|
|
44
|
+
|
|
45
|
+
### 💾 Storage
|
|
46
|
+
| Component | Description | Adapters |
|
|
47
|
+
| :--- | :--- | :--- |
|
|
48
|
+
| **Cache** | High-performance caching. | Supports multiple store adapters. |
|
|
49
|
+
| **FileStorage** | High-performance file storage. | Supports multiple storage adapters. |
|
|
50
|
+
|
|
51
|
+
### 📥 Messaging
|
|
52
|
+
| Component | Description | Adapters |
|
|
53
|
+
| :--- | :--- | :--- |
|
|
54
|
+
| **EventBus** | Decoupled communication. | In-memory or Distributed. |
|
|
55
|
+
|
|
56
|
+
### 🧰 Utilities
|
|
57
|
+
| Component | Feature |
|
|
37
58
|
| :--- | :--- |
|
|
38
|
-
| **
|
|
39
|
-
| **
|
|
40
|
-
| **
|
|
41
|
-
| **
|
|
42
|
-
| **Fallback** | Fallback middleware that ensures graceful degradation by returning default values. |
|
|
43
|
-
|
|
44
|
-
### Concurrency
|
|
45
|
-
| | |
|
|
46
|
-
| :--- | :--- |
|
|
47
|
-
| **Lock** | Ensures mutual exclusion for shared resources across servers or procceses. |
|
|
48
|
-
| **Semaphore** | Limits the number of concurrent servers or procceses accessing a specific resource. |
|
|
49
|
-
| **Shared Lock** | Reader-writer lock coordinating concurrent reads and exclusive writes. |
|
|
50
|
-
|
|
51
|
-
### Misc
|
|
52
|
-
| | |
|
|
53
|
-
| :--- | :--- |
|
|
54
|
-
| **Cache** | High-performance caching with support for multiple store adapters. |
|
|
55
|
-
| **EventBus** | Decoupled event-driven communication (In-memory or Distributed via redis). |
|
|
59
|
+
| **Serde** | Custom serialization/deserialization that integrates with all other components. |
|
|
60
|
+
| **TimeSpan** | Easily manage durations that seamlessly integrate with all other components. |
|
|
61
|
+
| **FileSize** | Easily manage file-size that seamlessly integrate with all other components. |
|
|
62
|
+
| **Collection** | Precision filtering and transformation for Arrays, Iterables, and **AsyncIterables**. |
|
|
56
63
|
|
|
57
|
-
### Utilities
|
|
58
|
-
| | |
|
|
59
|
-
| :--- | :--- |
|
|
60
|
-
| **Hooks** | Agnostic sync/async middleware that integrates with all components. |
|
|
61
|
-
| **Serde** | Custom serialization/deserialization logic that integrates with all components. |
|
|
62
|
-
| **Collection** | Precision filtering and transformation for Arrays, Iterables, AsyncIterables and ArrayLike objects. |
|
|
63
|
-
| **TimeSpan** | A duration class offering seamless time manipulation while integrating with all components. |
|
|
64
64
|
---
|
|
65
65
|
|
|
66
66
|
## 🛠 Quick Start
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
npm install @daiso-tech/core
|
|
70
|
-
```
|
|
69
|
+
npm install @daiso-tech/core
|