Third-Party Integrations
KickJS integrates with external services through adapters and middleware. This section provides step-by-step guides for common integrations.
Monitoring & Error Tracking
- Sentry — Error tracking, performance monitoring, distributed tracing
- Datadog (coming soon)
- New Relic (coming soon)
Databases
@forinda/kickjs-db— the first-party database layer (PostgreSQL, SQLite, MySQL) with code-first schema, typed queries, and migrations- MongoDB/Mongoose — via a custom adapter
Caching
- Redis — via
ioredis - Upstash (coming soon)
Email
- Mailers — BYO recipe wrapping nodemailer, Resend, or SES with
definePlugin
Message Queues
- Queue — BullMQ, RabbitMQ, Kafka via
@forinda/kickjs-queue
Authentication
- Authentication (BYO) — compose JWT / API-key / role checks with context decorators (the
@forinda/kickjs-authpackage is deprecated).
Observability
- OpenTelemetry — BYO recipe wrapping
@opentelemetry/sdk-nodewithdefineAdapter
Scheduled Tasks
- Cron — BYO recipe wrapping
croner(ornode-cron) withdefineAdapter
Multi-tenancy
- Multi-tenancy — BYO recipe using
defineHttpContextDecorator+getRequestValue
Notifications
- Notifications — BYO recipe defining a
Notifierinterface bound viadefinePlugin
GraphQL
- GraphQL — BYO recipe wrapping
graphql-http/ Yoga / Apollo / Pothos withdefinePlugin
Integration Pattern
All integrations follow the same adapter pattern:
ts
import { bootstrap } from '@forinda/kickjs'
import { loadEnv } from '@forinda/kickjs-config'
const env = loadEnv(envSchema)
const adapters = [SwaggerAdapter({ info: { title: 'My API', version: '1.0.0' } })]
// Conditionally add Sentry when DSN is configured
if (env.SENTRY_DSN) {
adapters.unshift(SentryAdapter({ dsn: env.SENTRY_DSN }))
}
bootstrap({
modules: [UserModule, ProductModule],
adapters,
middlewares: [helmet(), cors(), requestId(), express.json()],
})To build your own integration, see Creating Adapters.