{"id":27525608,"url":"https://github.com/deadislove/nestjs-microkernel-architecture-template","last_synced_at":"2025-10-08T06:50:07.864Z","repository":{"id":288119845,"uuid":"966903427","full_name":"deadislove/nestJS-microkernel-architecture-template","owner":"deadislove","description":"NestJS Microkernel Architecture Template with Docker – A scalable, modular backend template with dynamic plugin loading, including Docker and Docker Compose support for easy setup and deployment.","archived":false,"fork":false,"pushed_at":"2025-09-26T01:44:51.000Z","size":166,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-26T03:46:20.621Z","etag":null,"topics":["docker","docker-compose","env","microkernel-architecture","nestjs","typeorm","typescript"],"latest_commit_sha":null,"homepage":"","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/deadislove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-15T16:15:56.000Z","updated_at":"2025-09-26T01:44:54.000Z","dependencies_parsed_at":"2025-04-15T17:34:09.461Z","dependency_job_id":"b113f1ce-c723-4ee0-b88a-e94f76850c5f","html_url":"https://github.com/deadislove/nestJS-microkernel-architecture-template","commit_stats":null,"previous_names":["deadislove/nestjs-microkernel-architecture-template"],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/deadislove/nestJS-microkernel-architecture-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadislove%2FnestJS-microkernel-architecture-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadislove%2FnestJS-microkernel-architecture-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadislove%2FnestJS-microkernel-architecture-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadislove%2FnestJS-microkernel-architecture-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deadislove","download_url":"https://codeload.github.com/deadislove/nestJS-microkernel-architecture-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadislove%2FnestJS-microkernel-architecture-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903008,"owners_count":26065786,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["docker","docker-compose","env","microkernel-architecture","nestjs","typeorm","typescript"],"created_at":"2025-04-18T14:27:06.376Z","updated_at":"2025-10-08T06:50:07.859Z","avatar_url":"https://github.com/deadislove.png","language":"TypeScript","funding_links":["https://opencollective.com/nest","https://paypal.me/kamilmysliwiec","https://ko-fi.com/F1F82YR41'"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://nestjs.com/img/logo-small.svg\" width=\"120\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456\r\n[circleci-url]: https://circleci.com/gh/nestjs/nest\r\n\r\n  \u003cp align=\"center\"\u003eA progressive \u003ca href=\"http://nodejs.org\" target=\"_blank\"\u003eNode.js\u003c/a\u003e framework for building efficient and scalable server-side applications.\u003c/p\u003e\r\n    \u003cp align=\"center\"\u003e\r\n\u003ca href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@nestjs/core.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\r\n\u003ca href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@nestjs/core.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\r\n\u003ca href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@nestjs/common.svg\" alt=\"NPM Downloads\" /\u003e\u003c/a\u003e\r\n\u003ca href=\"https://circleci.com/gh/nestjs/nest\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/circleci/build/github/nestjs/nest/master\" alt=\"CircleCI\" /\u003e\u003c/a\u003e\r\n\u003ca href=\"https://discord.gg/G7Qnnhy\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/discord-online-brightgreen.svg\" alt=\"Discord\"/\u003e\u003c/a\u003e\r\n\u003ca href=\"https://opencollective.com/nest#backer\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/nest/backers/badge.svg\" alt=\"Backers on Open Collective\" /\u003e\u003c/a\u003e\r\n\u003ca href=\"https://opencollective.com/nest#sponsor\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/nest/sponsors/badge.svg\" alt=\"Sponsors on Open Collective\" /\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://paypal.me/kamilmysliwiec\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Donate-PayPal-ff3f59.svg\" alt=\"Donate us\"/\u003e\u003c/a\u003e\r\n    \u003ca href=\"https://opencollective.com/nest#sponsor\"  target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg\" alt=\"Support us\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://twitter.com/nestframework\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/nestframework.svg?style=social\u0026label=Follow\" alt=\"Follow us on Twitter\"\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n  \u003c!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)\r\n  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)--\u003e\r\n\r\n\u003c!--![Visitors](https://visitor-badge.laobi.icu/badge?page_id=deadislove.nestJS-microkernel-architecture-template) --\u003e\r\n![Visitors](https://img.shields.io/badge/visitors-118_total-brightgreen)\r\n![Clones](https://img.shields.io/badge/clones-23_total_18_unique-blue) \u003c!--CLONE-BADGE--\u003e\r\n\r\n## 🧩 Project Overview\r\n\r\nThis template implements a Microkernel (Plug-in) architecture with NestJS. It enables modular design, dynamic feature loading, and scalable domain separation. It’s well-suited for building feature-rich and extensible backend systems.\r\n\r\n\u003ca href='https://ko-fi.com/F1F82YR41' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi6.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\r\n\r\n## 🏗 Architecture Concept\r\n\r\nThis system is divided into 3 major containers:\r\n\r\n- Core Container\r\n\r\n  - Coordinates plugin lifecycle and provides core services (Logger, Registry, Loader).\r\n\r\n- Plugin Container\r\n\r\n  - Holds feature modules (User, Product, etc.), each as an independent plugin.\r\n\r\n- Infrastructure Container\r\n\r\n  - Provides shared infrastructure like database connections using DatabaseFactory.\r\n\r\nThe structure promotes low coupling, testability, and scalability.\r\n\r\n## 🧱 Project Structure\r\n\r\nBased on the architecture graph, here’s the folder layout:\r\n\r\n```\r\n├───src\r\n│   ├───core\r\n│   │   ├───core.module.ts\r\n│   │   ├───core.service.ts\r\n│   │   ├───logger\r\n│   │   │   └───logger.service.ts\r\n│   │   ├───plugin\r\n│   │   │   ├───plugin.registry.ts\r\n│   │   │   └───dynamic.loader.ts\r\n│   │   └───core.interface.ts\r\n│   │\r\n│   ├───plugins\r\n│   │   ├───user\r\n│   │   │   ├───user.module.ts\r\n│   │   │   ├───user.controller.ts\r\n│   │   │   ├───user.service.ts\r\n│   │   │   ├───user.repository.ts\r\n│   │   │   └───user.entity.ts\r\n│   │   └───product\r\n│   │       ├───product.module.ts\r\n│   │       ├───product.controller.ts\r\n│   │       ├───product.service.ts\r\n│   │       ├───product.repository.ts\r\n│   │       └───product.entity.ts\r\n│   │\r\n│   ├───infrastructure\r\n│   │   ├───database\r\n│   │   │   ├───database.module.ts\r\n│   │   │   ├───database.factory.ts\r\n│   │   │   ├───sqlite\r\n│   │   │   ├───postgres\r\n│   │   │   └───mysql\r\n│   │\r\n│   ├───shared\r\n│   └───main.ts\r\n└───test\r\n```\r\n\r\n## 🧩 Plugin Development Guide\r\n\r\nWhen developing a new plugin, follow the steps below:\r\n\r\n1. Create a directory under ```src/plugins```, e.g., order\r\n\r\n2. Implement the following components:\r\n\r\n    - ```order.module.ts```\r\n    - ```order.controller.ts```\r\n    - ```order.service.ts```\r\n    - ```order.repository.ts```\r\n    - ```order.entity.ts```\r\n\r\n3. Register the plugin in the ```PluginRegistry```\r\n\r\n4. (Optional) Implement the ```initialize()``` and ```shutdown()``` lifecycle hooks\r\n\r\n5. For logging, use ```LoggerService``` via dependency injection (DI)\r\n\r\n## Project setup\r\n\r\n```bash\r\n$ npm install\r\n```\r\n\r\n## Compile and run the project\r\n\r\n```bash\r\n# development\r\n$ npm run start\r\n\r\n# watch mode\r\n$ npm run start:dev\r\n\r\n# production mode\r\n$ npm run start:prod\r\n```\r\n\r\n## Run tests\r\n\r\n```bash\r\n# unit tests\r\n$ npm run test\r\n\r\n# e2e tests\r\n$ npm run test:e2e\r\n\r\n# test coverage\r\n$ npm run test:cov\r\n```\r\n\r\n## Deployment\r\n\r\nWhen you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.\r\n\r\nIf you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:\r\n\r\n```bash\r\n$ npm install -g mau\r\n$ mau deploy\r\n```\r\n\r\nWith Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.\r\n\r\n## Resources\r\n\r\nCheck out a few resources that may come in handy when working with NestJS:\r\n\r\n- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.\r\n- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).\r\n- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).\r\n- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.\r\n- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).\r\n- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).\r\n- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).\r\n- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).\r\n\r\n## Support\r\n\r\nNest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).\r\n\r\n## Stay in touch\r\n\r\n- Author - [Da-Wei Lin](https://www.linkedin.com/in/da-wei-lin-689a35107/)\r\n- Website - [David Weblog](https://davidskyspace.com/)\r\n- Twitter - [@nestframework](https://twitter.com/nestframework)\r\n\r\n## License\r\n\r\nNest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadislove%2Fnestjs-microkernel-architecture-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeadislove%2Fnestjs-microkernel-architecture-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadislove%2Fnestjs-microkernel-architecture-template/lists"}