Skip to main content

Documentation Index

Fetch the complete documentation index at: https://validlab-89017292.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Wyrly DI is a dependency injection toolkit for explicit, analyzable, type-safe application architecture. Use it when you want dependency injection for modern TypeScript apps without legacy decorator metadata, automatic runtime type guessing, or framework lock-in.

Get started

Install @wyrly/core for Deno, Node.js, or Bun and create your first container.

Why Wyrly?

Learn why Wyrly uses typed tokens, explicit dependencies, and standard decorators.

Framework adapters

Add request-scoped DI to Next.js, Express, Hono, Fresh, or GraphQL.

API reference

See the stable public exports for Wyrly DI v2.0.

What Wyrly is for

Wyrly is designed for TypeScript applications that value clear composition roots, explicit dependencies, and framework-independent domain code. It fits especially well with DDD and Clean Architecture, where use cases depend on ports and the outer layer wires concrete infrastructure through typed tokens.

Core ideas

  • No reflect-metadata
  • No emitDecoratorMetadata
  • No parameter decorators
  • Type-safe tokens
  • Explicit dependencies
  • Singleton, scoped, and transient lifetimes
  • Request scopes for web frameworks
  • Inspectable and validatable dependency graphs

Packages

PackagePurpose
@wyrly/coreCore container, typed tokens, lifetimes, validation, graph inspection
@wyrly/nextNext.js App Router request-scoped DI
@wyrly/expressExpress middleware for one DI scope per request
@wyrly/honoHono middleware for edge-friendly DI scopes
@wyrly/freshFresh 2.x middleware and route helpers
@wyrly/graphqlGraphQL request context integration

Start with an example

If you are new to Wyrly, start with the core quickstart, then pick the adapter that matches your runtime.

Core quickstart

Register a repository implementation and resolve a use case from a scope.

Examples

Find runnable examples for DDD, provider patterns, graph validation, and web frameworks.