Codapult
FeaturesPricingAPIHelpChangelog
Codapult

Ship Your SaaS Faster

Product

  • Features
  • Pricing
  • Plugins
  • API Reference
  • Help Center
  • Feature Requests
  • Changelog

Company

  • Contact
  • GitHub

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Codapult. All rights reserved.

All articles

Getting Started

  • Introduction
  • Quick Start
  • Project Structure

Configuration

  • Environment Variables
  • App Configuration

Authentication

  • Authentication

Database

  • Database

Teams

  • Teams & Organizations

Payments

  • Payments & Billing

Api

  • API Layer

Ai

  • AI Features

Email

  • Email

Infrastructure

  • Infrastructure

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Security

  • Security

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture

Plugins

  • Plugin System

Deployment

  • Deployment
  • Troubleshooting

Upgrading

  • Upgrading Codapult

Developer Tools

  • MCP Server
  • Testing
Modules

Module Architecture

How Codapult modules work, the full module map, and how to remove features you don't need.

Design Principles

Every feature in Codapult is packaged as a self-contained module with its own directories, routes, components, and database tables. Modules follow three rules:

  1. Independent — each module lives in its own directories and can be deleted without breaking other modules.
  2. Core-dependent only — modules depend on the Core layer (Auth, Database, Rate Limiting, Validation), not on each other, unless explicitly noted.
  3. CLI-removable — the interactive setup wizard can strip modules automatically.

Module Map

