TypeScript Dependency Injection

Open-source TypeScript projects categorized as Dependency Injection

Top 23 TypeScript Dependency Injection Projects

  • InversifyJS

    A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.

    Project mention: VulcanSQL: open-source data API framework. Empowering you to construct APIs exclusively with SQL. | /r/node | 2023-07-06

    Inversify (https://inversify.io/) for IoC.

  • loopback-next

    LoopBack makes it easy to build modern API applications that require complex integrations.

  • Appwrite

    Appwrite - The open-source backend cloud platform. The open-source backend cloud platform for developing Web, Mobile, and Flutter applications. You can set up your backend faster with real-time APIs for authentication, databases, file storage, cloud functions, and much more!

  • tsyringe

    Lightweight dependency injection container for JavaScript/TypeScript

    Project mention: SOLID explicado com TypeScript | dev.to | 2023-05-21

    Alguns frameworks trabalham desta forma por padrão, como é o caso do Angular, quando este não é o padrão do framework que utilizamos podemos usar alguma biblioteca, como a Inversify ou tsyringe da Microsoft.

  • typedi

    Simple yet powerful dependency injection tool for JavaScript and TypeScript.

    Project mention: Cerbos + GraphQL: Do not reinvent user permissions | /r/graphql | 2023-05-05

    In this tutorial, we're building a simple application which uses Cerbos inside of a GraphQL server. The server is written in typescript and uses type-graphql to create the schema and resolvers, and TypeDI to handle dependency injection.

  • awilix

    Extremely powerful Inversion of Control (IoC) container for Node.JS

  • marshal.ts

    A new full-featured and high-performance TypeScript framework

    Project mention: We use TypeScript not based on preference, but because we want to make money | news.ycombinator.com | 2023-09-15

    zod or yup gets you quite a bit of the way there in practice - when you would reach for a Typescript type, making it in zod instead is more verbose but gives that runtime layer.

    But for those who actually want full-stack non-stripped runtime type reflection based on Typescript syntax alone... https://deepkit.io/ - https://deepkit.io/blog/introducing-deepkit-framework - is a really promising and cool project.

    It patches the typescript compiler (which pointedly considers runtime type information out of scope) with its own type compiler that emits a bespoke bytecode that is executed in a bespoke VM to communicate runtime type information to both server and client as needed. https://docs.deepkit.io/english/runtime-types.html

    And from that baseline, there are very cool things you can do like an ORM entirely based on type annotations https://docs.deepkit.io/english/database.html or strongly-typed RPCs https://docs.deepkit.io/english/rpc.html .

    It's very much in the alpha stage, but it's really well thought out - there's a tremendous degree of care the developer is taking towards code cleanliness and developer experience. I'm torn between wishing this project to have a fully funded team and take the world by storm, vs. "letting them cook" so to speak and seeing the developer experience unfold organically. Either way, it's a breath of fresh air into the Typescript ecosystem!

  • Ts.ED

    :triangular_ruler: Ts.ED is a Node.js and TypeScript framework on top of Express to write your application with TypeScript (or ES6). It provides a lot of decorators and guideline to make your code more readable and less error-prone. ⭐️ Star to support our work!

    Project mention: Choosing a backend API framework | /r/node | 2023-06-13

    Ts.ED - Controller-based (DI supporting) backend framework that seems to offer quite a lot (although I'm wary of it being quite close to Nest.js)

  • Revelo Payroll

    Free Global Payroll designed for tech teams. Building a great tech team takes more than a paycheck. Zero payroll costs, get AI-driven insights to retain best talent, and delight them with amazing local benefits. 100% free and compliant.

  • foal

    Full-featured Node.js framework, with no complexity. 🚀 Simple and easy to use, TypeScript-based and well-documented.

    Project mention: FoalTS – A Full-Featured Node.js Framework | news.ycombinator.com | 2023-05-18
  • graphql-modules

    Enterprise Grade Tooling For Your GraphQL Server

  • injection-js

    Dependency injection library for JavaScript and TypeScript in 5.1K. It is an extraction of the Angular's ReflectiveInjector which means that it's well designed, feature complete, fast, reliable and well tested.

    Project mention: Typesafe, (almost) Zero Cost Dependency Injection in TypeScript | dev.to | 2023-01-09


  • tst-reflect

    Advanced TypeScript runtime reflection system

  • zedux

    :zap: A Molecular State Engine for React

    Project mention: Thoughts on Signals? | /r/reactjs | 2023-06-29

    Atomic libs include Recoil, Jotai, and the one I maintain: Zedux. Zedux especially was designed to work well with sockets and RxJS observables and has been getting some traction recently, so of course I recommend checking it out. Feel free to hmu with any questions.

  • ioc

    :unicorn: lightweight (<1kb) inversion of control javascript library for dependency injection written in typescript (by owja)

    Project mention: Typesafe, (almost) Zero Cost Dependency Injection in TypeScript | dev.to | 2023-01-09


  • reactant

    A framework for building React applications (by unadlib)

  • brandi

    The dependency injection container powered by TypeScript.

  • automock

    Standalone Library for Automated Mocking of Class Dependencies.

    Project mention: Comprehensive Unit Testing: A Line-by-Line Approach | dev.to | 2023-09-12

    AutoMock -> https://github.com/automock/automock

  • iti

    ~1kB Dependency Injection Library for Typescript and React with a unique support of async flow

    Project mention: The Problem with Dependency Injection Frameworks | news.ycombinator.com | 2023-01-08

    I didn’t want to adopt a framework for a bigger one, so I’ve built a manual DI helper.

    It is for typescript. It is really helpful for me.


  • diod

    A very opinionated inversion of control (IoC) container and dependency injector for Typescript, Node.js or browser apps.

    Project mention: Typesafe, (almost) Zero Cost Dependency Injection in TypeScript | dev.to | 2023-01-09


  • fold

    IoC container with all required goodies to write scalable node applications (by adonisjs)

    Project mention: What to Expect of AdonisJS 6? | dev.to | 2023-07-05

    IoC Container package README file.

  • Ditox.js

    Dependency injection for modular web applications

  • di-compiler

    A Custom Transformer for Typescript that enables compile-time Dependency Injection

    Project mention: Typesafe, (almost) Zero Cost Dependency Injection in TypeScript | dev.to | 2023-01-09


  • obsidian

    Dependency injection library for React and React Native applications (by wix-incubator)

    Project mention: Clean Architecture in React Native? | /r/reactnative | 2023-05-22

    If you coming from Android development and you're missing Dagger/Hilt for dependency injection, you might want to checkout Obsidian which is heavily influenced by Dagger.

  • ditsmod

    Ditsmod is a Node.js web framework, named DI + TS + Mod to emphasize its important components: it has Dependency Injection, written in TypeScript, and designed for good Modularity.

    Project mention: Benchmarks for "Hello, World!". Fastify slowed down a bit, Ditsmod and Restify sped up. | /r/node | 2023-09-06

    My last measurements were when Fastify was v3.25, Restify v8.6 and Ditsmod v2.0. From that moment on, although Fastify remained in the lead, other frameworks came quite close to its results.

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-09-15.

TypeScript Dependency Injection related posts


What are some of the best open-source Dependency Injection projects in TypeScript? This list will help you:

Project Stars
1 InversifyJS 10,307
2 loopback-next 4,645
3 tsyringe 4,415
4 typedi 3,724
5 awilix 3,045
6 marshal.ts 2,899
7 Ts.ED 2,605
8 foal 1,816
9 graphql-modules 1,257
10 injection-js 1,160
11 tst-reflect 292
12 zedux 262
13 ioc 251
14 reactant 246
15 brandi 165
16 automock 124
17 iti 107
18 diod 107
19 fold 106
20 Ditox.js 76
21 di-compiler 72
22 obsidian 65
23 ditsmod 56
Write Clean JavaScript Code. Always.
Sonar helps you commit clean code every time. With over 300 unique rules to find JavaScript bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.