inversify-di

Community

Design clean DI bindings and test overrides.

Authorrecca0120
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Inversify dependency injection can become inconsistent and hard to test when service identifiers, bindings, scopes, and overrides are scattered across the codebase.

Core Features & Use Cases

  • Central TYPES Registry: Defines a consistent Symbol-based service identifier map for server dependencies.
  • Inline Container Bindings: Documents how the server binds core services directly in the container without ContainerModule, including singleton scopes.
  • Constructor Injection with Optional Dependencies: Shows a practical injectable service pattern using @injectable() and @inject(), including optional settings injection.
  • Testing-Friendly Overrides: Provides an approach for swapping bindings in a test container via container.rebindSync-style calls (and notes v8 changes).
  • Migration Guidance for Inversify v8: Calls out breaking API changes relevant to this project's current test container setup.

Quick Start

Use this guidance when updating apps/server/src/container.ts and apps/server/src/types.ts, especially if you are adding a new injectable service, changing binding scopes, or adjusting test-time dependency overrides.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 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: inversify-di
Download link: https://github.com/recca0120/code-quest/archive/main.zip#inversify-di

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 471,000+ vetted skills library on demand.