@futdevpro/nts-dynamo 1.15.242 → 1.15.244

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