Documentation/titan/Modules
In this section

Titan Modules

The Titan ecosystem has three module tiers, each rendered with a origin badge so you can tell at a glance where a module comes from and what its guarantees are.

TierOriginWhere it livesGuarantees
Built-inBuilt-in@omnitron-dev/titan/module/*Ships with the framework; same release cadence
OfficialOfficialpackages/titan-* in the omnitron-dev monorepoMaintained by the Omnitron team; independent versions
CommunityCommunityThird-party npm packagesAudit before adopting; no maintenance commitment

Every module page in this section starts with a <span class="module-badge"></span> 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/*

Config and Logger ship inside @omnitron-dev/titan and are auto-loaded unless you pass disableCoreModules: true. RLS guards are imported explicitly. No extra Titan package is needed for these entry points.

ModuleSubpathPurpose
ConfigModule/module/configLayered, validated, hot-reloadable configuration
LoggerModule/module/loggerStructured pino-based logging with transports + processors
RLS guards/module/rlsContext guard decorators; no module registration

Official modules (titan-* packages)

official · @omnitron-dev/titan-*

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-*

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({ config: { url: env.REDIS_URL } }),
    TitanAuthModule.forRoot({ jwtSecret: env.JWT_SECRET }),
    TitanCacheModule.forRoot({ multiTier: true, l2: { client: redisClient, ttl: 60 } }),
    TitanDatabaseModule.forRoot({ connection: { dialect: 'postgres', connection: env.DATABASE_URL } }),
    SchedulerModule.forRoot({ persistence: { provider: redisPersistenceProvider } }),
    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.