NovaDI Roadmap & Ideas

Future features and improvements planned for NovaDI

This document contains ideas and potential features for future development of NovaDI. These are organized by focus area and represent possibilities rather than commitments.

1. Transformer Improvements

Dependency Graph Generation

Generate a complete dependency graph during compilation showing all services and their dependencies. This would help developers understand the structure of their application and identify potential issues.

Priority: Medium Complexity: High Value: High

Output formats:

  • JSON: Machine-readable format for tooling integration
  • Mermaid: For markdown documentation

Benefits:

  • Visual overview of entire DI container
  • Easier debugging of complex dependency chains
  • Automated documentation generation
  • Integration with CI/CD pipelines
  • Dependency analysis and metrics

Visual Graph Export & Preview

Export and preview dependency graphs during development for immediate feedback.

Priority: Medium Complexity: High Value: Medium

Features:

  • Real-time graph preview in IDE or browser
  • Show all registered services and their relationships
  • Highlight unresolved dependencies in red
  • Interactive graph exploration (zoom, filter, search)
  • Export to multiple formats for documentation

Compile-time Container Validation

Analyze the entire container configuration during transformation to detect issues before runtime.

Priority: High Complexity: High Value: Very High

Validation checks:

  • Missing Registrations: Detect when code tries to resolve a service that was never registered
  • Circular Dependencies: Identify dependency cycles with full path information
  • Type Mismatches: Ensure resolved types match registered types
  • Lifetime Violations: Detect when singleton depends on transient (potential memory leak)

Benefits:

  • Catch all container configuration errors at compile-time
  • Zero-runtime overhead for validation
  • Clear error messages with full dependency chain context
  • IDE integration showing errors inline as you code
  • Faster development feedback loop

Compile-time Circular Dependency Detection

Analyze the dependency graph during transformation to detect circular dependencies before runtime. Currently these are only caught when resolving.

Priority: High
Complexity: Medium
Business Value: High

Benefits:

  • Catch errors at compile-time instead of runtime
  • Clear error messages pointing to the cycle with full path
  • Faster development feedback loop

Unused Binding Detection

Warn developers about services registered in the container that are never resolved anywhere in the codebase.

Priority: Low Complexity: Medium Value: Medium

Detection capabilities:

  • Identify registered but unused services
  • Suggest removing dead registrations
  • Optimize container size

Dead Code Elimination for DI Registrations

Integration with tree-shaking to remove unused service registrations from production builds.

Priority: Medium Complexity: High Value: High

Benefits:

  • Smaller bundle sizes
  • Faster container initialization
  • Cleaner production code

Auto-generate Container Configuration

Analyze all interfaces and classes in the project to automatically generate suggested container configuration.

Priority: Low Complexity: High Value: Medium

Features:

  • Scan for all injectable classes
  • Suggest registration strategy (singleton/transient/scoped)
  • Generate boilerplate registration code
  • Interactive CLI for configuration

2. Performance Optimization

Advanced Caching Strategies

Implement LRU (Least Recently Used) cache for frequently resolved transient dependencies to avoid repeated instantiation.

Priority: Low Complexity: Medium Value: Medium

Strategies:

  • LRU cache with configurable size
  • Time-based cache invalidation
  • Per-token cache configuration

Incremental TypeScript Program Compilation

Replace ts.createProgram() with ts.createIncrementalProgram() to cache compilation results between builds. This dramatically reduces rebuild times by reusing type information from previous compilations.

Priority: High Complexity: Medium Value: Very High

Current Performance (41 files):

  • First build: 604ms program creation
  • Rebuilds: 604ms every time (no caching)
  • Per-file cost: ~15ms per file

Expected Performance with Incremental:

  • First build: ~300-400ms (with optimized tsconfig)
  • Rebuilds: ~50-100ms (cached type information)
  • Combined optimization: ~30-50ms for subsequent builds

