Available Modules
Core Modules
These modules provide fundamental building blocks for your application:Dependency Injection (@resolid/di)
A lightweight, fully-typed dependency injection container for TypeScript.
When to use:
- Managing application dependencies and their lifecycles
- Implementing inversion of control patterns
- Creating testable, modular applications
- Handling singleton and transient service instances
- Singleton and transient scopes
- Lazy resolution
- Optional dependencies
- Circular dependency detection
- Disposable resource management
Event Emitter (@resolid/event)
A lightweight, fully-typed event system for modern TypeScript projects.
When to use:
- Implementing event-driven architectures
- Decoupling components through events
- Building pub/sub patterns
- Creating reactive workflows
- Simple
on,off,once, andemitAPIs - Async emission support
- Fully typed event handlers
- Zero dependencies
Cache (@resolid/cache)
A type-safe async cache system with pluggable storage backends.
When to use:
- Caching API responses or computed values
- Implementing performance optimizations
- Storing temporary data with TTL
- Creating custom caching strategies
- Single and batch operations
- Optional TTL support
- Pluggable store backends
- Memory and null cache implementations
Application Modules
These modules integrate with external libraries to provide application-level functionality:Logging (@resolid/app-log)
Integration with LogTape for structured logging in Resolid applications.
When to use:
- Adding structured logging to your application
- Configuring multiple log sinks and categories
- Implementing debug and production logging strategies
- Integrating with external logging services
- Built on LogTape
- Multiple log levels (debug, info, warn, error, fatal)
- Category-based logging
- Custom sinks and filters
Database (@resolid/app-db)
Integration with Drizzle ORM for database management in Resolid applications.
When to use:
- Working with SQL databases
- Implementing repository patterns
- Managing multiple database connections
- Building type-safe database queries
- Built on Drizzle ORM
- Repository base class
- Multi-connection support
- Type-safe queries
Installation
Each module can be installed independently:Module Design Philosophy
Resolid modules follow these principles:- Standalone: Each module can be used independently without requiring the full framework
- Type-safe: Full TypeScript support with no
anytypes - Composable: Modules work well together but don’t require each other
- Minimal: Small footprint with few or zero dependencies
- Flexible: Pluggable architecture for customization
Next Steps
Explore each module’s documentation to learn more about their APIs and usage patterns:Dependency Injection
Manage dependencies with a powerful DI container
Event Emitter
Build event-driven applications with ease
Cache
Implement caching strategies with flexible storage
Logging
Add structured logging to your application
Database
Work with databases using Drizzle ORM