Codapult
料金プラグインドキュメント
Codapult

開発者のためのSaaSボイラープレート

プロダクト

  • 料金
  • プラグイン
  • ドキュメント

会社情報

  • お問い合わせ
  • GitHub

法的情報

  • プライバシーポリシー
  • 利用規約

© 2026 Codapult. All rights reserved.

全記事

Getting Started

  • Introduction
  • Quick Start
  • Project Structure

Configuration

  • Environment Variables
  • App Configuration

Authentication

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

Database

  • Database
  • Migrations

Teams

  • Teams & Organizations
  • Permissions & RBAC

Payments

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

Api

  • API Layer
  • tRPC
  • GraphQL

Ai

  • AI Features

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • File Storage
  • Background Jobs

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Security

  • Security

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture

Plugins

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

Deployment

  • Deployment
  • Troubleshooting

Upgrading

  • Upgrading Codapult

Developer Tools

  • MCP Server
  • Testing
Infrastructure

Infrastructure

Configure file storage, background jobs, and real-time notifications using the adapter pattern.

Codapult ships three infrastructure modules — file storage, background jobs, and notifications — each using the adapter pattern. Switch implementations via a single environment variable; no code changes required.

File Storage

Upload and serve files through a unified API with local, S3, or Cloudflare R2 adapters. See the dedicated File Storage documentation for provider setup, env vars, and programmatic usage.


Background Jobs

Offload work to background jobs with in-memory or BullMQ (Redis) adapters. See the dedicated Background Jobs documentation for job types, cron schedules, and production setup.


Notifications

In-app notifications with real-time delivery. The transport is selected by NOTIFICATION_TRANSPORT.

TransportEnv ValueDescription
Pollingpoll (default)Periodic HTTP requests — works everywhere, zero config
Server-Sent EventssseOne-way real-time stream from server to client
WebSocketwsFull-duplex real-time — requires a separate WS server

Dashboard Integration

The NotificationBell component in the dashboard header shows unread count and a dropdown list. It works with all three transports automatically.

Creating Notifications

import { createNotification } from '@/lib/notifications';

await createNotification({
  userId: 'user_abc',
  type: 'info', // 'info' | 'success' | 'warning' | 'error'
  title: 'Deployment complete',
  message: 'Your app was deployed to production.',
  link: '/dashboard/deployments/42',
});

Operations

FunctionDescription
createNotification()Create and deliver a notification
getUserNotifications()List notifications (newest first)
getUnreadCount()Count unread notifications
markAsRead()Mark a single notification as read
markAllAsRead()Mark all notifications as read

WebSocket Configuration

When using the ws transport, configure the WebSocket server URL and port:

NOTIFICATION_TRANSPORT="ws"
NEXT_PUBLIC_WS_URL="ws://localhost:3001"
WS_PORT="3001"

Choosing a Transport

  • Polling — simplest option, no infrastructure dependencies. Good for low-traffic apps.
  • SSE — real-time without extra servers. One-way (server → client). Good default for production.
  • WebSocket — full-duplex, lowest latency. Requires running a separate WS server process.
Email TemplatesFile Storage