Codapult
TarifsPluginsBlogDocsDémo

Le boilerplate SaaS pour les créateurs

© 2026 Codapult. Tous droits réservés.

Built with Codapult

Projet

  • Tarifs
  • Plugins
  • Documentation
  • Comparaison de templates SaaS

À propos

  • Contact

Mentions légales

  • Politique de confidentialité
  • Conditions d'utilisation
Tous les articles

Getting Started

  • Introduction
  • Quick Start
  • Project Structure
  • License and Permitted Use

Configuration

  • Environment Variables
  • App Configuration

Authentication

  • Authentication
  • OAuth Providers
  • Two-Factor & Passwordless
  • Enterprise SSO (SAML)

Database

  • Database
  • Migrations

Teams

  • Teams & Organizations
  • Permissions & RBAC
  • SCIM Provisioning

Payments

  • Payments & Billing
  • Stripe Setup
  • LemonSqueezy Setup
  • Polar Setup
  • Payment Webhooks

Api

  • API Layer
  • tRPC
  • GraphQL

Ai

  • AI Features
  • Streaming Chat
  • RAG and Semantic Search
  • Quotas and Memory

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • Self-Hosting
  • File Storage
  • Docker
  • Background Jobs
  • Terraform & Pulumi
  • Kubernetes

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Security

  • Security

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture
  • Waitlist
  • Audit Log
  • White-Labeling
  • Workflow Automation
  • A/B Testing
  • Welcome Page
  • Referrals
  • GDPR Export and Deletion
  • Outgoing Webhooks

Plugins

  • Plugin System
  • AI Kit Plugin
  • CRM Plugin
  • Helpdesk Plugin
  • Email Marketing Plugin

Deployment

  • Deployment
  • Troubleshooting

Upgrading

  • Upgrading Codapult

Developer Tools

  • AI Agents & IDEs
  • MCP Server
  • Testing
Infrastructure

Background Jobs

Offload work to background jobs with in-memory or BullMQ (Redis) adapters.

Offload work to background jobs for email sending, webhook delivery, credit resets, and RAG indexing. The job adapter is selected by JOB_PROVIDER.

Providers

ProviderEnv ValueBest For
In-memory queuememory (default)Development, single-instance
BullMQ (Redis)bullmqProduction, multi-instance

Enqueuing Jobs

import { enqueue, enqueueEmail } from '@/lib/jobs';

// Generic job
await enqueue('webhook-retry', { webhookId: 'wh_123', attempt: 1 });

// Shorthand for emails
await enqueueEmail('user@example.com', 'Welcome!', emailHtml);

Built-in Jobs

Job NameDescription
send-emailSends transactional email via Resend
webhook-retryRetries failed webhook deliveries with exponential backoff
credit-resetResets monthly AI/usage credits for all organizations
rag-indexIndexes documents for AI RAG pipeline

Cron Jobs

ScheduleTask
DailySession cleanup (remove expired sessions)
MonthlyCredit reset (reset usage quotas)

Cron jobs run automatically when the app starts. They use the same job adapter.

Switching to BullMQ

For production, use BullMQ with Redis for durable, concurrent job processing:

JOB_PROVIDER="bullmq"
REDIS_URL="redis://localhost:6379"
JOB_QUEUE_NAME="my-app"   # optional, defaults to "codapult"

Worker Process

In production, run the worker as a separate process alongside your Next.js server. The worker picks up jobs from Redis and processes them independently.

For Kubernetes deployments, the Helm chart includes a dedicated worker Deployment. For Docker, add a separate service in docker-compose.yml.

Important: The memory adapter processes jobs in-process and loses pending jobs on restart. Always use bullmq in production.

Environment Variables

VariableRequiredDescription
JOB_PROVIDERNo"memory" (default) or "bullmq"
REDIS_URLYes*Redis connection URL, e.g. redis://localhost:6379
JOB_QUEUE_NAMENoBullMQ queue name. Defaults to "codapult"

* Required when JOB_PROVIDER=bullmq.

DockerTerraform & Pulumi