Mytra Development Framework is a set of tools for development TypeScript projects. It is based on the @mdf.js organization and is composed of several packages that can be used independently but that are designed to work together. The main idea of the framework is to integrate the most common tools and packages used in the development of TypeScript projects, usually wrapping them in a simpler interface and adding some extra functionality. For example the providers offered by this framework wrap the most common packages for managing connections to different services, such as rhea-promise for AMQP connections, @elastic/elasticsearch for Elastic, ... and offer an unified interface to create, manage and diagnose them. These interfaces are integrated with the observability component, so when an error occurs in one of the providers, the error is registered in the observability interface.
Each module can be installed separately, for example:
NPM:
npm install @mdf.js/crash
Yarn:
yarn add @mdf.js/crash
The complete framework is composed of the following packages:
- API modules:
- @mdf.js/core: Package for internal interfaces and classes used by the rest of the packages.
- @mdf.js/crash: Package for improving the error handling of the applications.
- @mdf.js/doorkeeper: Package for managing the validation of json schemas, based on ajv.
- @mdf.js/faker: Package for generating fake data for testing.
- @mdf.js/firehose: Package for data ETL pipelines creation and management. Works together with the providers.
- @mdf.js/logger: Package for logging management.
- @mdf.js/middlewares: Package with a set of middlewares for express applications.
- @mdf.js/openc2-core: Package for managing the OpenC2 protocol, internally used by @mdf.js/openc2.
-
@mdf.js/utils: Package with a set of utilities for development:
- coerce: Functions for data type coercion, specially useful for environment variables and configuration files.
- retry: Functions for retrying functions.
- camelCase: Functions for converting strings to camelCase.
- cycle: Functions for managing circular references in objects.
- escapeRegExp: Functions for escaping RegExp.
- findNodeModule: Functions for finding node modules.
- formatEnv: Functions for formatting environment variables.
- loadFile: Functions for loading files.
- mock: Functions for mocking objects, specially useful for testing in Jest.
- prettyMS: Functions for formatting milliseconds.
- Providers:
- @mdf.js/amqp-provider: Package for managing AMQP connections, based on rhea-promise.
- @mdf.js/elastic-provider: Package for managing Elastic connections, based on @elastic/elasticsearch.
- @mdf.js/http-client-provider: Package for managing HTTP connections, based on axios.
- @mdf.js/http-server-provider: Package for managing HTTP servers, based on express.
- @mdf.js/kafka-provider: Package for managing Kafka connections, based on kafkajs.
- @mdf.js/mongo-provider: Package for managing Mongo connections, based on mongodb.
- @mdf.js/redis-provider: Package for managing Redis connections, based on ioredis.
- @mdf.js/socket-client-provider: Package for managing socket.io connections, based on socket.io
- @mdf.js/socket-server-provider: Package for managing socket.io servers, based on socket.io
- @mdf.js/s3-provider: Package for managing S3 connections, based on aws-sdk/client-s3.
- Components:
- @mdf.js/openc2: Package for managing the OpenC2 protocol.
- @mdf.js/service-registry: Package for managing the observability of the services.
Check the documentation of each package for more information.
Copyright 2024 Mytra Control S.L. All rights reserved.
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.