Skip to content

🔧 Feature #975: Dependency Injection Container#998

Open
BhakktiGautam wants to merge 2 commits into
AnthropicBots:mainfrom
BhakktiGautam:feature/dependency-injection
Open

🔧 Feature #975: Dependency Injection Container#998
BhakktiGautam wants to merge 2 commits into
AnthropicBots:mainfrom
BhakktiGautam:feature/dependency-injection

Conversation

@BhakktiGautam

Copy link
Copy Markdown
Contributor

Feature #975: Dependency Injection Container

Problem

Service construction becomes manual as dependencies grow.

Solution

Lightweight dependency injection container.

Benefits

  • Better testability
  • Reduced coupling
  • Cleaner initialization
  • Centralized control

Files Added

  • backend/core/diContainer.js
  • backend/core/serviceRegistration.js
  • backend/middleware/diMiddleware.js
  • backend/routes/diRoutes.js

Lifetimes

  • Singleton (one instance)
  • Scoped (per request/scope)
  • Transient (new instance each time)

Features

  • Constructor injection
  • Factory registration
  • Alias support
  • Scope management
  • Circular dependency detection

**Fixes #975 | Ready for review **

- Add DI container
- Add service registration
- Add DI middleware
- Add DI routes

Fixes: AnthropicBots#975
@hydra-maintainer

Copy link
Copy Markdown

🔍 Quality Gate Report

✅ All quality gates passed!

Status Check Details
Linked Issue PR description references a closing issue ✅

@hydra-maintainer

Copy link
Copy Markdown

💡 Suggested reviewers based on relevant file history: @zaibamachhaliya, @om-dev007

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

@BhakktiGautam is attempting to deploy a commit to the Bhuvansh's projects Team on Vercel.

A member of the Team first needs to authorize it.

@hydra-maintainer

Copy link
Copy Markdown

🔴 PR Health Score: 30/100

This PR's health score is below the 75/100 threshold for a healthy label.

Status Signal
Test coverage
Linked issue
PR description (≥50 chars)
DCO sign-off
⬜ 0 approval(s) Approvals
Diff size < 400 lines

Improving these signals will help reviewers engage faster and raise your score. 💪

@hydra-maintainer

Copy link
Copy Markdown

🔍 Quality Gate Report

✅ All quality gates passed!

Status Check Details
Linked Issue PR description references a closing issue ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ARCHITECTURE] Introduce Internal Dependency Injection Container

1 participant