@futdevpro/nts-dynamo 1.15.382 → 1.15.386

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 CHANGED
@@ -6,349 +6,349 @@ delivery evidence. Its aggregate operations projection exposes only state/due/ex
6
6
  It starts no timer, poller or background worker.
7
7
 
8
8
  ![Dynamo-NTS Logo](src/_assets/dynamo-nts-logo-256.png)
9
-
10
- **Dynamo-NTS** (NodeTS) is a comprehensive backend framework for building robust, secure, and scalable Node.js applications with TypeScript. Built on top of [Dynamo FSM](https://www.npmjs.com/package/@futdevpro/fsm-dynamo) (`@futdevpro/fsm-dynamo`), it provides a structured approach to server-side development with clear separation of concerns, extensive configuration options, and production-ready implementations for common backend tasks.
11
-
12
- Dynamo-NTS uses **[Dynamo FSM](https://www.npmjs.com/package/@futdevpro/fsm-dynamo)** as its foundational layer, implementing the server-side components of the FSM architecture. All core interfaces, types, and utilities are provided by FSM, ensuring consistency and type safety across the entire Dynamo ecosystem.
13
-
14
- Dynamo-NTS is part of the unified **Dynamo ecosystem**, a full-stack development framework designed to accelerate the development of scalable web applications. The ecosystem consists of interconnected packages that work together seamlessly, with Dynamo-NTS serving as the backend implementation layer. The frontend counterpart is **[Dynamo NGX](https://www.npmjs.com/package/@futdevpro/ngx-dynamo)**, which uses **[Dynamo NGX Models](https://www.npmjs.com/package/@futdevpro/ngx-dynamo-models)** for type-safe model definitions.
15
-
16
- ### Design Philosophy
17
-
18
- Dynamo-NTS is built with two key principles:
19
-
20
- - **Full Override Capability**: Every component, service, and class can be overridden or extended. The framework provides a solid foundation with sensible defaults, but you have complete control to customize or replace any part to fit your specific needs. This makes Dynamo-NTS highly customizable and adaptable to any project requirements.
21
-
22
- - **Complete Type Information**: All types, interfaces, and definitions are included in the compiled output. This ensures excellent readability and maintainability—everything you need is available at compile time through TypeScript's type system, providing full IntelliSense support and eliminating the need to reference external documentation during development.
23
-
24
- ### Simplified System Definitions
25
-
26
- Dynamo-NTS simplifies complex system definitions by abstracting common backend infrastructure into simple parameterization. Instead of manually configuring various libraries and services, you define your application through straightforward parameter objects:
27
-
28
- - **Express Usage**: HTTP/HTTPS server setup, routing, middleware, and error handling are configured through `DyNTS_App_Params`, `DyNTS_Http_Settings`, and `DyNTS_RoutingModule` parameters (simplifies Express server initialization and route management)
29
- - **MongoDB/Mongoose Usage**: Database connections, models, schemas, and operations are managed through `DyNTS_DBService` and `DyNTS_DataService` with simple data model parameter definitions (simplifies Mongoose schema creation and model management)
30
- - **Socket.io Usage**: Real-time communication setup, event handling, and presence tracking are configured through `DyNTS_SocketServerService` parameters and the `DyNTS_AppExtended` class (simplifies Socket.io server initialization and event management)
31
- - **Nodemailer Usage**: Email sending with templating, attachments, and async delivery is handled through `DyNTS_EmailService` with template component definitions (simplifies Nodemailer transporter setup and email template management)
32
- - **OAuth2 Implementation**: Complete OAuth2.0 protocol flows including authorization codes, token exchange, and refresh tokens are managed through `DyNTS_OAuth2_Controller` and `DyNTS_OAuth2_AuthService` (simplifies complex OAuth2 flow implementation)
33
- - **Axios Usage**: HTTP client requests to external APIs are standardized through `DyNTS_ApiService` with `DyNTS_ApiCall_Params` configuration (simplifies Axios request setup, error handling, and response management)
34
- - **Discord.js / Slack / Teams Bot Development**: Platform-agnostic bot framework through `DyNTS_Bot_MessagingProvider_ServiceBase` and bot modules (simplifies Discord.js, Slack, and Teams bot development with unified interfaces)
35
- - **OpenAI / AI Provider Integration**: AI/LLM operations including chat, embeddings, and vector search are abstracted through `DyNTS_AI_Provider_ServiceBase` and provider implementations (simplifies OpenAI SDK usage and enables multi-provider architecture)
36
- - **Location Tracking**: Optional, local-only IP geolocation through `geoip-lite`; addresses are not sent to an external service or written to logs by Dynamo-NTS
37
-
38
- This parameterization approach eliminates boilerplate code and provides a consistent, type-safe interface for all backend operations. Instead of learning multiple library APIs and their configuration patterns, developers work with unified Dynamo-NTS parameter objects that handle the underlying complexity.
39
-
40
- ### Content-free process diagnostics
41
-
42
- `DyNTS_App` projects bootstrap failures, unhandled promise rejections, database connection/runtime failures,
43
- HTTP/HTTPS server errors, routing failures and Express fallbacks through the versioned
44
- `dynts-safe-diagnostic/1` contract before framework-owned logging or error forwarding. The public allowlist is
45
- limited to `contractVersion`, `code`, `stage`, `causeType`, `fingerprint` and `status`. Raw error messages,
46
- stacks, rejected promises, requests and database URIs are excluded. The fingerprint is derived only from the
47
- allowlisted classification, never from raw failure content.
48
-
49
- Consumers can use `DyNTS_SafeDiagnostic_ControlService.project()` when they need the same deterministic
50
- projection without logging, `report()` for safe framework logging, and `toError()` when a content-free
51
- `DyFM_Error` must cross an existing error-handler boundary. See
52
- [`__documentations/2026-08-22-content-free-process-error-boundary.md`](./__documentations/2026-08-22-content-free-process-error-boundary.md)
53
- for the normative boundary and verification matrix.
54
-
55
- ## Table of Contents
56
-
57
- - [Installation](#installation)
58
- - [Quick Start](#quick-start)
59
- - [Core Concepts](#core-concepts)
60
- - [Modules Overview](#modules-overview)
61
- - [Usage Examples](#usage-examples)
62
- - [Ecosystem Integration](#ecosystem-integration)
63
- - [API Reference](#api-reference)
64
-
65
- ## Installation
66
-
67
- Install Dynamo-NTS using pnpm (recommended) or npm:
68
-
69
- ```bash
70
- pnpm add @futdevpro/dynamo-nts
71
- # or
72
- npm install @futdevpro/dynamo-nts
73
- ```
74
-
75
- ### Peer Dependencies
76
-
77
- Dynamo-NTS requires peer dependencies that are divided into two categories: core dependencies (required for the main module) and module-specific dependencies (required only when using specific modules).
78
-
79
- #### Core Dependencies (Required)
80
-
81
- These dependencies are required for the main Dynamo-NTS functionality:
82
-
83
- - [`@futdevpro/fsm-dynamo`](https://www.npmjs.com/package/@futdevpro/fsm-dynamo) - The foundational package providing core interfaces and utilities (always required)
84
- - `express` - Web framework for Node.js (simplified through Dynamo-NTS parameterization)
85
- - `mongoose` - MongoDB object modeling (simplified through Dynamo-NTS data services)
86
- - `axios` - HTTP client (simplified through Dynamo-NTS API service)
87
- - `body-parser` - Request body parsing middleware
88
- - `dotenv` - Environment variable management
89
- - `rxjs` - Reactive programming library
90
- - `@types/express` - TypeScript types for Express
91
- - `@types/node` - TypeScript types for Node.js
92
- - `ts-node` - TypeScript execution environment
93
-
94
- Install core dependencies:
95
-
96
- ```bash
97
- pnpm add @futdevpro/fsm-dynamo express mongoose axios body-parser dotenv rxjs @types/express @types/node ts-node
98
- ```
99
-
100
- #### Module-Specific Dependencies (Optional)
101
-
102
- These dependencies are only required when using specific modules:
103
-
104
- - **Socket Module**: `socket.io` - Real-time communication (simplified through Dynamo-NTS socket services)
105
- - **Email Service**: `nodemailer` - Email sending (simplified through Dynamo-NTS email services)
106
- - **Usage Module**: `geoip-lite` and `@types/geoip-lite` - optional, local-only IP geolocation. The provider is loaded only when a lookup is requested. Without it, lookup methods return `null` and the rest of Dynamo-NTS remains usable. The supported secure `geoip-lite` line requires Node.js 24 or newer.
107
- - **Bot Module (Discord)**: `discord.js` - Discord bot development (simplified through Dynamo-NTS bot module)
108
- - **AI Module (OpenAI)**: `openai` - OpenAI API integration (simplified through Dynamo-NTS AI module)
109
-
110
- The GeoIP lookup itself does not transmit or log an address. Calling the Usage module can persist the
111
- request address and derived location in the consumer's own data store. Consumers enabling that capability
112
- must define the applicable lawful basis, user-facing transparency, access controls, retention and deletion.
113
-
114
- Install module-specific dependencies as needed:
115
-
116
- ```bash
117
- # For Socket module
118
- pnpm add socket.io
119
-
120
- # For Email service
121
- pnpm add nodemailer
122
-
123
- # For Usage module
124
- pnpm add geoip-lite@^2.0.3 @types/geoip-lite@^1.4.4
125
-
126
- # For Bot module (Discord)
127
- pnpm add discord.js
128
-
129
- # For AI module (OpenAI)
130
- pnpm add openai
131
- ```
132
-
133
- ## Quick Start
134
-
135
- The following example demonstrates how to set up a basic Dynamo-NTS application with routing and socket support:
136
-
137
- ```typescript
138
- import {
139
- DyNTS_AppExtended,
140
- DyNTS_App_Params,
141
- DyNTS_GlobalService_Settings,
142
- DyNTS_Http_Settings,
143
- DyNTS_RoutingModule
144
- } from '@futdevpro/nts-dynamo';
145
- import {
146
- DyNTS_SocketServerService
147
- } from '@futdevpro/nts-dynamo/socket';
148
- import { DyFM_usageSession_dataParams } from '@futdevpro/fsm-dynamo/usage';
149
- import { DyFM_customData_dataParams } from '@futdevpro/fsm-dynamo/custom-data';
150
- import { DyNTS_getUsageRoutingModule } from '@futdevpro/nts-dynamo/usage';
151
- import { DyNTS_getTestRoutingModule } from '@futdevpro/nts-dynamo/test';
152
-
153
- import { AuthService } from './core-services/auth.service';
154
- import { Email_ServiceCollection } from './core-services/email.service-collection';
155
- import { User_Controller } from './routes/user/user.controller';
156
- import { Chat_SocketServerService } from './socket-services/chat.socket-server-service';
157
-
158
- export class App extends DyNTS_AppExtended {
159
-
160
- getAppParams(): DyNTS_App_Params {
161
- return new DyNTS_App_Params({
162
- name: 'My Application',
163
- version: '1.0.0',
164
- dbName: 'myapp',
165
- dbUri: process.env.MONGO_URL || 'mongodb://localhost:27017/myapp',
166
- systemShortCodeName: 'MYAPP',
167
- });
168
- }
169
-
170
- getGlobalServiceCollection(): DyNTS_GlobalService_Settings {
171
- return {
172
- authService: AuthService.getInstance(),
173
- emailServiceCollection: Email_ServiceCollection.getInstance(),
174
- dbModels: [
175
- // Your data model parameters here
176
- DyFM_usageSession_dataParams,
177
- DyFM_customData_dataParams,
178
- ],
179
- };
180
- }
181
-
182
- getPortSettings(): DyNTS_Http_Settings {
183
- return new DyNTS_Http_Settings({
184
- httpPort: 3000,
185
- });
186
- }
187
-
188
- getRoutingModules(): DyNTS_RoutingModule[] {
189
- return [
190
- new DyNTS_RoutingModule({
191
- route: '/user',
192
- controllers: [
193
- User_Controller.getInstance(),
194
- ],
195
- }),
196
- DyNTS_getTestRoutingModule(),
197
- DyNTS_getUsageRoutingModule(),
198
- ];
199
- }
200
-
201
- getSocketServices(): DyNTS_SocketServerService<any>[] {
202
- return [
203
- Chat_SocketServerService.getInstance(),
204
- ];
205
- }
206
- }
207
-
208
- // Start the application
209
- const app = new App();
210
- ```
211
-
212
- ## Core Concepts
213
-
214
- Dynamo-NTS uses [Dynamo FSM](https://www.npmjs.com/package/@futdevpro/fsm-dynamo) as its foundation, implementing all server-side components defined in the FSM architecture. All types, interfaces, and base models are provided by FSM, ensuring full type safety and consistency.
215
-
216
- ### Extensibility and Customization
217
-
218
- Dynamo-NTS is designed with extensibility in mind. Every component, service, and class can be overridden or extended to meet your specific requirements:
219
-
220
- - **Service Override**: All services (authentication, email, data services, etc.) can be extended or completely replaced with custom implementations
221
- - **Method Override**: Abstract methods in base classes allow you to customize behavior while maintaining the framework structure
222
- - **Configuration Override**: Global settings, route security, and application parameters can be overridden at any level
223
- - **Type Safety**: All overrides maintain full TypeScript type safety, with all types and interfaces available at compile time
224
-
225
- This design philosophy ensures that Dynamo-NTS provides a solid foundation while remaining fully customizable for your specific use cases.
226
-
227
- ### Complete Type Information
228
-
229
- All types, interfaces, and definitions are included in the compiled output, ensuring excellent readability and maintainability. When you compile your project, you have access to:
230
-
231
- - Complete type definitions for all services, models, and interfaces
232
- - Full IntelliSense support in your IDE
233
- - Compile-time type checking for all framework components
234
- - Self-documenting code through TypeScript's type system
235
-
236
- This approach eliminates the need to reference external documentation during development—everything you need is available in your IDE's autocomplete and type hints.
237
-
238
- ### Application Classes
239
-
240
- Dynamo-NTS provides two main application base classes that simplify Express server setup:
241
-
242
- - **`DyNTS_App`**: Basic application class for standard HTTP server applications without real-time socket support
243
- - **`DyNTS_AppExtended`**: Extended application class that includes built-in socket server capabilities for real-time communication (simplifies Socket.io setup)
244
-
245
- Both classes abstract away Express server configuration, requiring you to implement several abstract methods with simple parameter objects:
246
-
247
- - `getAppParams()`: Define application parameters (name, version, database name, etc.) - replaces Express app initialization
248
- - `getGlobalServiceCollection()`: Configure global services (authentication, email, database models) - replaces manual service registration
249
- - `getPortSettings()`: Configure HTTP/HTTPS ports - replaces Express server.listen() configuration
250
- - `getRoutingModules()`: Define API routes and controllers - replaces Express router setup
251
-
252
- ### Data Services
253
-
254
- Data services provide a structured way to interact with MongoDB, simplifying Mongoose model and schema definitions:
255
-
256
- - **`DyNTS_DBService<T>`**: Low-level MongoDB service for direct database operations (simplifies Mongoose model creation)
257
- - **`DyNTS_DataService<T>`**: High-level data service with business logic, validation, and dependency management (simplifies MongoDB CRUD operations)
258
- - **`DyNTS_ArchiveDataService<T>`**: Service for managing archived data in separate collections
259
-
260
- Instead of manually creating Mongoose schemas and models, you define data models through `DyFM_DataModel_Params` (from FSM), and Dynamo-NTS handles schema generation, model creation, and connection management automatically. Data services handle CRUD operations, data validation, dependency tracking, and provide methods for searching, filtering, and managing data relationships.
261
-
262
- ### Atomic MongoDB transactions
263
-
264
- `DyNTS_MongoTransaction_ControlService` is the shared Bedrock entry point for business operations that must
265
- commit several MongoDB writes as one unit. The callback receives the same Mongoose `ClientSession` that must
266
- be attached to every participating query or write:
267
-
268
- ```typescript
269
- import { ClientSession } from 'mongoose';
270
-
271
- import { DyNTS_MongoTransaction_ControlService } from '@futdevpro/nts-dynamo';
272
-
273
- const transactionService: DyNTS_MongoTransaction_ControlService =
274
- DyNTS_MongoTransaction_ControlService.getInstance();
275
-
276
- const pipelineId: string = await transactionService.execute<string>({
277
- transactionName: 'publish-pipeline-version',
278
- issuer: 'pipeline-persistence-service',
279
- maxCommitTimeMs: 3_000,
280
- task: async (session: ClientSession): Promise<string> => {
281
- // Every MongoDB operation in this callback must use `session`.
282
- // Example: await model.updateOne(filter, update, { session: session });
283
- // Example: await auditModel.create([ event ], { session: session });
284
- return 'pipeline-id';
285
- },
286
- });
287
- ```
288
-
289
- The service uses snapshot reads, majority writes and primary routing, always closes the session, and emits
290
- stable content-free error codes. MongoDB transactions require a replica set or sharded deployment; a standalone
291
- MongoDB instance is intentionally not treated as transaction-capable. Mongoose may retry the callback after a
292
- transient transaction error, so the callback must not perform non-transactional side effects such as sending
293
- messages or mutating external systems.
294
-
295
- ### Routing System
296
-
297
- The routing system provides a structured approach to defining RESTful API endpoints, simplifying Express router configuration:
298
-
299
- - **`DyNTS_RoutingModule`**: Groups related controllers under a common route path (replaces Express Router setup)
300
- - **`DyNTS_Controller`**: Abstract base class for defining HTTP endpoints (simplifies Express route handlers)
301
- - **`DyNTS_Endpoint_Params`**: Configuration for individual API endpoints (replaces Express route definitions)
302
-
303
- Instead of manually setting up Express routers and route handlers, you define endpoints through parameter objects. Controllers define endpoints with support for:
304
- - Multiple HTTP methods (GET, POST, PUT, PATCH, DELETE)
305
- - Pre-processing middleware (authentication, validation)
306
- - Task functions for handling requests
307
- - Route security levels (open, secure, both)
308
-
309
- ### Global Services
310
-
311
- The `DyNTS_GlobalService` provides centralized access to:
312
-
313
- - Authentication service
314
- - Email service collection
315
- - Database models registry
316
- - Error handlers
317
- - Socket server instances
318
-
319
- ### Authentication
320
-
321
- Dynamo-NTS provides an abstract `DyNTS_AuthService` class that you can extend to implement your authentication logic. The framework supports:
322
-
323
- - Token-based authentication
324
- - OAuth2 flows (via the OAuth2 module)
325
- - Session management
326
- - Route-level security configuration
327
-
328
- For product-local accounts, the optional `@futdevpro/nts-dynamo/account-security` entry point adds production
329
- security primitives without coupling a product to a shared account provider:
330
-
331
- - versioned adaptive password hashing and rehash detection;
332
- - hash-only email-verification and password-reset challenges with atomic one-time consumption;
333
- - opaque, hash-only access credentials backed by revocable server-side sessions;
334
- - one-time refresh rotation, replay detection, session listing and subject-wide revocation.
335
-
336
- Persistence remains application-owned through explicit atomic adapters. Transports must never put the raw
337
- credentials in URLs, logs, analytics or durable client storage. A consuming application must also apply its
338
- rate-limit, authorization, cookie/storage and audit-redaction policy at the API boundary.
339
-
340
- ### Distributed rate limiting
341
-
342
- The `@futdevpro/nts-dynamo/rate-limit` entry point provides an atomic rate-limit boundary for HTTP services:
343
-
344
- - an exact sliding-window in-memory store for deterministic tests and explicitly single-instance development;
345
- - an application-owned shared-store contract for production deployments;
346
- - a production configuration gate that requires both shared persistence and explicit opaque subject/endpoint
347
- extractors;
348
- - validated positive limits, windows and weighted request costs with stable, content-free failures;
349
- - trusted `req.ip` as the safe local default instead of reading caller-controlled forwarding headers directly;
350
- - explicit opportunistic local cleanup with no timer, polling loop or hidden background task.
351
-
9
+
10
+ **Dynamo-NTS** (NodeTS) is a comprehensive backend framework for building robust, secure, and scalable Node.js applications with TypeScript. Built on top of [Dynamo FSM](https://www.npmjs.com/package/@futdevpro/fsm-dynamo) (`@futdevpro/fsm-dynamo`), it provides a structured approach to server-side development with clear separation of concerns, extensive configuration options, and production-ready implementations for common backend tasks.
11
+
12
+ Dynamo-NTS uses **[Dynamo FSM](https://www.npmjs.com/package/@futdevpro/fsm-dynamo)** as its foundational layer, implementing the server-side components of the FSM architecture. All core interfaces, types, and utilities are provided by FSM, ensuring consistency and type safety across the entire Dynamo ecosystem.
13
+
14
+ Dynamo-NTS is part of the unified **Dynamo ecosystem**, a full-stack development framework designed to accelerate the development of scalable web applications. The ecosystem consists of interconnected packages that work together seamlessly, with Dynamo-NTS serving as the backend implementation layer. The frontend counterpart is **[Dynamo NGX](https://www.npmjs.com/package/@futdevpro/ngx-dynamo)**, which uses **[Dynamo NGX Models](https://www.npmjs.com/package/@futdevpro/ngx-dynamo-models)** for type-safe model definitions.
15
+
16
+ ### Design Philosophy
17
+
18
+ Dynamo-NTS is built with two key principles:
19
+
20
+ - **Full Override Capability**: Every component, service, and class can be overridden or extended. The framework provides a solid foundation with sensible defaults, but you have complete control to customize or replace any part to fit your specific needs. This makes Dynamo-NTS highly customizable and adaptable to any project requirements.
21
+
22
+ - **Complete Type Information**: All types, interfaces, and definitions are included in the compiled output. This ensures excellent readability and maintainability—everything you need is available at compile time through TypeScript's type system, providing full IntelliSense support and eliminating the need to reference external documentation during development.
23
+
24
+ ### Simplified System Definitions
25
+
26
+ Dynamo-NTS simplifies complex system definitions by abstracting common backend infrastructure into simple parameterization. Instead of manually configuring various libraries and services, you define your application through straightforward parameter objects:
27
+
28
+ - **Express Usage**: HTTP/HTTPS server setup, routing, middleware, and error handling are configured through `DyNTS_App_Params`, `DyNTS_Http_Settings`, and `DyNTS_RoutingModule` parameters (simplifies Express server initialization and route management)
29
+ - **MongoDB/Mongoose Usage**: Database connections, models, schemas, and operations are managed through `DyNTS_DBService` and `DyNTS_DataService` with simple data model parameter definitions (simplifies Mongoose schema creation and model management)
30
+ - **Socket.io Usage**: Real-time communication setup, event handling, and presence tracking are configured through `DyNTS_SocketServerService` parameters and the `DyNTS_AppExtended` class (simplifies Socket.io server initialization and event management)
31
+ - **Nodemailer Usage**: Email sending with templating, attachments, and async delivery is handled through `DyNTS_EmailService` with template component definitions (simplifies Nodemailer transporter setup and email template management)
32
+ - **OAuth2 Implementation**: Complete OAuth2.0 protocol flows including authorization codes, token exchange, and refresh tokens are managed through `DyNTS_OAuth2_Controller` and `DyNTS_OAuth2_AuthService` (simplifies complex OAuth2 flow implementation)
33
+ - **Axios Usage**: HTTP client requests to external APIs are standardized through `DyNTS_ApiService` with `DyNTS_ApiCall_Params` configuration (simplifies Axios request setup, error handling, and response management)
34
+ - **Discord.js / Slack / Teams Bot Development**: Platform-agnostic bot framework through `DyNTS_Bot_MessagingProvider_ServiceBase` and bot modules (simplifies Discord.js, Slack, and Teams bot development with unified interfaces)
35
+ - **OpenAI / AI Provider Integration**: AI/LLM operations including chat, embeddings, and vector search are abstracted through `DyNTS_AI_Provider_ServiceBase` and provider implementations (simplifies OpenAI SDK usage and enables multi-provider architecture)
36
+ - **Location Tracking**: Optional, local-only IP geolocation through `geoip-lite`; addresses are not sent to an external service or written to logs by Dynamo-NTS
37
+
38
+ This parameterization approach eliminates boilerplate code and provides a consistent, type-safe interface for all backend operations. Instead of learning multiple library APIs and their configuration patterns, developers work with unified Dynamo-NTS parameter objects that handle the underlying complexity.
39
+
40
+ ### Content-free process diagnostics
41
+
42
+ `DyNTS_App` projects bootstrap failures, unhandled promise rejections, database connection/runtime failures,
43
+ HTTP/HTTPS server errors, routing failures and Express fallbacks through the versioned
44
+ `dynts-safe-diagnostic/1` contract before framework-owned logging or error forwarding. The public allowlist is
45
+ limited to `contractVersion`, `code`, `stage`, `causeType`, `fingerprint` and `status`. Raw error messages,
46
+ stacks, rejected promises, requests and database URIs are excluded. The fingerprint is derived only from the
47
+ allowlisted classification, never from raw failure content.
48
+
49
+ Consumers can use `DyNTS_SafeDiagnostic_ControlService.project()` when they need the same deterministic
50
+ projection without logging, `report()` for safe framework logging, and `toError()` when a content-free
51
+ `DyFM_Error` must cross an existing error-handler boundary. See
52
+ [`__documentations/2026-08-22-content-free-process-error-boundary.md`](./__documentations/2026-08-22-content-free-process-error-boundary.md)
53
+ for the normative boundary and verification matrix.
54
+
55
+ ## Table of Contents
56
+
57
+ - [Installation](#installation)
58
+ - [Quick Start](#quick-start)
59
+ - [Core Concepts](#core-concepts)
60
+ - [Modules Overview](#modules-overview)
61
+ - [Usage Examples](#usage-examples)
62
+ - [Ecosystem Integration](#ecosystem-integration)
63
+ - [API Reference](#api-reference)
64
+
65
+ ## Installation
66
+
67
+ Install Dynamo-NTS using pnpm (recommended) or npm:
68
+
69
+ ```bash
70
+ pnpm add @futdevpro/dynamo-nts
71
+ # or
72
+ npm install @futdevpro/dynamo-nts
73
+ ```
74
+
75
+ ### Peer Dependencies
76
+
77
+ Dynamo-NTS requires peer dependencies that are divided into two categories: core dependencies (required for the main module) and module-specific dependencies (required only when using specific modules).
78
+
79
+ #### Core Dependencies (Required)
80
+
81
+ These dependencies are required for the main Dynamo-NTS functionality:
82
+
83
+ - [`@futdevpro/fsm-dynamo`](https://www.npmjs.com/package/@futdevpro/fsm-dynamo) - The foundational package providing core interfaces and utilities (always required)
84
+ - `express` - Web framework for Node.js (simplified through Dynamo-NTS parameterization)
85
+ - `mongoose` - MongoDB object modeling (simplified through Dynamo-NTS data services)
86
+ - `axios` - HTTP client (simplified through Dynamo-NTS API service)
87
+ - `body-parser` - Request body parsing middleware
88
+ - `dotenv` - Environment variable management
89
+ - `rxjs` - Reactive programming library
90
+ - `@types/express` - TypeScript types for Express
91
+ - `@types/node` - TypeScript types for Node.js
92
+ - `ts-node` - TypeScript execution environment
93
+
94
+ Install core dependencies:
95
+
96
+ ```bash
97
+ pnpm add @futdevpro/fsm-dynamo express mongoose axios body-parser dotenv rxjs @types/express @types/node ts-node
98
+ ```
99
+
100
+ #### Module-Specific Dependencies (Optional)
101
+
102
+ These dependencies are only required when using specific modules:
103
+
104
+ - **Socket Module**: `socket.io` - Real-time communication (simplified through Dynamo-NTS socket services)
105
+ - **Email Service**: `nodemailer` - Email sending (simplified through Dynamo-NTS email services)
106
+ - **Usage Module**: `geoip-lite` and `@types/geoip-lite` - optional, local-only IP geolocation. The provider is loaded only when a lookup is requested. Without it, lookup methods return `null` and the rest of Dynamo-NTS remains usable. The supported secure `geoip-lite` line requires Node.js 24 or newer.
107
+ - **Bot Module (Discord)**: `discord.js` - Discord bot development (simplified through Dynamo-NTS bot module)
108
+ - **AI Module (OpenAI)**: `openai` - OpenAI API integration (simplified through Dynamo-NTS AI module)
109
+
110
+ The GeoIP lookup itself does not transmit or log an address. Calling the Usage module can persist the
111
+ request address and derived location in the consumer's own data store. Consumers enabling that capability
112
+ must define the applicable lawful basis, user-facing transparency, access controls, retention and deletion.
113
+
114
+ Install module-specific dependencies as needed:
115
+
116
+ ```bash
117
+ # For Socket module
118
+ pnpm add socket.io
119
+
120
+ # For Email service
121
+ pnpm add nodemailer
122
+
123
+ # For Usage module
124
+ pnpm add geoip-lite@^2.0.3 @types/geoip-lite@^1.4.4
125
+
126
+ # For Bot module (Discord)
127
+ pnpm add discord.js
128
+
129
+ # For AI module (OpenAI)
130
+ pnpm add openai
131
+ ```
132
+
133
+ ## Quick Start
134
+
135
+ The following example demonstrates how to set up a basic Dynamo-NTS application with routing and socket support:
136
+
137
+ ```typescript
138
+ import {
139
+ DyNTS_AppExtended,
140
+ DyNTS_App_Params,
141
+ DyNTS_GlobalService_Settings,
142
+ DyNTS_Http_Settings,
143
+ DyNTS_RoutingModule
144
+ } from '@futdevpro/nts-dynamo';
145
+ import {
146
+ DyNTS_SocketServerService
147
+ } from '@futdevpro/nts-dynamo/socket';
148
+ import { DyFM_usageSession_dataParams } from '@futdevpro/fsm-dynamo/usage';
149
+ import { DyFM_customData_dataParams } from '@futdevpro/fsm-dynamo/custom-data';
150
+ import { DyNTS_getUsageRoutingModule } from '@futdevpro/nts-dynamo/usage';
151
+ import { DyNTS_getTestRoutingModule } from '@futdevpro/nts-dynamo/test';
152
+
153
+ import { AuthService } from './core-services/auth.service';
154
+ import { Email_ServiceCollection } from './core-services/email.service-collection';
155
+ import { User_Controller } from './routes/user/user.controller';
156
+ import { Chat_SocketServerService } from './socket-services/chat.socket-server-service';
157
+
158
+ export class App extends DyNTS_AppExtended {
159
+
160
+ getAppParams(): DyNTS_App_Params {
161
+ return new DyNTS_App_Params({
162
+ name: 'My Application',
163
+ version: '1.0.0',
164
+ dbName: 'myapp',
165
+ dbUri: process.env.MONGO_URL || 'mongodb://localhost:27017/myapp',
166
+ systemShortCodeName: 'MYAPP',
167
+ });
168
+ }
169
+
170
+ getGlobalServiceCollection(): DyNTS_GlobalService_Settings {
171
+ return {
172
+ authService: AuthService.getInstance(),
173
+ emailServiceCollection: Email_ServiceCollection.getInstance(),
174
+ dbModels: [
175
+ // Your data model parameters here
176
+ DyFM_usageSession_dataParams,
177
+ DyFM_customData_dataParams,
178
+ ],
179
+ };
180
+ }
181
+
182
+ getPortSettings(): DyNTS_Http_Settings {
183
+ return new DyNTS_Http_Settings({
184
+ httpPort: 3000,
185
+ });
186
+ }
187
+
188
+ getRoutingModules(): DyNTS_RoutingModule[] {
189
+ return [
190
+ new DyNTS_RoutingModule({
191
+ route: '/user',
192
+ controllers: [
193
+ User_Controller.getInstance(),
194
+ ],
195
+ }),
196
+ DyNTS_getTestRoutingModule(),
197
+ DyNTS_getUsageRoutingModule(),
198
+ ];
199
+ }
200
+
201
+ getSocketServices(): DyNTS_SocketServerService<any>[] {
202
+ return [
203
+ Chat_SocketServerService.getInstance(),
204
+ ];
205
+ }
206
+ }
207
+
208
+ // Start the application
209
+ const app = new App();
210
+ ```
211
+
212
+ ## Core Concepts
213
+
214
+ Dynamo-NTS uses [Dynamo FSM](https://www.npmjs.com/package/@futdevpro/fsm-dynamo) as its foundation, implementing all server-side components defined in the FSM architecture. All types, interfaces, and base models are provided by FSM, ensuring full type safety and consistency.
215
+
216
+ ### Extensibility and Customization
217
+
218
+ Dynamo-NTS is designed with extensibility in mind. Every component, service, and class can be overridden or extended to meet your specific requirements:
219
+
220
+ - **Service Override**: All services (authentication, email, data services, etc.) can be extended or completely replaced with custom implementations
221
+ - **Method Override**: Abstract methods in base classes allow you to customize behavior while maintaining the framework structure
222
+ - **Configuration Override**: Global settings, route security, and application parameters can be overridden at any level
223
+ - **Type Safety**: All overrides maintain full TypeScript type safety, with all types and interfaces available at compile time
224
+
225
+ This design philosophy ensures that Dynamo-NTS provides a solid foundation while remaining fully customizable for your specific use cases.
226
+
227
+ ### Complete Type Information
228
+
229
+ All types, interfaces, and definitions are included in the compiled output, ensuring excellent readability and maintainability. When you compile your project, you have access to:
230
+
231
+ - Complete type definitions for all services, models, and interfaces
232
+ - Full IntelliSense support in your IDE
233
+ - Compile-time type checking for all framework components
234
+ - Self-documenting code through TypeScript's type system
235
+
236
+ This approach eliminates the need to reference external documentation during development—everything you need is available in your IDE's autocomplete and type hints.
237
+
238
+ ### Application Classes
239
+
240
+ Dynamo-NTS provides two main application base classes that simplify Express server setup:
241
+
242
+ - **`DyNTS_App`**: Basic application class for standard HTTP server applications without real-time socket support
243
+ - **`DyNTS_AppExtended`**: Extended application class that includes built-in socket server capabilities for real-time communication (simplifies Socket.io setup)
244
+
245
+ Both classes abstract away Express server configuration, requiring you to implement several abstract methods with simple parameter objects:
246
+
247
+ - `getAppParams()`: Define application parameters (name, version, database name, etc.) - replaces Express app initialization
248
+ - `getGlobalServiceCollection()`: Configure global services (authentication, email, database models) - replaces manual service registration
249
+ - `getPortSettings()`: Configure HTTP/HTTPS ports - replaces Express server.listen() configuration
250
+ - `getRoutingModules()`: Define API routes and controllers - replaces Express router setup
251
+
252
+ ### Data Services
253
+
254
+ Data services provide a structured way to interact with MongoDB, simplifying Mongoose model and schema definitions:
255
+
256
+ - **`DyNTS_DBService<T>`**: Low-level MongoDB service for direct database operations (simplifies Mongoose model creation)
257
+ - **`DyNTS_DataService<T>`**: High-level data service with business logic, validation, and dependency management (simplifies MongoDB CRUD operations)
258
+ - **`DyNTS_ArchiveDataService<T>`**: Service for managing archived data in separate collections
259
+
260
+ Instead of manually creating Mongoose schemas and models, you define data models through `DyFM_DataModel_Params` (from FSM), and Dynamo-NTS handles schema generation, model creation, and connection management automatically. Data services handle CRUD operations, data validation, dependency tracking, and provide methods for searching, filtering, and managing data relationships.
261
+
262
+ ### Atomic MongoDB transactions
263
+
264
+ `DyNTS_MongoTransaction_ControlService` is the shared Bedrock entry point for business operations that must
265
+ commit several MongoDB writes as one unit. The callback receives the same Mongoose `ClientSession` that must
266
+ be attached to every participating query or write:
267
+
268
+ ```typescript
269
+ import { ClientSession } from 'mongoose';
270
+
271
+ import { DyNTS_MongoTransaction_ControlService } from '@futdevpro/nts-dynamo';
272
+
273
+ const transactionService: DyNTS_MongoTransaction_ControlService =
274
+ DyNTS_MongoTransaction_ControlService.getInstance();
275
+
276
+ const pipelineId: string = await transactionService.execute<string>({
277
+ transactionName: 'publish-pipeline-version',
278
+ issuer: 'pipeline-persistence-service',
279
+ maxCommitTimeMs: 3_000,
280
+ task: async (session: ClientSession): Promise<string> => {
281
+ // Every MongoDB operation in this callback must use `session`.
282
+ // Example: await model.updateOne(filter, update, { session: session });
283
+ // Example: await auditModel.create([ event ], { session: session });
284
+ return 'pipeline-id';
285
+ },
286
+ });
287
+ ```
288
+
289
+ The service uses snapshot reads, majority writes and primary routing, always closes the session, and emits
290
+ stable content-free error codes. MongoDB transactions require a replica set or sharded deployment; a standalone
291
+ MongoDB instance is intentionally not treated as transaction-capable. Mongoose may retry the callback after a
292
+ transient transaction error, so the callback must not perform non-transactional side effects such as sending
293
+ messages or mutating external systems.
294
+
295
+ ### Routing System
296
+
297
+ The routing system provides a structured approach to defining RESTful API endpoints, simplifying Express router configuration:
298
+
299
+ - **`DyNTS_RoutingModule`**: Groups related controllers under a common route path (replaces Express Router setup)
300
+ - **`DyNTS_Controller`**: Abstract base class for defining HTTP endpoints (simplifies Express route handlers)
301
+ - **`DyNTS_Endpoint_Params`**: Configuration for individual API endpoints (replaces Express route definitions)
302
+
303
+ Instead of manually setting up Express routers and route handlers, you define endpoints through parameter objects. Controllers define endpoints with support for:
304
+ - Multiple HTTP methods (GET, POST, PUT, PATCH, DELETE)
305
+ - Pre-processing middleware (authentication, validation)
306
+ - Task functions for handling requests
307
+ - Route security levels (open, secure, both)
308
+
309
+ ### Global Services
310
+
311
+ The `DyNTS_GlobalService` provides centralized access to:
312
+
313
+ - Authentication service
314
+ - Email service collection
315
+ - Database models registry
316
+ - Error handlers
317
+ - Socket server instances
318
+
319
+ ### Authentication
320
+
321
+ Dynamo-NTS provides an abstract `DyNTS_AuthService` class that you can extend to implement your authentication logic. The framework supports:
322
+
323
+ - Token-based authentication
324
+ - OAuth2 flows (via the OAuth2 module)
325
+ - Session management
326
+ - Route-level security configuration
327
+
328
+ For product-local accounts, the optional `@futdevpro/nts-dynamo/account-security` entry point adds production
329
+ security primitives without coupling a product to a shared account provider:
330
+
331
+ - versioned adaptive password hashing and rehash detection;
332
+ - hash-only email-verification and password-reset challenges with atomic one-time consumption;
333
+ - opaque, hash-only access credentials backed by revocable server-side sessions;
334
+ - one-time refresh rotation, replay detection, session listing and subject-wide revocation.
335
+
336
+ Persistence remains application-owned through explicit atomic adapters. Transports must never put the raw
337
+ credentials in URLs, logs, analytics or durable client storage. A consuming application must also apply its
338
+ rate-limit, authorization, cookie/storage and audit-redaction policy at the API boundary.
339
+
340
+ ### Distributed rate limiting
341
+
342
+ The `@futdevpro/nts-dynamo/rate-limit` entry point provides an atomic rate-limit boundary for HTTP services:
343
+
344
+ - an exact sliding-window in-memory store for deterministic tests and explicitly single-instance development;
345
+ - an application-owned shared-store contract for production deployments;
346
+ - a production configuration gate that requires both shared persistence and explicit opaque subject/endpoint
347
+ extractors;
348
+ - validated positive limits, windows and weighted request costs with stable, content-free failures;
349
+ - trusted `req.ip` as the safe local default instead of reading caller-controlled forwarding headers directly;
350
+ - explicit opportunistic local cleanup with no timer, polling loop or hidden background task.
351
+
352
352
  Production consumers must implement the shared store with one atomic permit decision across every application
353
353
  instance. They must derive non-sensitive, purpose-scoped bucket identifiers and must not persist or log raw IP
354
354
  addresses, credentials, email addresses or other request content as rate-limit keys.
@@ -381,20 +381,20 @@ Products remain responsible for exact tenant authorization, retention durations,
381
381
  selection/delete predicates, operational invocation, legal review and end-to-end deletion verification.
382
382
 
383
383
  ### Privacy lifecycle
384
-
385
- The optional `@futdevpro/nts-dynamo/privacy-lifecycle` entry point provides the shared machinery for standalone
386
- GDPR-capable products:
387
-
388
- - identity-gated, deadline-bearing data-subject requests;
389
- - explicit `received → identity-verified → scoped → planned → executing → verifying` processing;
384
+
385
+ The optional `@futdevpro/nts-dynamo/privacy-lifecycle` entry point provides the shared machinery for standalone
386
+ GDPR-capable products:
387
+
388
+ - identity-gated, deadline-bearing data-subject requests;
389
+ - explicit `received → identity-verified → scoped → planned → executing → verifying` processing;
390
390
  - deterministic product-domain contributors with resumable partial outcomes and documented retention bases;
391
391
  - bounded deterministic assembly of completed, checksum-verified multi-contributor JSON export bundles;
392
392
  - exact subject-and-organization scoped deletion and terminal verification of encrypted export artifacts;
393
393
  - append-only, checksummed legal acceptances;
394
394
  - versioned, purpose-specific consent grants and withdrawals.
395
395
  - fail-closed, exact-purpose consent authorization at the point of optional processing.
396
-
397
- The Bedrock module coordinates state and evidence only. Each consuming product must register every data domain,
396
+
397
+ The Bedrock module coordinates state and evidence only. Each consuming product must register every data domain,
398
398
  implement hard-delete/anonymization/export behavior, and provide transaction-safe persistence. A request is
399
399
  never reported complete while a registered contributor has a failed outcome.
400
400
 
@@ -420,438 +420,438 @@ Products still own the legal definition and presentation of each optional purpos
420
420
  authenticated grant/withdrawal API and the downstream operation. Every optional downstream operation must call the
421
421
  authorizer immediately before use. Service-required processing must use a separate, explicitly documented legal
422
422
  basis and must never be disguised as consent-based processing.
423
-
424
- ## Modules Overview
425
-
426
- Dynamo-NTS is organized into focused modules, each providing specific functionality:
427
-
428
- ### Main Module
429
-
430
- The core foundation providing essential components:
431
-
432
- - **Collections**: Archive utilities, global settings, environment configuration
433
- - **Enums**: Data model types, service functions, route security levels
434
- - **Models**: Application configuration interfaces, control models, database types
435
- - **Services**: Core services for API communication, authentication, data management, routing
436
-
437
- ### AI Module
438
-
439
- Provides abstractions and implementations for AI operations:
440
-
441
- - **Abstract Service Bases**: Base classes for AI providers, LLM services, LLM chat services, and embedding services
442
- - **OpenAI Implementation**: Complete OpenAI integration with LLM, chat, and embedding support
443
- - **Document AI**: Document chunking and preprocessing for AI models
444
- - **Vector Search**: MongoDB Atlas vector database operations with automatic data vectorization
445
-
446
- #### OpenAI-Compatible Providers
447
-
448
- The OAI service-ek (`DyNTS_OAI_LLM_ServiceBase`, `DyNTS_OAI_LLMChat_ServiceBase`, `DyNTS_OAI_Embedding_ControlService`) bármely OpenAI-API-kompatibilis endpoint-tal működnek — lokál LLM (LM Studio, Ollama), self-hosted (vLLM, LocalAI) is — a `DyFM_OAI_ClientOptions.baseURL` mező segítségével. Részletek + provider-konfig sample-ök: [`__documentations/2026-05-17-oai-compatible-providers.md`](__documentations/2026-05-17-oai-compatible-providers.md).
449
-
450
- ### Assistant Module
451
-
452
- Platform and AI provider agnostic solutions for creating intelligent assistants:
453
-
454
- - Integrates communication providers (bot) with AI providers (LLM Chat)
455
- - Message conversion utilities
456
- - Conversation management
457
- - Configurable settings for system prompts and message filtering
458
-
459
- ### Bot Module
460
-
461
- Platform-agnostic bot functionality:
462
-
463
- - Message, channel, and user wrappers for any messaging platform
464
- - Command system for bot commands
465
- - Routine system for scheduled and event-driven tasks
466
- - IO management for bot interactions
467
- - Provider support for Discord, Slack, and Teams
468
-
469
- ### Socket Module
470
-
471
- Real-time communication capabilities that simplify Socket.io setup:
472
-
473
- - Socket client and server implementations with secure and open connection options (simplifies Socket.io server initialization)
474
- - Event handling system for managing real-time communications (replaces manual Socket.io event handler setup)
475
- - Presence tracking for monitoring connected clients
476
- - Error handling and logging for reliable operation
477
- - Extended application class with built-in socket server capabilities (automatically configures Socket.io with Express server)
478
-
479
- ### Messaging Module
480
-
481
- Backend implementation for unified messaging system:
482
-
483
- - Data services for messages and conversations
484
- - Control services for business logic orchestration
485
- - Real-time socket events
486
- - RESTful HTTP endpoints
487
- - Integration with bot and assistant modules
488
-
489
- ### OAuth2 Module
490
-
491
- Complete OAuth2.0 protocol implementation:
492
-
493
- - OAuth2 authorization and token management
494
- - Client management and user authentication
495
- - Token exchange and refresh operations
496
- - Authorization code and access token generation
497
-
498
- ### Server Module
499
-
500
- Solutions for basic server endpoints:
501
-
502
- - Error handling for saving and retrieving server errors
503
- - Server status monitoring with version and uptime information
504
- - Server status snapshots for saving and retrieving status at specific times
505
- - Error statistics for monitoring and analysis
506
-
507
- #### Content-free database readiness probe
508
-
509
- Applications can perform one foreground readiness check against their own Mongoose connection without
510
- starting a timer, listener, retry loop, subscription, process hook, or background task:
511
-
512
- ```typescript
513
- import {
514
- DyNTS_DbReadinessProbe_ControlService,
515
- DyNTS_DbReadinessProbeResult_Interface,
516
- } from '@futdevpro/nts-dynamo/server';
517
-
518
- const result: DyNTS_DbReadinessProbeResult_Interface =
519
- await DyNTS_DbReadinessProbe_ControlService.probe({
520
- connection: mongoose.connection,
521
- });
522
- ```
523
-
524
- The `dynts-db-readiness/1` result contains exactly six allowlisted fields: contract version, readiness,
525
- normalized connection state, ping success, bounded stage, and stable result code. It never contains a host,
526
- database name, URI, model metadata, credentials, driver error text, or arbitrary error properties. Failures
527
- resolve to a content-free, fail-closed result and the probe writes no log output.
528
-
529
- Timeout policy and cancellation are caller-owned. The probe observes the supplied `AbortSignal` before and
530
- after its single ping, but it does not create a timeout or interrupt an already-running driver operation.
531
- Configure the driver's operation timeout and abort the supplied signal at the application boundary.
532
-
533
- ### Defaults Module
534
-
535
- Default implementations for common services:
536
-
537
- - Default user data model and service for authentication and user management
538
- - Default authentication service with basic token-based authentication
539
- - Default socket events service with graceful degradation
540
- - All services can be extended or replaced with custom implementations
541
-
542
- ### Custom Data Module
543
-
544
- Tools for managing custom data:
545
-
546
- - Data service for handling custom data operations with optional initialization
547
- - Controller with RESTful endpoints for data operations
548
- - GET endpoint for retrieving custom data by ID
549
- - POST endpoint for modifying custom data
550
- - Configurable routing module with optional security overrides
551
-
552
- ### Test Module
553
-
554
- Testing and monitoring tools:
555
-
556
- - Test endpoints for different HTTP methods (GET, POST, DELETE)
557
- - Server status endpoint with version and uptime information
558
- - Configurable routing module with security override options
559
- - Automatic controller registration for easy setup
560
-
561
- ### Usage Module
562
-
563
- Session and usage tracking tools:
564
-
565
- - Session management tools for creating, updating, and closing sessions
566
- - Usage data collection and analysis tools
567
- - Location tracking from HTTP requests
568
- - Usage statistics retrieval with time range filtering
569
- - Daily usage statistics calculation
570
-
571
- ## Usage Examples
572
-
573
- ### Basic Application Setup
574
-
575
- This example shows a complete application setup using `DyNTS_AppExtended`:
576
-
577
- ```typescript
578
- import {
579
- DyNTS_AppExtended,
580
- DyNTS_App_Params,
581
- DyNTS_GlobalService_Settings,
582
- DyNTS_Http_Settings,
583
- DyNTS_RoutingModule
584
- } from '@futdevpro/nts-dynamo';
585
- import { DyNTS_SocketServerService } from '@futdevpro/nts-dynamo/socket';
586
-
587
- export class App extends DyNTS_AppExtended {
588
-
589
- getAppParams(): DyNTS_App_Params {
590
- return new DyNTS_App_Params({
591
- name: 'My Server',
592
- version: '1.0.0',
593
- dbName: 'myapp',
594
- });
595
- }
596
-
597
- getGlobalServiceCollection(): DyNTS_GlobalService_Settings {
598
- return {
599
- authService: AuthService.getInstance(),
600
- dbModels: [
601
- // Your data models
602
- ],
603
- };
604
- }
605
-
606
- getPortSettings(): DyNTS_Http_Settings {
607
- return new DyNTS_Http_Settings({
608
- httpPort: 3000,
609
- });
610
- }
611
-
612
- getRoutingModules(): DyNTS_RoutingModule[] {
613
- return [
614
- new DyNTS_RoutingModule({
615
- route: '/api',
616
- controllers: [
617
- MyController.getInstance(),
618
- ],
619
- }),
620
- ];
621
- }
622
-
623
- getSocketServices(): DyNTS_SocketServerService<any>[] {
624
- return [
625
- MySocketService.getInstance(),
626
- ];
627
- }
628
- }
629
- ```
630
-
631
- ### Routing Module Configuration
632
-
633
- Multiple routing modules can be configured to organize your API:
634
-
635
- ```typescript
636
- getRoutingModules(): DyNTS_RoutingModule[] {
637
- return [
638
- new DyNTS_RoutingModule({
639
- route: '/user',
640
- controllers: [
641
- User_Controller.getInstance(),
642
- UserData_Controller.getInstance(),
643
- UserSettings_Controller.getInstance(),
644
- ],
645
- }),
646
- new DyNTS_RoutingModule({
647
- route: '/project',
648
- controllers: [
649
- Project_Controller.getInstance(),
650
- ProjectExtension_Controller.getInstance(),
651
- ],
652
- }),
653
- new DyNTS_RoutingModule({
654
- route: '/server',
655
- controllers: [
656
- ServerStatus_Controller.getInstance(),
657
- ],
658
- }),
659
- DyNTS_getTestRoutingModule(),
660
- DyNTS_getUsageRoutingModule(),
661
- ];
662
- }
663
- ```
664
-
665
- ### Controller Implementation
666
-
667
- Controllers define API endpoints with authentication and business logic:
668
-
669
- ```typescript
670
- import { Request, Response } from 'express';
671
- import { DyNTS_Controller, DyNTS_Endpoint_Params } from '@futdevpro/nts-dynamo';
672
- import { DyFM_HttpCallType } from '@futdevpro/fsm-dynamo';
673
-
674
- export class User_Controller extends DyNTS_Controller {
675
-
676
- static getInstance(): User_Controller {
677
- return User_Controller.getSingletonInstance();
678
- }
679
-
680
- private authService: AuthService = AuthService.getInstance();
681
-
682
- setupEndpoints(): void {
683
- this.endpoints = [
684
- new DyNTS_Endpoint_Params({
685
- name: 'getUser',
686
- type: DyFM_HttpCallType.get,
687
- endpoint: '/get/:userId',
688
- preProcesses: [this.authService.authenticate_tokenSelf],
689
- tasks: [
690
- async (req: Request, res: Response, issuer: string): Promise<void> => {
691
- const userService = new User_DataService({ issuer });
692
- await userService.getDataById(req.params.userId);
693
- res.send(userService.data);
694
- },
695
- ],
696
- }),
697
- new DyNTS_Endpoint_Params({
698
- name: 'updateUser',
699
- type: DyFM_HttpCallType.post,
700
- endpoint: '/update',
701
- preProcesses: [this.authService.authenticate_tokenSelf],
702
- tasks: [
703
- async (req: Request, res: Response, issuer: string): Promise<void> => {
704
- const userService = new User_DataService({ issuer });
705
- await userService.saveData(req.body);
706
- res.send(userService.data);
707
- },
708
- ],
709
- }),
710
- ];
711
- }
712
- }
713
- ```
714
-
715
- ### Data Service Implementation
716
-
717
- Data services provide a structured way to interact with MongoDB:
718
-
719
- ```typescript
720
- import { DyNTS_DataService } from '@futdevpro/nts-dynamo';
721
- import { DyFM_DataModel_Params } from '@futdevpro/fsm-dynamo'; // FSM provides the data model parameter definition
722
-
723
- // Define your data model parameters
724
- const userDataParams: DyFM_DataModel_Params<UserData> = new DyFM_DataModel_Params({
725
- dataName: 'userData',
726
- typeSample: {
727
- userId: '',
728
- preferences: {},
729
- },
730
- // ... additional configuration
731
- });
732
-
733
- export class User_DataService extends DyNTS_DataService<UserData> {
734
- constructor(params: { issuer: string }) {
735
- super(userDataParams);
736
- this.issuer = params.issuer;
737
- }
738
-
739
- // Custom business logic methods
740
- async getUserPreferences(userId: string): Promise<UserPreferences> {
741
- await this.getDataByDependencyId({ userId });
742
- return this.data?.preferences || {};
743
- }
744
- }
745
- ```
746
-
747
- ### Socket Server Service
748
-
749
- Socket services enable real-time communication:
750
-
751
- ```typescript
752
- import { DyNTS_SocketServerService, DyNTS_SocketPresence } from '@futdevpro/nts-dynamo/socket';
753
-
754
- export class Chat_SocketServerService extends DyNTS_SocketServerService<DyNTS_SocketPresence, any> {
755
-
756
- static getInstance(): Chat_SocketServerService {
757
- return Chat_SocketServerService.getSingletonInstance();
758
- }
759
-
760
- protected setupSocketEvents(): void {
761
- this.socketServer.on('connection', (socket) => {
762
- socket.on('joinRoom', (roomId: string) => {
763
- socket.join(roomId);
764
- });
765
-
766
- socket.on('sendMessage', async (data: { roomId: string; message: string }) => {
767
- this.socketServer.to(data.roomId).emit('newMessage', data);
768
- });
769
- });
770
- }
771
- }
772
- ```
773
-
774
- ### Vector Search with AI
775
-
776
- Dynamo-NTS provides built-in support for MongoDB Atlas vector search with automatic vectorization:
777
-
778
- ```typescript
779
- import { DyNTS_OAI_VectorDataService } from '@futdevpro/nts-dynamo/ai/open-ai';
780
-
781
- export class Knowledge_DataService extends DyNTS_OAI_VectorDataService<Knowledge> {
782
-
783
- constructor() {
784
- super(knowledgeDataParams);
785
- }
786
-
787
- async searchSimilarContent(query: string, limit: number = 10): Promise<Knowledge[]> {
788
- return await this.vectorSearch({
789
- input: query,
790
- searchInKey: 'content', // Property that has vectorization enabled
791
- limit: limit,
792
- numberOfCandidates: 100,
793
- });
794
- }
795
- }
796
- ```
797
-
798
- The vector search automatically:
799
- - Creates embeddings for search queries using the configured AI provider
800
- - Performs semantic search in MongoDB Atlas vector database
801
- - Returns results sorted by relevance
802
- - Supports filtering with additional MongoDB queries
803
-
804
- ## Ecosystem Integration
805
-
806
- Dynamo-NTS is part of the unified **Dynamo ecosystem**, which consists of several interconnected packages:
807
-
808
- ### Dynamo FSM (Full Stack Module)
809
-
810
- The foundational package [`@futdevpro/fsm-dynamo`](https://www.npmjs.com/package/@futdevpro/fsm-dynamo) that provides:
811
- - Core interfaces and types shared across the ecosystem
812
- - Base model definitions (used by all Dynamo-NTS data services)
813
- - Utility functions
814
- - Type definitions for system-wide use
815
- - Data model parameter definitions (`DyFM_DataModel_Params`)
816
-
817
- Dynamo-NTS is built on top of Dynamo FSM and implements the server-side components of the FSM architecture. All data models, interfaces, and type definitions used in Dynamo-NTS are provided by FSM, ensuring consistency and type safety across the entire ecosystem.
818
-
819
- ### Dynamo NGX (AngularX)
820
-
821
- The frontend counterpart [`@futdevpro/dynamo-ngx`](https://www.npmjs.com/package/@futdevpro/dynamo-ngx) provides:
822
- - Angular components and services
823
- - Frontend models that integrate with Dynamo-NTS backend (using shared FSM types)
824
- - Real-time communication clients (connects to Dynamo-NTS socket services)
825
- - Form management and data table components
826
-
827
- ### Unified Patterns
828
-
829
- The Dynamo ecosystem enforces consistent patterns across all packages:
830
-
831
- - **Naming Conventions**: Consistent prefixes (`DyNTS_` for backend, `DyNX_` for frontend, `DyFM_` for shared)
832
- - **Type Safety**: Full TypeScript support with shared type definitions
833
- - **Architecture Patterns**: Consistent service patterns, data models, and API structures
834
- - **Error Handling**: Unified error handling across the stack
835
- - **Logging**: Consistent logging patterns and utilities
836
-
837
- This unified approach ensures that:
838
- - Developers learn one set of patterns that apply everywhere
839
- - Frontend and backend code integrate seamlessly
840
- - Type safety is maintained across the entire stack
841
- - Maintenance and updates are simplified
842
-
843
- ## API Reference
844
-
845
- For detailed API documentation, see:
846
-
847
- - [Dynamo-NTS Documentation](fdp-documentations/specifications/dynamo-packages/dynamo-nts/dynamo-nts.md)
848
- - [Dynamo FSM Documentation](fdp-documentations/specifications/dynamo-packages/dynamo-fsm/dynamo-fsm.md)
849
- - [Dynamo Ecosystem Overview](fdp-documentations/specifications/dynamo-packages/dynamo_packages.md)
850
-
851
- ## License
852
-
853
- ISC
854
-
855
- ## Support
856
-
857
- For issues, questions, or contributions, please refer to the project repository.
423
+
424
+ ## Modules Overview
425
+
426
+ Dynamo-NTS is organized into focused modules, each providing specific functionality:
427
+
428
+ ### Main Module
429
+
430
+ The core foundation providing essential components:
431
+
432
+ - **Collections**: Archive utilities, global settings, environment configuration
433
+ - **Enums**: Data model types, service functions, route security levels
434
+ - **Models**: Application configuration interfaces, control models, database types
435
+ - **Services**: Core services for API communication, authentication, data management, routing
436
+
437
+ ### AI Module
438
+
439
+ Provides abstractions and implementations for AI operations:
440
+
441
+ - **Abstract Service Bases**: Base classes for AI providers, LLM services, LLM chat services, and embedding services
442
+ - **OpenAI Implementation**: Complete OpenAI integration with LLM, chat, and embedding support
443
+ - **Document AI**: Document chunking and preprocessing for AI models
444
+ - **Vector Search**: MongoDB Atlas vector database operations with automatic data vectorization
445
+
446
+ #### OpenAI-Compatible Providers
447
+
448
+ The OAI service-ek (`DyNTS_OAI_LLM_ServiceBase`, `DyNTS_OAI_LLMChat_ServiceBase`, `DyNTS_OAI_Embedding_ControlService`) bármely OpenAI-API-kompatibilis endpoint-tal működnek — lokál LLM (LM Studio, Ollama), self-hosted (vLLM, LocalAI) is — a `DyFM_OAI_ClientOptions.baseURL` mező segítségével. Részletek + provider-konfig sample-ök: [`__documentations/2026-05-17-oai-compatible-providers.md`](__documentations/2026-05-17-oai-compatible-providers.md).
449
+
450
+ ### Assistant Module
451
+
452
+ Platform and AI provider agnostic solutions for creating intelligent assistants:
453
+
454
+ - Integrates communication providers (bot) with AI providers (LLM Chat)
455
+ - Message conversion utilities
456
+ - Conversation management
457
+ - Configurable settings for system prompts and message filtering
458
+
459
+ ### Bot Module
460
+
461
+ Platform-agnostic bot functionality:
462
+
463
+ - Message, channel, and user wrappers for any messaging platform
464
+ - Command system for bot commands
465
+ - Routine system for scheduled and event-driven tasks
466
+ - IO management for bot interactions
467
+ - Provider support for Discord, Slack, and Teams
468
+
469
+ ### Socket Module
470
+
471
+ Real-time communication capabilities that simplify Socket.io setup:
472
+
473
+ - Socket client and server implementations with secure and open connection options (simplifies Socket.io server initialization)
474
+ - Event handling system for managing real-time communications (replaces manual Socket.io event handler setup)
475
+ - Presence tracking for monitoring connected clients
476
+ - Error handling and logging for reliable operation
477
+ - Extended application class with built-in socket server capabilities (automatically configures Socket.io with Express server)
478
+
479
+ ### Messaging Module
480
+
481
+ Backend implementation for unified messaging system:
482
+
483
+ - Data services for messages and conversations
484
+ - Control services for business logic orchestration
485
+ - Real-time socket events
486
+ - RESTful HTTP endpoints
487
+ - Integration with bot and assistant modules
488
+
489
+ ### OAuth2 Module
490
+
491
+ Complete OAuth2.0 protocol implementation:
492
+
493
+ - OAuth2 authorization and token management
494
+ - Client management and user authentication
495
+ - Token exchange and refresh operations
496
+ - Authorization code and access token generation
497
+
498
+ ### Server Module
499
+
500
+ Solutions for basic server endpoints:
501
+
502
+ - Error handling for saving and retrieving server errors
503
+ - Server status monitoring with version and uptime information
504
+ - Server status snapshots for saving and retrieving status at specific times
505
+ - Error statistics for monitoring and analysis
506
+
507
+ #### Content-free database readiness probe
508
+
509
+ Applications can perform one foreground readiness check against their own Mongoose connection without
510
+ starting a timer, listener, retry loop, subscription, process hook, or background task:
511
+
512
+ ```typescript
513
+ import {
514
+ DyNTS_DbReadinessProbe_ControlService,
515
+ DyNTS_DbReadinessProbeResult_Interface,
516
+ } from '@futdevpro/nts-dynamo/server';
517
+
518
+ const result: DyNTS_DbReadinessProbeResult_Interface =
519
+ await DyNTS_DbReadinessProbe_ControlService.probe({
520
+ connection: mongoose.connection,
521
+ });
522
+ ```
523
+
524
+ The `dynts-db-readiness/1` result contains exactly six allowlisted fields: contract version, readiness,
525
+ normalized connection state, ping success, bounded stage, and stable result code. It never contains a host,
526
+ database name, URI, model metadata, credentials, driver error text, or arbitrary error properties. Failures
527
+ resolve to a content-free, fail-closed result and the probe writes no log output.
528
+
529
+ Timeout policy and cancellation are caller-owned. The probe observes the supplied `AbortSignal` before and
530
+ after its single ping, but it does not create a timeout or interrupt an already-running driver operation.
531
+ Configure the driver's operation timeout and abort the supplied signal at the application boundary.
532
+
533
+ ### Defaults Module
534
+
535
+ Default implementations for common services:
536
+
537
+ - Default user data model and service for authentication and user management
538
+ - Default authentication service with basic token-based authentication
539
+ - Default socket events service with graceful degradation
540
+ - All services can be extended or replaced with custom implementations
541
+
542
+ ### Custom Data Module
543
+
544
+ Tools for managing custom data:
545
+
546
+ - Data service for handling custom data operations with optional initialization
547
+ - Controller with RESTful endpoints for data operations
548
+ - GET endpoint for retrieving custom data by ID
549
+ - POST endpoint for modifying custom data
550
+ - Configurable routing module with optional security overrides
551
+
552
+ ### Test Module
553
+
554
+ Testing and monitoring tools:
555
+
556
+ - Test endpoints for different HTTP methods (GET, POST, DELETE)
557
+ - Server status endpoint with version and uptime information
558
+ - Configurable routing module with security override options
559
+ - Automatic controller registration for easy setup
560
+
561
+ ### Usage Module
562
+
563
+ Session and usage tracking tools:
564
+
565
+ - Session management tools for creating, updating, and closing sessions
566
+ - Usage data collection and analysis tools
567
+ - Location tracking from HTTP requests
568
+ - Usage statistics retrieval with time range filtering
569
+ - Daily usage statistics calculation
570
+
571
+ ## Usage Examples
572
+
573
+ ### Basic Application Setup
574
+
575
+ This example shows a complete application setup using `DyNTS_AppExtended`:
576
+
577
+ ```typescript
578
+ import {
579
+ DyNTS_AppExtended,
580
+ DyNTS_App_Params,
581
+ DyNTS_GlobalService_Settings,
582
+ DyNTS_Http_Settings,
583
+ DyNTS_RoutingModule
584
+ } from '@futdevpro/nts-dynamo';
585
+ import { DyNTS_SocketServerService } from '@futdevpro/nts-dynamo/socket';
586
+
587
+ export class App extends DyNTS_AppExtended {
588
+
589
+ getAppParams(): DyNTS_App_Params {
590
+ return new DyNTS_App_Params({
591
+ name: 'My Server',
592
+ version: '1.0.0',
593
+ dbName: 'myapp',
594
+ });
595
+ }
596
+
597
+ getGlobalServiceCollection(): DyNTS_GlobalService_Settings {
598
+ return {
599
+ authService: AuthService.getInstance(),
600
+ dbModels: [
601
+ // Your data models
602
+ ],
603
+ };
604
+ }
605
+
606
+ getPortSettings(): DyNTS_Http_Settings {
607
+ return new DyNTS_Http_Settings({
608
+ httpPort: 3000,
609
+ });
610
+ }
611
+
612
+ getRoutingModules(): DyNTS_RoutingModule[] {
613
+ return [
614
+ new DyNTS_RoutingModule({
615
+ route: '/api',
616
+ controllers: [
617
+ MyController.getInstance(),
618
+ ],
619
+ }),
620
+ ];
621
+ }
622
+
623
+ getSocketServices(): DyNTS_SocketServerService<any>[] {
624
+ return [
625
+ MySocketService.getInstance(),
626
+ ];
627
+ }
628
+ }
629
+ ```
630
+
631
+ ### Routing Module Configuration
632
+
633
+ Multiple routing modules can be configured to organize your API:
634
+
635
+ ```typescript
636
+ getRoutingModules(): DyNTS_RoutingModule[] {
637
+ return [
638
+ new DyNTS_RoutingModule({
639
+ route: '/user',
640
+ controllers: [
641
+ User_Controller.getInstance(),
642
+ UserData_Controller.getInstance(),
643
+ UserSettings_Controller.getInstance(),
644
+ ],
645
+ }),
646
+ new DyNTS_RoutingModule({
647
+ route: '/project',
648
+ controllers: [
649
+ Project_Controller.getInstance(),
650
+ ProjectExtension_Controller.getInstance(),
651
+ ],
652
+ }),
653
+ new DyNTS_RoutingModule({
654
+ route: '/server',
655
+ controllers: [
656
+ ServerStatus_Controller.getInstance(),
657
+ ],
658
+ }),
659
+ DyNTS_getTestRoutingModule(),
660
+ DyNTS_getUsageRoutingModule(),
661
+ ];
662
+ }
663
+ ```
664
+
665
+ ### Controller Implementation
666
+
667
+ Controllers define API endpoints with authentication and business logic:
668
+
669
+ ```typescript
670
+ import { Request, Response } from 'express';
671
+ import { DyNTS_Controller, DyNTS_Endpoint_Params } from '@futdevpro/nts-dynamo';
672
+ import { DyFM_HttpCallType } from '@futdevpro/fsm-dynamo';
673
+
674
+ export class User_Controller extends DyNTS_Controller {
675
+
676
+ static getInstance(): User_Controller {
677
+ return User_Controller.getSingletonInstance();
678
+ }
679
+
680
+ private authService: AuthService = AuthService.getInstance();
681
+
682
+ setupEndpoints(): void {
683
+ this.endpoints = [
684
+ new DyNTS_Endpoint_Params({
685
+ name: 'getUser',
686
+ type: DyFM_HttpCallType.get,
687
+ endpoint: '/get/:userId',
688
+ preProcesses: [this.authService.authenticate_tokenSelf],
689
+ tasks: [
690
+ async (req: Request, res: Response, issuer: string): Promise<void> => {
691
+ const userService = new User_DataService({ issuer });
692
+ await userService.getDataById(req.params.userId);
693
+ res.send(userService.data);
694
+ },
695
+ ],
696
+ }),
697
+ new DyNTS_Endpoint_Params({
698
+ name: 'updateUser',
699
+ type: DyFM_HttpCallType.post,
700
+ endpoint: '/update',
701
+ preProcesses: [this.authService.authenticate_tokenSelf],
702
+ tasks: [
703
+ async (req: Request, res: Response, issuer: string): Promise<void> => {
704
+ const userService = new User_DataService({ issuer });
705
+ await userService.saveData(req.body);
706
+ res.send(userService.data);
707
+ },
708
+ ],
709
+ }),
710
+ ];
711
+ }
712
+ }
713
+ ```
714
+
715
+ ### Data Service Implementation
716
+
717
+ Data services provide a structured way to interact with MongoDB:
718
+
719
+ ```typescript
720
+ import { DyNTS_DataService } from '@futdevpro/nts-dynamo';
721
+ import { DyFM_DataModel_Params } from '@futdevpro/fsm-dynamo'; // FSM provides the data model parameter definition
722
+
723
+ // Define your data model parameters
724
+ const userDataParams: DyFM_DataModel_Params<UserData> = new DyFM_DataModel_Params({
725
+ dataName: 'userData',
726
+ typeSample: {
727
+ userId: '',
728
+ preferences: {},
729
+ },
730
+ // ... additional configuration
731
+ });
732
+
733
+ export class User_DataService extends DyNTS_DataService<UserData> {
734
+ constructor(params: { issuer: string }) {
735
+ super(userDataParams);
736
+ this.issuer = params.issuer;
737
+ }
738
+
739
+ // Custom business logic methods
740
+ async getUserPreferences(userId: string): Promise<UserPreferences> {
741
+ await this.getDataByDependencyId({ userId });
742
+ return this.data?.preferences || {};
743
+ }
744
+ }
745
+ ```
746
+
747
+ ### Socket Server Service
748
+
749
+ Socket services enable real-time communication:
750
+
751
+ ```typescript
752
+ import { DyNTS_SocketServerService, DyNTS_SocketPresence } from '@futdevpro/nts-dynamo/socket';
753
+
754
+ export class Chat_SocketServerService extends DyNTS_SocketServerService<DyNTS_SocketPresence, any> {
755
+
756
+ static getInstance(): Chat_SocketServerService {
757
+ return Chat_SocketServerService.getSingletonInstance();
758
+ }
759
+
760
+ protected setupSocketEvents(): void {
761
+ this.socketServer.on('connection', (socket) => {
762
+ socket.on('joinRoom', (roomId: string) => {
763
+ socket.join(roomId);
764
+ });
765
+
766
+ socket.on('sendMessage', async (data: { roomId: string; message: string }) => {
767
+ this.socketServer.to(data.roomId).emit('newMessage', data);
768
+ });
769
+ });
770
+ }
771
+ }
772
+ ```
773
+
774
+ ### Vector Search with AI
775
+
776
+ Dynamo-NTS provides built-in support for MongoDB Atlas vector search with automatic vectorization:
777
+
778
+ ```typescript
779
+ import { DyNTS_OAI_VectorDataService } from '@futdevpro/nts-dynamo/ai/open-ai';
780
+
781
+ export class Knowledge_DataService extends DyNTS_OAI_VectorDataService<Knowledge> {
782
+
783
+ constructor() {
784
+ super(knowledgeDataParams);
785
+ }
786
+
787
+ async searchSimilarContent(query: string, limit: number = 10): Promise<Knowledge[]> {
788
+ return await this.vectorSearch({
789
+ input: query,
790
+ searchInKey: 'content', // Property that has vectorization enabled
791
+ limit: limit,
792
+ numberOfCandidates: 100,
793
+ });
794
+ }
795
+ }
796
+ ```
797
+
798
+ The vector search automatically:
799
+ - Creates embeddings for search queries using the configured AI provider
800
+ - Performs semantic search in MongoDB Atlas vector database
801
+ - Returns results sorted by relevance
802
+ - Supports filtering with additional MongoDB queries
803
+
804
+ ## Ecosystem Integration
805
+
806
+ Dynamo-NTS is part of the unified **Dynamo ecosystem**, which consists of several interconnected packages:
807
+
808
+ ### Dynamo FSM (Full Stack Module)
809
+
810
+ The foundational package [`@futdevpro/fsm-dynamo`](https://www.npmjs.com/package/@futdevpro/fsm-dynamo) that provides:
811
+ - Core interfaces and types shared across the ecosystem
812
+ - Base model definitions (used by all Dynamo-NTS data services)
813
+ - Utility functions
814
+ - Type definitions for system-wide use
815
+ - Data model parameter definitions (`DyFM_DataModel_Params`)
816
+
817
+ Dynamo-NTS is built on top of Dynamo FSM and implements the server-side components of the FSM architecture. All data models, interfaces, and type definitions used in Dynamo-NTS are provided by FSM, ensuring consistency and type safety across the entire ecosystem.
818
+
819
+ ### Dynamo NGX (AngularX)
820
+
821
+ The frontend counterpart [`@futdevpro/dynamo-ngx`](https://www.npmjs.com/package/@futdevpro/dynamo-ngx) provides:
822
+ - Angular components and services
823
+ - Frontend models that integrate with Dynamo-NTS backend (using shared FSM types)
824
+ - Real-time communication clients (connects to Dynamo-NTS socket services)
825
+ - Form management and data table components
826
+
827
+ ### Unified Patterns
828
+
829
+ The Dynamo ecosystem enforces consistent patterns across all packages:
830
+
831
+ - **Naming Conventions**: Consistent prefixes (`DyNTS_` for backend, `DyNX_` for frontend, `DyFM_` for shared)
832
+ - **Type Safety**: Full TypeScript support with shared type definitions
833
+ - **Architecture Patterns**: Consistent service patterns, data models, and API structures
834
+ - **Error Handling**: Unified error handling across the stack
835
+ - **Logging**: Consistent logging patterns and utilities
836
+
837
+ This unified approach ensures that:
838
+ - Developers learn one set of patterns that apply everywhere
839
+ - Frontend and backend code integrate seamlessly
840
+ - Type safety is maintained across the entire stack
841
+ - Maintenance and updates are simplified
842
+
843
+ ## API Reference
844
+
845
+ For detailed API documentation, see:
846
+
847
+ - [Dynamo-NTS Documentation](fdp-documentations/specifications/dynamo-packages/dynamo-nts/dynamo-nts.md)
848
+ - [Dynamo FSM Documentation](fdp-documentations/specifications/dynamo-packages/dynamo-fsm/dynamo-fsm.md)
849
+ - [Dynamo Ecosystem Overview](fdp-documentations/specifications/dynamo-packages/dynamo_packages.md)
850
+
851
+ ## License
852
+
853
+ ISC
854
+
855
+ ## Support
856
+
857
+ For issues, questions, or contributions, please refer to the project repository.