Implementation:

  • Use ts.createIncrementalProgram() instead of ts.createProgram()
  • Store oldProgram reference between builds
  • Add .tsbuildinfo to .gitignore
  • Configure incremental compilation in tsconfig.json

Benefits:

  • 10-12x faster rebuilds (604ms → 50-100ms)
  • Better developer experience during development
  • Reuses type checker across builds
  • Particularly impactful for watch mode and HMR
  • Minimal code changes required

Lazy Initialization

Defer singleton creation until first resolution instead of during container build. Especially useful for heavy services.

Priority: Medium Complexity: Medium Value: High

Benefits:

  • Faster application startup
  • Reduced memory usage for unused services
  • Optional eager initialization for critical services

Memory Pooling Enhancements

Expand the current context pooling system to other internal data structures.

Priority: Low Complexity: Medium Value: Medium

Candidates for pooling:

  • Resolution path arrays
  • Dependency maps
  • Error context objects

Benchmark Suite Development

Comprehensive automated benchmarking to track performance across versions and prevent regressions.

Priority: High Complexity: Medium Value: High

Metrics:

  • Resolution speed (singleton, transient, scoped)
  • Container build time
  • Memory usage
  • Batch resolution performance
  • Comparison with other DI frameworks

Tree-shaking Support Improvements

Better integration with bundlers to eliminate unused code more effectively.

Priority: Medium Complexity: Medium Value: High

Improvements:

  • Mark all APIs with /*#__PURE__*/ annotations
  • Optimize for bundler side-effect detection
  • Provide separate entry points for features

Parallel Resolution

Resolve independent dependencies in parallel using worker threads or async resolution.

Priority: Low Complexity: High Value: Medium

Use cases:

  • Async factories with parallel execution
  • Batch resolution optimization
  • Microservice coordination

3. Developer Experience

CLI Tools

Command-line tools for inspecting, validating, and debugging containers.

Priority: Medium Complexity: Medium Value: High

Commands:

  • novadi inspect - Show all registered services
  • novadi validate - Check all dependencies resolve
  • novadi graph - Generate dependency graph
  • novadi analyze - Performance profiling
  • novadi doctor - Diagnose common issues

VS Code Extension

Editor integration for improved development experience.

Priority: High Complexity: High Value: Very High

Features:

  • Go to definition: Jump from resolve() to registration
  • IntelliSense: Show available services when typing
  • Inline errors: Show unresolved dependencies in editor
  • Refactoring: Rename services safely
  • Dependency viewer: Sidebar showing container structure

Enhanced Error Messages

Improve error messages with actionable suggestions and context.

Priority: High Complexity: Low Value: High

Improvements:

  • "Did you mean X?" suggestions for typos
  • Show dependency chain leading to error
  • Suggest fixes for common mistakes
  • Link to relevant documentation

IntelliSense Support

Better TypeScript type inference for autowiring and resolution.

Priority: Medium Complexity: High Value: High

Goals:

  • Autocomplete parameter names in autowire maps
  • Show available interfaces when using resolveType()
  • Type-safe token creation
  • Generic constraint improvements

Container Validation API

Programmatic API to validate container configuration before runtime.

Priority: Medium Complexity: Medium Value: High

Validation checks:

  • All registered services can be resolved
  • No circular dependencies exist
  • All required dependencies are registered
  • Lifetime compatibility checks

Debug Mode

Special debug mode with extensive logging and introspection.

Priority: Medium Complexity: Low Value: Medium

Features:

  • Log every resolution with timing
  • Track resolution context depth
  • Detect potential memory leaks
  • Performance bottleneck identification

Testing Utilities

Helper functions and utilities for testing code with dependency injection.

Priority: High Complexity: Low Value: High

Utilities:

  • Mock container builder
  • Spy/stub helpers for dependencies
  • Snapshot testing for container configuration
  • Integration test helpers

4. Documentation & Examples

Real-world Application Examples

Complete example applications demonstrating NovaDI in production scenarios.

Priority: High Complexity: Medium Value: Very High

