Skip to content

marhali/depjack

Repository files navigation

depjack

Github Actions Workflow Status Github Actions Workflow Status Codecov Donate

Fully typed dependency injection for your next enterprise-grade TypeScript project. Universally applicable in all environments with additional adapter modules that provide environment-specific functionalities. Ideal for development projects in which the domain core is separated from other layers (e.g. CQRS).

Modules

Module Description
@depjack/core Main module which provides the core functionalities of a fully typed dependency injection container.
@depjack/react Adapter which provides React-specific functions to ease usage.

Features

  • Full type support for dependency definition & resolution.
  • Definition of non-lazy dependencies, which are loaded with the initialization of the runtime environment.
  • Definition of lazy dependencies, which are loaded on-demand (initialization on first request).
  • Designed for scalability through module separation and minimal initial overhead.
  • Ready for critical environments as no external dependencies are used.
  • Prefabricated adapters that simplify use with frameworks and other technologies.

Usage

Getting started

In order to use depjack you need to install the required modules and configure them in a three-step configuration process. The configuration consists of:

Based on this configuration, a runtime environment is created which manages and instantiates requested dependencies.

For a quick start, take a look at the corresponding instructions for the individual modules. Each module shows a basic configuration of how it can be used in the respective environment.

Examples

Example implementations that are based on real-world use cases.

Example Description
standalone Demonstrates use without a specific environment (vanilla use).
react Demonstrates use in a React application.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Marcel Haßlinger - @marhali_de - Portfolio Website

Project Link: https://github.com/marhali/depjack

Donation

If this project helps you to reduce development time, you can give me a cup of coffee :)

About

Fully typed dependency injection for your next enterprise-grade TypeScript project.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •