{"id":24915549,"url":"https://github.com/cmmvio/cmmv","last_synced_at":"2025-10-17T01:32:16.090Z","repository":{"id":255437898,"uuid":"845601445","full_name":"cmmvio/cmmv","owner":"cmmvio","description":"Contract-Model-Model-View (CMMV) - Minimalistic Node.js Server Framework","archived":false,"fork":false,"pushed_at":"2025-01-24T01:08:27.000Z","size":7787,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T03:22:29.450Z","etag":null,"topics":["cmmv","contracts","nestjs","nodejs","protobuf","rpc","typescript","websocket"],"latest_commit_sha":null,"homepage":"https://cmmv.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmmvio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T15:01:15.000Z","updated_at":"2025-01-24T01:08:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"192e47b2-436e-4ffc-9a92-eea566df1af6","html_url":"https://github.com/cmmvio/cmmv","commit_stats":null,"previous_names":["andrehrferreira/cmmv","cmmvio/cmmv"],"tags_count":97,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmmvio%2Fcmmv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmmvio%2Fcmmv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmmvio%2Fcmmv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmmvio%2Fcmmv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmmvio","download_url":"https://codeload.github.com/cmmvio/cmmv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236761705,"owners_count":19200661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmmv","contracts","nestjs","nodejs","protobuf","rpc","typescript","websocket"],"created_at":"2025-02-02T07:18:08.170Z","updated_at":"2025-10-17T01:32:16.085Z","avatar_url":"https://github.com/cmmvio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cmmv.io/\" target=\"blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/cmmvio/docs.cmmv.io/main/public/assets/logo_CMMV2_icon.png\" width=\"300\" alt=\"CMMV Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eContract-Model-Model-View (CMMV) \u003cbr/\u003e Building scalable and modular applications using contracts.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@cmmv/core\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@cmmv/core.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/cmmvio/cmmv/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@cmmv/core.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://dl.circleci.com/status-badge/redirect/circleci/QyJWAYrZ9JTfN1eubSDo5u/7gdwcdqbMYfbYYX4hhoNhc/tree/main\" target=\"_blank\"\u003e\u003cimg src=\"https://dl.circleci.com/status-badge/img/circleci/QyJWAYrZ9JTfN1eubSDo5u/7gdwcdqbMYfbYYX4hhoNhc/tree/main.svg\" alt=\"CircleCI\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cmmv.io\"\u003eDocumentation\u003c/a\u003e \u0026bull;\n  \u003ca href=\"https://github.com/cmmvio/cmmv/issues\"\u003eReport Issue\u003c/a\u003e\n\u003c/p\u003e\n\n## Description\n\nCMMV (Contract-Model-Model-View) is a revolutionary approach to web application development, redefining how we create, maintain, and scale modern projects. By leveraging contract-based development, CMMV automates the generation of APIs, controllers, ORM entities, and RPC communication, delivering an optimized and robust experience.\n\nWith a **high-performance HTTP server (@cmmv/server)** that replaces Express, CMMV ensures **4x better performance** while maintaining a familiar syntax inspired by NestJS. It now supports **RESTful API, RPC, and GraphQL(Future) outputs**, with seamless **SSR directive integration**.\n\nCMMV also **merges @cmmv/view into @cmmv/http**, eliminating extra installations while retaining flexibility for **EJS, Mustache, and other view engines**. Additionally, new modules like **@cmmv/vault** (AES-256-GCM \u0026 ECC encryption) and **@cmmv/openapi** (automatic documentation generation) have been introduced, replacing the deprecated **@cmmv/swagger** module.\n\n## Philosophy\n\nCMMV simplifies development by leveraging TypeScript decorators and a modular architecture. It **removes complexity** by automating the core functionalities while allowing full **customization** for advanced use cases.\n\n## Features\n\n- **Contract-Driven Development:** Define models, controllers, and APIs with TypeScript contracts.\n- **High-Performance HTTP Server:** Replaces Express with an optimized native server.\n- **Modular Architecture:** Separate core and optional modules for scalability.\n- **Multi-Protocol Support:** REST, RPC, and GraphQL with automatic type inference.\n- **Integrated SSR:** Simple syntax for Server-Side Rendering.\n- **Advanced Security:** Vault module for encrypted data storage (AES-256-GCM \u0026 ECC).\n- **Automatic Documentation:** OpenAPI-based documentation from contracts.\n\n## Setup with CLI\n\nCMMV now provides a CLI (Command Line Interface) to streamline the installation process and quickly set up your project with the desired configurations.\n\nTo initialize a new project, you can use the following command:\n\n```bash\n$ pnpm dlx @cmmv/cli@latest create project-name\n```\n\nThis command will walk you through a guided setup process, asking about your preferred configurations, such as enabling Vite, RPC, caching, repository type, and view setup (e.g., Vue 3 or Reactivity). It will automatically create the necessary files and folders, set up dependencies, and configure the project.\n\n## Legacy Setup (Manual)\n\nIf you prefer to set up the project manually, you can still install the necessary modules individually:\n\n```bash\n$ pnpm add @cmmv/core @cmmv/http reflect-metadata fast-json-stringify\n```\n\n## Quick Start\n\nBelow is a simple example of how to create a new CMMV application:\n\n```typescript\nimport { Application } from \"@cmmv/core\";\nimport { DefaultAdapter, DefaultHTTPModule } from \"@cmmv/http\";\nimport { ApplicationModule } from \"./app.module\";\n\nApplication.create({\n    httpAdapter: DefaultAdapter,    \n    modules: [\n        DefaultHTTPModule,                      \n        ApplicationModule\n    ],\n    providers: [...],\n    contracts: [...]\n});\n```\n\n# Features\n\n## 🟢 Core\n- [x] Application control, contract loading, models, and model generation\n- [x] Base for creating transpilers\n- [x] Singleton-based architecture\n- [x] Core abstraction for HTTP, WS, contracts, and services\n- [x] Contracts, hooks, and metadata decorators\n- [x] Configuration validation and access control across all modules\n- [x] Telemetry and logging\n- [x] Base for creating registries\n\n## 🔐 Auth\n- [x] Full authentication \u0026 session control\n- [x] Local login \u0026 user registration\n- [ ] Login via provider (Google, Facebook, etc.)\n- [x] reCAPTCHA integration\n- [x] Token-based authentication\n- [x] 2FA with QR Code generation\n- [x] Session control based on fingerprint, IP, and user-agent\n\n## 🚀 Cache\n- [x] High-performance caching with Redis, Memcached, MongoDB, or binary storage\n- [x] Decorators for controller \u0026 gateway integration\n- [x] Full caching API with retrieval, update, and removal\n\n## 🌐 HTTP\n- [x] High-performance API server using `@cmmv/server`\n- [x] Automatic controller and service generation\n- [x] Integrated SSR support\n- [x] Integration with `@cmmv/cache` and `@cmmv/auth`\n- [x] View engine with EJS, Mustache, and other templates\n\n## 📡 Protobuf\n- [x] `.proto` file generation for RPC communication based on contracts\n- [x] JSON contract generation for frontend integration\n- [x] TypeScript type definitions from contracts\n\n## 🗄 Repository\n- [x] SQL, MySQL, PostgreSQL, SQL Server, Oracle, and MongoDB integration\n- [x] Automatic entity generation (TypeORM)\n- [x] Built-in indexing \u0026 relationship handling\n- [x] Data validation\n- [x] Auto-generated CRUD for RPC and REST APIs\n- [x] Search filters (sorting, ID filtering, pagination)\n- [x] Service overrides for direct repository integration\n- [x] Integration with `@cmmv/cache`, `@cmmv/auth`\n\n## ⏳ Scheduling\n- [x] Simple cron-based task decorators\n- [x] Task execution management\n\n## 🔄 WS (WebSocket)\n- [x] Built-in RPC WebSocket gateway\n- [x] Binary data packaging\n- [x] High-performance communication stack\n\n## 🧩 Modules\n- [x] OpenAPI: OpenAPI documentation for auto-generated APIs\n- [x] Testing: Now includes unit testing, S2S testing, and mocks.\n- [x] Elastic: Elasticsearch integration for managing indices, documents.\n- [x] Email: Email handling module using SMTP or AWS SES.\n- [x] Encryptor: ECC \u0026 AES-256 encryption utilities\n- [x] Events: Event-driven architecture for seamless communication\n- [x] Inspector: Debugging and monitoring tools\n- [x] Keyv: Key-Value storage (Redis, Memcached, MongoDB)\n- [x] Normalizer: Data transformation module for parsing (JSON, XML, YAML, CSV)\n- [x] Queue: Job queue management (Kafka, RabbitMQ, Redis)\n- [x] UI: UI components for building dynamic applications\n- [x] Vue: Enables integration with Vue.js\n- [x] Vault: Securely stores and retrieves encrypted secrets.\n\n# Deprecations\n\nFrom version 0.8.33, the following changes apply:\n\n* `@cmmv/view` → Merged into `@cmmv/http` (no separate installation needed)\n* `@cmmv/swagger` → Replaced by `@cmmv/openapi`\n* Express is no longer required, replaced by @cmmv/server (4x faster)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmmvio%2Fcmmv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmmvio%2Fcmmv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmmvio%2Fcmmv/lists"}