{"id":20472587,"url":"https://github.com/nestjs-mod/nestjs-mod-example","last_synced_at":"2025-03-05T13:50:58.135Z","repository":{"id":217684597,"uuid":"744430930","full_name":"nestjs-mod/nestjs-mod-example","owner":"nestjs-mod","description":"Example application built with @nestjs-mod/schematics","archived":false,"fork":false,"pushed_at":"2025-01-27T11:50:25.000Z","size":2006,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T12:41:20.521Z","etag":null,"topics":["example","mod","nestjs","nestjs-mod","scaffolded"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nestjs-mod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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-01-17T09:35:58.000Z","updated_at":"2025-01-27T11:50:28.000Z","dependencies_parsed_at":"2024-03-04T08:25:26.394Z","dependency_job_id":"31d6b68d-17a3-4530-bbe1-1e0a22ecb513","html_url":"https://github.com/nestjs-mod/nestjs-mod-example","commit_stats":null,"previous_names":["nestjs-mod/nestjs-mod-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs-mod%2Fnestjs-mod-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs-mod%2Fnestjs-mod-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs-mod%2Fnestjs-mod-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs-mod%2Fnestjs-mod-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nestjs-mod","download_url":"https://codeload.github.com/nestjs-mod/nestjs-mod-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242039686,"owners_count":20061925,"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":["example","mod","nestjs","nestjs-mod","scaffolded"],"created_at":"2024-11-15T14:20:42.918Z","updated_at":"2025-03-05T13:50:58.092Z","avatar_url":"https://github.com/nestjs-mod.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/nestjs-mod/\" target=\"blank\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/155752954?s=200\u0026v=4\" width=\"120\" alt=\"NestJS-mod Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n  \u003cp align=\"center\"\u003eA collection of utilities for unifying \u003ca href=\"https://nestjs.com/\" target=\"_blank\"\u003eNestJS\u003c/a\u003e applications and modules.\u003c/p\u003e\n    \u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.com/org/nestjs-mod\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@nestjs-mod/common.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/org/nestjs-mod\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@nestjs-mod/common.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/org/nestjs-mod\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@nestjs-mod/common.svg\" alt=\"NPM Downloads\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/nestjs-mod/nestjs-mod/actions/workflows/release.yml\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/nestjs-mod/nestjs-mod/actions/workflows/release.yml/badge.svg\" alt=\"Release to NPM\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://t.me/nestjs_mod\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/group-telegram-blue.svg?maxAge=2592000\" alt=\"Telegram Group\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/meY7UXaG\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/discord-online-brightgreen.svg\" alt=\"Discord\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Description\n\nNestJS is a great framework and you can do great things with it, but often when developing a large number of applications within the same organization, we end up with different application architectures, file structures, and a lot of duplicate code.\n\nThe NestJS-mod collection of utilities are designed to unify applications and modules, and also introduce new logical options for dividing responsibilities between modules (Core, Feature, Integration, System, Infrastructure).\n\nSince all parts of the application are unified, you can create a report on the entire project infrastructure.\n\n## Getting started\n\n### Create new application\n\nCommands for create empty NestJS-mod application\n\n```bash\n# Create empty nx project\nnpx --yes create-nx-workspace@20.3.0 --name=project-name --preset=apps --interactive=false --ci=skip\n\n# Go to created project\ncd project-name\n\n# Install all need main dev-dependencies\nnpm install --save-dev @nestjs-mod/schematics@latest\n\n# Create NestJS-mod application\n./node_modules/.bin/nx g @nestjs-mod/schematics:application --linter=eslint --unitTestRunner=jest --directory=apps/app-name --name=app-name --strict=true\n```\n\nStart created application\n\n```bash\n# Prepare all files\nnpm run manual:prepare\n\n# Start application in dev mode\nnpm run serve:dev:app-name\n\n# Build and start application in prod mode\n\n## Build\nnpm run build:prod:app-name\n\n## Start\nnpm run start:prod:app-name\n```\n\n### Create new library\n\nCommands for create empty NestJS-mod library\n\n```bash\n# Create NestJS-mod library\n./node_modules/.bin/nx g @nestjs-mod/schematics:library --linter=eslint --unitTestRunner=jest --buildable --publishable --directory=libs/feature-name --simpleName=true --strict=true\n```\n\nAdd created library to `apps/app-name/src/main.ts`\n\n```ts\n\n// Example without options\nbootstrapNestApplication({\n  ...\n  modules: {\n    feature: [FeatureName.forRoot()],\n  }\n});\n\n// Example with options\nbootstrapNestApplication({\n  ...\n  modules: {\n    feature: [FeatureName.forRoot({\n      configuration: { optionsName: 'options name' },\n    })],\n  }\n});\n\n\n// By default, in the example, the application looks for env by the key `APP_NAME_ENV_NAME`, but you can override it, for example:\nbootstrapNestApplication({\n  ...\n  modules: {\n    feature: [FeatureName.forRoot({\n      environments: { envName: 'env name' },\n    })],\n  }\n});\n```\n\n### Create an infrastructure report\n\nYou can generate a report for all modules and their configurations.\n\n```bash\n# Generate markdown report\nnpm run docs:infrastructure\n```\n\nAfter which the file `INFRASTRUCTURE.MD` appear in the application folder `apps/app-name`.\n\n## Links\n\n- https://github.com/nestjs-mod/nestjs-mod - A collection of utilities for unifying NestJS applications and modules\n- https://github.com/nestjs-mod/nestjs-mod-contrib - Contrib repository for the NestJS-mod\n- https://github.com/nestjs-mod/nestjs-mod-example - Example application built with [@nestjs-mod/schematics](https://github.com/nestjs-mod/nestjs-mod/tree/master/libs/schematics)\n- https://github.com/nestjs-mod/nestjs-mod/blob/master/apps/example-basic/INFRASTRUCTURE.MD - A simple example of infrastructure documentation.\n- https://github.com/nestjs-mod/nestjs-mod-contrib/blob/master/apps/example-prisma/INFRASTRUCTURE.MD - An extended example of infrastructure documentation with a docker-compose file and a data base.\n- https://dev.to/endykaufman/collection-of-nestjs-mod-utilities-for-unifying-applications-and-modules-on-nestjs-5256 - Article about the project NestJS-mod\n- https://habr.com/ru/articles/788916 - Коллекция утилит NestJS-mod для унификации приложений и модулей на NestJS\n\n## Questions\n\nFor questions and support please use the official [Telegram group](https://t.me/nestjs_mod) or [Discord](https://discord.gg/meY7UXaG). The issue list of this repo is **exclusively** for bug reports and feature requests.\n\n## Stay in touch\n\n- Author - [Ilshat Khamitov](https://t.me/KaufmanEndy)\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestjs-mod%2Fnestjs-mod-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnestjs-mod%2Fnestjs-mod-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestjs-mod%2Fnestjs-mod-example/lists"}