dependency-injection-setup

Community

Streamline server DI with tsyringe.

AuthorCatOfJupit3r
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Dependency injection reduces tight coupling by centralizing service creation and resolution, enabling easy testing and scalable architecture in server-side code.

Core Features & Use Cases

  • Create services under apps/server/src/features/<feature> and annotate with @injectable to enable DI.
  • Register tokens in apps/server/src/di/tokens.ts and map token values to types.
  • Register and resolve services in apps/server/src/di/container.ts, and access them via resolve or DI getters.
  • Use constructor injection with @inject for dependencies to promote testability and modularity.
  • Leverage service lifecycles (Singleton/Transient) to control instance scope and state.

Quick Start

Register a service token, implement the service, register it in the container, and resolve it in a handler.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: dependency-injection-setup
Download link: https://github.com/CatOfJupit3r/ultimate-starter/archive/main.zip#dependency-injection-setup

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.