Titan Modules
The Titan ecosystem has three module tiers, each rendered with a colour-coded badge so you can tell at a glance where a module comes from and what its guarantees are.
| Tier | Badge colour | Where it lives | Guarantees |
|---|---|---|---|
| Built-in | Emerald ๐ข | @omnitron-dev/titan/src/modules/* | Ships with the framework; same release cadence |
| Official | Violet ๐ฃ | packages/titan-* in the omnitron-dev monorepo | Maintained by the Omnitron team; independent versions |
| Community | Amber ๐ก | Third-party npm packages | Audit before adopting; no maintenance commitment |
Every module page in this section starts with a <ModuleBadge ... />
chip that reflects its tier.
Want a bird's-eye view of how the 16 modules interlock โ who depends on whom, which combinations form common stacks, when to prefer one over a similar one? Read the Module map.
Built-in modulesโ
@omnitron-dev/titan/module/*Ships inside @omnitron-dev/titan. No additional install required.
Shipped inside @omnitron-dev/titan. Auto-loaded by every Titan
application unless you pass disableCoreModules: true. No extra
install needed.
| Module | Subpath | Purpose |
|---|---|---|
ConfigModule | /module/config | Layered, validated, hot-reloadable configuration |
LoggerModule | /module/logger | Structured pino-based logging with transports + processors |
Official modules (titan-* packages)โ
@omnitron-dev/titan-*Maintained by the Omnitron team. Independent npm package.
Fourteen independent packages in the omnitron-dev monorepo. Each is
versioned separately; adopting one does not pin you to others.
| Module | Package | Purpose |
|---|---|---|
TitanAuthModule | @omnitron-dev/titan-auth | JWT auth (HS256 / RS256 / ES256), JWKS, token cache |
TitanCacheModule | @omnitron-dev/titan-cache | Multi-tier (L1/L2) caching with LRU / LFU, Redis backing |
TitanDatabaseModule | @omnitron-dev/titan-database | Kysely + migrations + RLS, multi-dialect |
DiscoveryModule | @omnitron-dev/titan-discovery | Redis-backed service discovery + Netron integration |
EventsModule | @omnitron-dev/titan-events | Typed event bus, wildcard, scheduling, history |
TitanHealthModule | @omnitron-dev/titan-health | Health indicators (memory, event-loop, disk, db, redis) |
TitanLockModule | @omnitron-dev/titan-lock | Distributed Redis locks with UUID ownership + Lua scripts |
TitanMetricsModule | @omnitron-dev/titan-metrics | Counters / gauges / histograms, pluggable storage |
NotificationsModule | @omnitron-dev/titan-notifications | Multi-channel delivery + templates + DLQ |
ProcessManagerModule | @omnitron-dev/titan-pm | Process supervision, worker pools, IPC |
TitanRateLimitModule | @omnitron-dev/titan-ratelimit | Token-bucket, sliding-window, fixed-window strategies |
TitanRedisModule | @omnitron-dev/titan-redis | Redis client (clustering, sentinel, TLS, named instances) |
SchedulerModule | @omnitron-dev/titan-scheduler | Cron + interval + timeout with persistence |
TelemetryRelayService | @omnitron-dev/titan-telemetry-relay | Store-and-forward telemetry pipeline (no module) |
Community modulesโ
@your-scope/titan-*Third-party module. Read the source before adopting in production.
No third-party modules registered yet. See Community Modules for what counts, how to adopt safely, and how to publish your own.
Compositionโ
Modules compose through the standard imports chain โ order does
not matter, the container resolves the dependency graph:
@Module({
imports: [
// Built-in (auto-loaded; shown explicitly here for illustration)
ConfigModule.forRoot({ schema: AppConfigSchema, sources: [/* โฆ */] }),
LoggerModule.forRoot({ level: 'info' }),
// Official
TitanRedisModule.forRoot({ url: env.REDIS_URL }),
TitanAuthModule.forRoot({ jwtSecret: env.JWT_SECRET }),
TitanCacheModule.forRoot({ multiTier: true, l2: { client: redisClient, ttl: 60 } }),
TitanDatabaseModule.forRoot({ dialect: 'postgres', connection: env.DATABASE_URL }),
SchedulerModule.forRoot({ persistence: { provider: 'redis' } }),
TitanMetricsModule.forRoot({ storage: { type: 'memory' } }),
],
providers: [/* your services */],
})
export class AppModule {}
Redis dependency among official modulesโ
Five official modules depend on a Redis client provided by
TitanRedisModule:
titan-cache(when L2 tier enabled)titan-locktitan-discoverytitan-ratelimit(whenstorageType: 'redis')titan-notifications(rate limiter, preference store, rotif messaging)
Register TitanRedisModule.forRoot(...) first; the rest pick up the
shared client automatically.
Choosing modulesโ
Most backends start with a small set:
- Web API service: built-in config + logger; auth + database + cache + health + metrics.
- Worker service: built-in config + logger; database + lock + scheduler + metrics + health.
- Notification gateway: built-in config + logger; notifications + ratelimit + metrics.
- Multi-instance app: add discovery to the above.
โ Start with ConfigModule for built-in config or
jump to TitanAuthModule for the most-used official
module.
โ Want to build your own? Read
Authoring a module โ the
step-by-step recipe every official titan-* package follows.