ModuleDirectoriesDependenciesRemovable
Authsrc/lib/auth/, src/app/(auth)/Core (required)No
Databasesrc/lib/db/Core (required)No
AI Chatsrc/app/(dashboard)/dashboard/ai-chat/, src/app/api/chat/, src/components/ai/NoneYes
Billingsrc/lib/payments/, src/lib/actions/billing.ts, src/app/api/webhooks/NoneYes
Blogsrc/app/(marketing)/blog/, src/components/blog/, src/lib/blog/, content/blog/NoneYes
Teamssrc/app/(dashboard)/dashboard/teams/, src/app/invite/AuthYes
Notificationssrc/lib/notifications.ts, src/components/dashboard/NotificationBell.tsxAuthYes
Feature Flagssrc/lib/feature-flags.ts, src/app/admin/feature-flags/DBYes
File Uploadssrc/lib/storage/, src/app/api/upload/AuthYes
Waitlistsrc/app/(marketing)/waitlist/EmailYes
API Keyssrc/lib/api-keys.tsAuth, DBYes
Usage Creditssrc/lib/usage.tsAuth, DBYes
Activity Logsrc/lib/activity-log.ts, src/app/admin/activity/DBYes
Webhook Logsrc/lib/webhook-log.ts, src/app/admin/webhooks/DBYes
Support Widgetsrc/components/support/SupportWidget.tsxNoneYes
Emailsrc/lib/email/ResendYes
i18nsrc/i18n/, messages/next-intlYes
Analytics (PostHog)src/components/analytics/PostHogYes
SEOsrc/app/sitemap.ts, src/app/robots.tsNoneYes
Sentrysrc/instrumentation*.ts, src/sentry.*.ts@sentry/nextjsYes
GraphQL APIsrc/lib/graphql/, src/app/api/graphql/graphql-yogaYes
Enterprise SSOsrc/lib/sso/NoneYes
Help Centersrc/lib/docs/, src/app/(marketing)/docs/help/, content/docs/NoneYes
A/B Testingsrc/lib/experiments/DBYes
Feature Requestssrc/lib/feature-requests/DBYes
Stripe Connectsrc/lib/payments/connect.tsStripeYes
Event Storesrc/lib/event-store/DBYes
White-labelingsrc/lib/white-label/DBYes
GDPRsrc/lib/gdpr/DBYes
Outgoing Webhookssrc/lib/outgoing-webhooks/DBYes
Drip Campaignssrc/lib/drip-campaigns/Email, JobsYes
Onboarding Tourssrc/lib/onboarding/DBYes
Analytics (Self-serve)src/lib/analytics/DBYes
Custom Domainssrc/lib/custom-domains/DBYes
Workflowssrc/lib/workflows/EmailYes
Referralssrc/lib/referrals/DBYes
OpenTelemetrysrc/lib/telemetry/@opentelemetry/*Yes
Changelog Widgetsrc/components/dashboard/ChangelogWidget.tsxNoneYes
RAG Pipelinesrc/lib/ai/rag.ts, src/lib/ai/embeddings.ts@ai-sdk/openaiYes
SCIM Provisioningsrc/lib/scim/TeamsYes
Chat Memorysrc/lib/ai/conversations.tsAI Chat, DBYes
Scheduled Reportssrc/lib/scheduled-reports/Email, JobsYes
API Versioningsrc/lib/api-version.tsNoneYes
Audit Log (User)src/app/api/audit-log/Activity LogYes

How to Remove a Module

CLI Wizard (Recommended)

Run the interactive setup wizard and deselect the modules you don't need:

npx @codapult/cli setup

The wizard automatically deletes files, removes imports, cleans up navigation, and updates the schema.

Manual Removal

For finer control, remove a module by hand:

  1. Delete the module's directories (see the table above).
  2. Remove all imports referencing the deleted module.
  3. Remove database tables from src/lib/db/schema.ts and regenerate migrations.
  4. Remove navigation links from Sidebar.tsx, admin layout, and marketing navbar.
  5. Uninstall npm dependencies unique to the module.
  6. Remove environment variables from .env.example.

Example: Removing AI Chat

# Delete files
rm -rf src/app/\(dashboard\)/dashboard/ai-chat
rm -rf src/app/api/chat
rm -rf src/components/ai

# Remove the AI Chat nav item from Sidebar.tsx
# Edit src/components/dashboard/Sidebar.tsx

# Uninstall dependencies (if not used elsewhere)
pnpm remove @ai-sdk/openai @ai-sdk/anthropic ai @ai-sdk/react

# Remove env vars from .env.example:
# OPENAI_API_KEY, ANTHROPIC_API_KEY, EMBEDDING_PROVIDER,
# VECTOR_STORE_PROVIDER, OLLAMA_BASE_URL, OLLAMA_EMBEDDING_MODEL

Example: Removing Teams

# Delete files
rm -rf src/app/\(dashboard\)/dashboard/teams
rm -rf src/app/invite
rm src/components/dashboard/TeamSwitcher.tsx
rm src/components/dashboard/TeamSettings.tsx
rm src/components/dashboard/AcceptInvitationButton.tsx
rm src/lib/db/organizations.ts
rm src/lib/actions/organizations.ts

# Remove organization tables from src/lib/db/schema.ts:
# organization, organization_member, organization_invitation

# Remove TeamSwitcher from Sidebar.tsx

# Regenerate migrations
pnpm run db:generate

Dependency Boundaries

Modules form a layered dependency graph. The Core layer is required; everything above it is optional and independently removable.

┌─────────────────────────────────────────────────┐
│                    Core Layer                    │
│  (Auth, Database, Rate Limiting, Validation)    │
└──────────────────────┬──────────────────────────┘
                       │
         ┌─────────────┼─────────────┐
         │             │             │
    ┌────▼────┐  ┌────▼────┐  ┌────▼────┐
    │ Billing │  │  Teams  │  │  Admin  │
    └─────────┘  └─────────┘  └─────────┘
         │             │             │
    ┌────▼────┐  ┌────▼────┐  ┌────▼────┐
    │ Usage   │  │  RBAC   │  │ Feature │
    │ Credits │  │         │  │  Flags  │
    └─────────┘  └─────────┘  └─────────┘

Modules only depend on the Core layer. They do not depend on each other unless explicitly noted in the Dependencies column (for example, SCIM Provisioning depends on Teams, and Chat Memory depends on AI Chat).

Analytics & MonitoringPlugin System