{"id":13527567,"url":"https://github.com/uditalias/injex","last_synced_at":"2025-05-08T23:31:32.338Z","repository":{"id":38694844,"uuid":"237827188","full_name":"uditalias/injex","owner":"uditalias","description":"Simple, Decorated, Pluggable dependency-injection framework for TypeScript applications","archived":false,"fork":false,"pushed_at":"2024-06-28T02:30:27.000Z","size":21516,"stargazers_count":84,"open_issues_count":43,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T12:06:21.326Z","etag":null,"topics":["container","dependency","dependency-injection-container","inject","ioc"],"latest_commit_sha":null,"homepage":"https://www.injex.dev","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/uditalias.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":"2020-02-02T19:50:56.000Z","updated_at":"2025-04-08T01:33:54.000Z","dependencies_parsed_at":"2024-01-13T22:53:46.007Z","dependency_job_id":"8a55c5ba-96cf-4ebb-aa6c-a55559b8cb4b","html_url":"https://github.com/uditalias/injex","commit_stats":{"total_commits":410,"total_committers":5,"mean_commits":82.0,"dds":"0.24878048780487805","last_synced_commit":"c365f736a9411cf661dec53fac9be3ce1dd0b982"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditalias%2Finjex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditalias%2Finjex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditalias%2Finjex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditalias%2Finjex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uditalias","download_url":"https://codeload.github.com/uditalias/injex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253163799,"owners_count":21864140,"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":["container","dependency","dependency-injection-container","inject","ioc"],"created_at":"2024-08-01T06:01:52.133Z","updated_at":"2025-05-08T23:31:32.317Z","avatar_url":"https://github.com/uditalias.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cimg src=\"website/static/img/poster.png\"  /\u003e\n\n\u003ch1\u003e\n    Injex \u003cimg src=\"https://img.shields.io/npm/v/@injex/core\" valign=\"middle\" /\u003e \u003ca href=\"https://github.com/uditalias/injex/blob/master/LICENSE\"\u003e\u003cimg valign=\"middle\" src=\"https://img.shields.io/github/license/uditalias/injex.svg?maxAge=2592000\" alt=\"Injex License\"\u003e\u003c/a\u003e \u003ca href=\"https://nodejs.org/\"\u003e\u003cimg valign=\"middle\" src=\"https://img.shields.io/badge/node-%3E=8.17-brightgreen.svg?maxAge=2592000\" alt=\"Node Version\"\u003e\u003c/a\u003e \u003ca href=\"https://www.typescriptlang.org/\"\u003e\u003cimg valign=\"middle\" src=\"https://img.shields.io/badge/TypeScript-%3E=3.0.0-brightgreen.svg?maxAge=2592000\" alt=\"TypeScript Version\"\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\u003ch3\u003eSimple, Decorated, Pluggable dependency-injection framework for TypeScript applications\u003c/h3\u003e\n\u003cp\u003eInjex makes software architecture more easy \u0026 fun by creating a dependency tree between your application modules with a minimal API.\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\n\n[Home](https://www.injex.dev)\n·\n[Docs](https://www.injex.dev/docs/introduction)\n·\n[Runtimes](https://www.injex.dev/docs/runtimes/node)\n·\n[Plugins](https://www.injex.dev/docs/plugins)\n·\n[Examples](https://www.injex.dev/docs/examples)\n\u003c/h3\u003e\n\n## Installation\n\nStart by installing the core package. This package includes most of the functionality you're going to use when working with the Injex framework.\n\n```bash\nnpm install --save @injex/core\n```\n\nAfter the core is installed and based on your project, you need to install a runtime container. The runtime container enables modules definition and registration across your application.\n\nYou can currently choose between the Node, Webpack or Vite runtimes for the server or the client.\n\n#### Node Runtime\n\nCreate a dependency-injection container inside a Node.JS application.\n\n```bash\nnpm install --save @injex/node\n```\n\n#### Webpack Runtime\n\nCreate a dependency-injection container inside a Webpack client-side application.\n\n```bash\nnpm install --save @injex/webpack\n```\n\n#### Vite Runtime\n\nCreate a dependency-injection container inside a Vite client-side application.\n\n```bash\nnpm install --save @injex/vite\n```\n\n\u003cimg src=\"website/static/img/poster_twitter.png\" /\u003e\n\n## Getting Started\n\n### Basic Usage\n\nCreate an Injex Node runtime container.\n\n```typescript\nimport { Injex } from \"@injex/node\";\n\nInjex.create({\n    rootDirs: [\n        \"./src\"\n    ]\n}).bootstrap()\n```\n\nInjex will scan all the files and folders recursively and look for Injex modules.\n\nModule definition example:\n\n```typescript\n// src/services/mailService.ts\nimport { define, singleton, inject } from \"@injex/core\";\n\n@define()\n@singleton()\nexport class MailService {\n    @inject() private mailProvider: IMailProvider;\n\n    public sendMail(mail: Mail) {\n        this.mailProvider.send(mail);\n    }\n}\n```\n\nSince Injex automatically scans all the files and folders inside the `rootDirs`, this is all you need to do to create an injectable module.\n\n[Learn more \u003e\u003e](https://www.injex.dev/docs/getting-started)\n\n### Plugins\n\nInjex is pluggable, so you can use and create your plugins to enrich your applications.\n\n📦 **Env Plugin** - Manage environment variables across your application. [Docs \u0026#8594;](https://www.injex.dev/docs/plugins/env)\n\n📦 **Express Plugin** - Use Injex to power up your Express application by creating controllers, better route handlers, and middlewares. [Docs \u0026#8594;](https://www.injex.dev/docs/plugins/express)\n\n📦 **React Plugin** - Use React hooks to inject dependencies into components. [Docs \u0026#8594;](https://www.injex.dev/docs/plugins/react)\n\n[Learn more](https://www.injex.dev/docs/plugins) about Injex plugins and the plugin anatomy.\n\n## Live Example\n\nCheckout this live chat application built with Injex \u0026 Injex Plugins using React and Mobx\n\n- **[https://chat.injex.dev](https://chat.injex.dev)** ([source](examples/injex-react-plugin-example/))\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"website/static/img/injex_react_chat.png\" /\u003e\n\u003c/p\u003e\n\n\n## Follow Us\n\nFollow us on [Twitter](https://twitter.com/injex_framework) or join our live [Discord](https://discord.gg/JWxbhXd8aX) server for more help, ideas, and discussions.\n\n## Author\n\n| [![twitter/uditalias](https://gravatar.com/avatar/838347acc4c97bfc938a2dac4043bd2a?s=70)](http://twitter.com/uditalias \"Follow @uditalias on Twitter\") |\n|---|\n| [Udi Talias](https://github.com/uditalias/) |\n\n## License\n\nThis repository is available under the [MIT License](./LICENSE).\n\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"website/static/img/logo.svg\" width=\"60\" height=\"60\" /\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuditalias%2Finjex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuditalias%2Finjex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuditalias%2Finjex/lists"}