Skip to content

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-auth package is deprecated).

Observability

  • OpenTelemetry — BYO recipe wrapping @opentelemetry/sdk-node with defineAdapter

Scheduled Tasks

  • Cron — BYO recipe wrapping croner (or node-cron) with defineAdapter

Multi-tenancy

  • Multi-tenancy — BYO recipe using defineHttpContextDecorator + getRequestValue

Notifications

  • Notifications — BYO recipe defining a Notifier interface bound via definePlugin

GraphQL

  • GraphQL — BYO recipe wrapping graphql-http / Yoga / Apollo / Pothos with definePlugin

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.

Released under the MIT License. Built with TypeScript — runs on Express, Fastify, or h3.