Skip to main content

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.

TierBadge colourWhere it livesGuarantees
Built-inEmerald ๐ŸŸข@omnitron-dev/titan/src/modules/*Ships with the framework; same release cadence
OfficialViolet ๐ŸŸฃpackages/titan-* in the omnitron-dev monorepoMaintained by the Omnitron team; independent versions
CommunityAmber ๐ŸŸกThird-party npm packagesAudit 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โ€‹

Built-in@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.

ModuleSubpathPurpose
ConfigModule/module/configLayered, validated, hot-reloadable configuration
LoggerModule/module/loggerStructured pino-based logging with transports + processors

Official modules (titan-* packages)โ€‹

Official@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.

ModulePackagePurpose
TitanAuthModule@omnitron-dev/titan-authJWT auth (HS256 / RS256 / ES256), JWKS, token cache
TitanCacheModule@omnitron-dev/titan-cacheMulti-tier (L1/L2) caching with LRU / LFU, Redis backing
TitanDatabaseModule@omnitron-dev/titan-databaseKysely + migrations + RLS, multi-dialect
DiscoveryModule@omnitron-dev/titan-discoveryRedis-backed service discovery + Netron integration
EventsModule@omnitron-dev/titan-eventsTyped event bus, wildcard, scheduling, history
TitanHealthModule@omnitron-dev/titan-healthHealth indicators (memory, event-loop, disk, db, redis)
TitanLockModule@omnitron-dev/titan-lockDistributed Redis locks with UUID ownership + Lua scripts
TitanMetricsModule@omnitron-dev/titan-metricsCounters / gauges / histograms, pluggable storage
NotificationsModule@omnitron-dev/titan-notificationsMulti-channel delivery + templates + DLQ
ProcessManagerModule@omnitron-dev/titan-pmProcess supervision, worker pools, IPC
TitanRateLimitModule@omnitron-dev/titan-ratelimitToken-bucket, sliding-window, fixed-window strategies
TitanRedisModule@omnitron-dev/titan-redisRedis client (clustering, sentinel, TLS, named instances)
SchedulerModule@omnitron-dev/titan-schedulerCron + interval + timeout with persistence
TelemetryRelayService@omnitron-dev/titan-telemetry-relayStore-and-forward telemetry pipeline (no module)

Community modulesโ€‹

Community@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-lock
  • titan-discovery
  • titan-ratelimit (when storageType: '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.