Examples:

  • Express.js REST API with database layer
  • Fastify microservice with multiple dependencies
  • GraphQL server with complex resolvers
  • CLI tool with plugin system
  • React SSR application with DI
  • WebSocket server with state management

Migration Guides

Step-by-step guides for migrating from other DI frameworks.

Priority: Medium Complexity: Low Value: High

Frameworks to cover:

  • InversifyJS → NovaDI
  • TSyringe → NovaDI
  • TypeDI → NovaDI
  • Awilix → NovaDI
  • NestJS DI → NovaDI

Video Tutorials

Video content covering setup, usage, and advanced features.

Priority: Medium Complexity: Medium Value: High

Tutorial topics:

  • Getting started (5 minutes)
  • Transformer setup and configuration
  • Advanced autowiring strategies
  • Performance optimization techniques
  • Building a real application
  • Common pitfalls and solutions

Interactive Playground

Web-based environment for experimenting with NovaDI.

Priority: Low Complexity: High Value: Medium

Features:

  • In-browser TypeScript compilation
  • Live transformer preview
  • Dependency graph visualization
  • Shareable examples
  • Common patterns library

Best Practices Documentation

Comprehensive Documentation on how to use NovaDI effectively.

Priority: High Complexity: Low Value: Very High

Topics:

  • Composition root pattern
  • When to use singleton vs transient vs scoped
  • Organizing large containers
  • Testing strategies
  • Performance optimization
  • Module organization

Anti-patterns Documentation

Document common mistakes and anti-patterns to avoid.

Priority: Medium Complexity: Low Value: High

Anti-patterns:

  • Service Locator anti-pattern
  • Decorators everywhere (why NovaDI avoids this)
  • Circular dependencies
  • Fat containers
  • Runtime registration
  • God objects

API Reference Documentation

Complete API documentation with examples for every method.

Priority: Medium Complexity: Low Value: High

Format:

  • TypeDoc generated docs
  • Interactive examples
  • Parameter descriptions
  • Return value documentation
  • Error conditions

Architecture Deep Dive

Technical documentation explaining internal implementation details.

Priority: Low Complexity: Medium Value: Medium

Topics:

  • Resolution algorithm
  • Caching strategies
  • Transformer AST manipulation
  • Type system integration
  • Performance optimizations
  • Design decisions and tradeoffs

5. Additional Ideas

Plugin System

Extensible plugin system for custom behaviors.

Priority: Low Complexity: High Value: Medium

Plugin types:

  • Resolution middleware
  • Lifecycle hooks
  • Custom scopes
  • Logging/monitoring integrations

Scope Improvements

Enhanced scoping system for more complex scenarios.

Priority: Medium Complexity: Medium Value: Medium

Improvements:

  • Request scope for HTTP frameworks
  • Tenant scope for multi-tenant applications
  • Custom scope creation API
  • Nested scope support

Async Resolution

Full support for async factories and resolution.

Priority: Medium Complexity: High Value: High

Features:

  • resolveAsync() method
  • Async factory support
  • Parallel async resolution
  • Promise pooling

Conditional Registration

Register services based on runtime conditions.

Priority: Low Complexity: Medium Value: Medium

Use cases:

  • Feature flags
  • Environment-based registration
  • A/B testing scenarios
  • Dynamic module loading

Health Checks

Built-in health check system for registered services.

Priority: Low Complexity: Medium Value: Medium

Features:

  • Service health status
  • Dependency health propagation
  • Integration with monitoring systems
  • Graceful degradation

Configuration Management

Integrated configuration management for services.

Priority: Medium Complexity: Medium Value: High

Features:

  • Type-safe configuration injection
  • Environment variable binding
  • Configuration validation
  • Hot reload support

Contributing Ideas

Have an idea not listed here? Consider:

  1. Opening an issue on GitHub to discuss
  2. Creating a proof-of-concept
  3. Joining discussions in existing issues
  4. Contributing to documentation

All ideas are welcome, whether they focus on performance, developer experience, features, or documentation!