Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
Top 20 TypeScript IoC Projects
-
InversifyJS
A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.
Take a class for which we are tasked to write a unit test. This class may have a dozen methods and a dozen more attributes. In my environment we were already using inversify to dependency inject into this class, and using container snapshot and restore as setup and teardown operators, in our jest test file. But it began getting out of control even after refactoring into test cases and test runners.
-
Quick Start
🍔 A Node.js Serverless Framework for front-end/full-stack developers. Build the application for next decade. Works on AWS, Alibaba Cloud, Tencent Cloud and traditional VM/Container. Super easy integrate with React and Vue. 🌈
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
loopback-next
LoopBack makes it easy to build modern API applications that require complex integrations.
-
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.
-
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.
-
-
express-typescript-boilerplate
A delightful way to building a RESTful API with NodeJs & TypeScript by @w3tecch
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
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!
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)
-
ioc
:unicorn: lightweight (<1kb) inversion of control javascript library for dependency injection written in typescript (by owja)
-
diod
A very opinionated inversion of control (IoC) container and dependency injector for Typescript, Node.js or browser apps.
-
-
node-typescript-architecture
Hexagonal architecture / ports-and-adapters for Node.js using simple functional programming
It's opinionated, and it's self promotion, but this is what I've used for every project of mine since 2020: https://github.com/jbreckmckye/node-typescript-architecture
-
-
-
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.
-
pumpit
PumpIt is a small (~2KB) dependency injection container without the decorators, suitable for the browser.
-
aggregator
Websocket client which subscribes and processes data from the Census Streaming Service, passing it to the PS2Alerts API via RabbitMQ.
-
-
Note: the reason "IUserRepository" is passed here as a string to bind() is because Typescript interfaces are not "real" types or symbols, unlike classes, so therefore we must use the string name of them. However, the autogenerated code contains simple union-type that makes sure you pass a correct name for the interface to bind() The key here is that there is an additional pre-preprocessing step that uses Typescript compiler to parse the arguments of each constructor and generates a project-specific IOC container code with a tree of depenedencies, allowing to resolve them in runtime (basically an additional .ts file in your source code folder). You can also run it in watch mode, so it actively rebuilds the tree as you edit the code in project, or just make it a required step before running your app in npm start for example. The example of auto generated container code, that you import in your project can be found there: Github
-
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
TypeScript IoC related posts
- How to Apply SOLID with Testing JS/TS Class Methods
- SOLID explicado com TypeScript
- Approach to applying DI container to an existing codebase?
- Announcing TypeScript 5.0 Beta
- Typesafe, (almost) Zero Cost Dependency Injection in TypeScript
- The Problem with Dependency Injection Frameworks
- InversifyJS has reached 100,000,000 downloads on npm
-
A note from our sponsor - InfluxDB
www.influxdata.com | 29 Mar 2024
Index
What are some of the best open-source IoC projects in TypeScript? This list will help you:
Project | Stars | |
---|---|---|
1 | InversifyJS | 10,737 |
2 | Quick Start | 7,121 |
3 | loopback-next | 4,831 |
4 | tsyringe | 4,726 |
5 | typedi | 3,892 |
6 | awilix | 3,296 |
7 | express-typescript-boilerplate | 3,182 |
8 | Ts.ED | 2,715 |
9 | ioc | 270 |
10 | diod | 121 |
11 | iti | 115 |
12 | node-typescript-architecture | 110 |
13 | Ditox.js | 83 |
14 | di-compiler | 76 |
15 | obsidian | 74 |
16 | pumpit | 22 |
17 | aggregator | 11 |
18 | lambda-ioc | 8 |
19 | genioc | 7 |
20 | karambit | 4 |