Skip to main content

Products Overview

Products in Ductape are the central organizational units for your backend systems. A product represents a complete application or service and contains all the resources needed to build and run it—including apps, environments, features, databases, and more.

What is a Product?

A product is a complete backend system that:

  • Organizes resources - Groups apps, environments, sessions, features, and other components
  • Manages environments - Supports multiple deployment environments (dev, staging, production)
  • Connects integrations - Links third-party apps and APIs to your product
  • Orchestrates features - Coordinates features, jobs, and actions
  • Tracks versions - Maintains configuration and state across deployments

Think of a product as your entire application backend—everything from authentication to payment processing to data storage, all managed in one place.

Product Structure

Every product contains:

ComponentDescription
Basic InfoName, tag, description, workspace association
AppsConnected third-party integrations (Stripe, SendGrid, etc.)
EnvironmentsDeployment environments (dev, staging, production)
FeaturesFeature orchestrations
SessionsUser session management
DatabasesDatabase configurations and connections
GraphsGraph database configurations
JobsScheduled background tasks
CachesCaching configurations
StorageFile storage configurations
NotificationsNotification channels and templates
QuotasUsage limits and rate limiting
FallbacksProvider failover configurations
Message BrokersEvent streaming and pub/sub

Quick Start

import Ductape from '@ductape/sdk';

const ductape = new Ductape({
accessKey: 'your-access-key',
});

// Create a product
const product = await ductape.product.create({
name: 'E-commerce Platform',
description: 'Complete e-commerce backend system',
});

console.log('Product created:', product.tag);
// Tag is auto-generated: "ecommerce-platform"

// Initialize the product for use
await ductape.product.init(product.tag);

console.log('Product initialized!');

Core Operations

Creating Products

Create a new product with just a name and description:

const product = await ductape.product.create({
name: 'My Product',
description: 'Product description',
});

console.log('Product tag:', product.tag);
// Tag is auto-generated from name: "my-product"

Initializing Products (product builder API)

Call product.init() before using the product builder (ductape.product.environment, ductape.product.app, webhooks, etc.). It pre-loads the product into the builder — it does not set runtime defaults for databases, graphs, or vectors.

For database/graph/vector calls, set product and env on the Ductape constructor instead:

const ductape = new Ductape({
accessKey: 'your-access-key',
product: product.tag,
env: 'dev',
});

await ductape.product.init(product.tag); // builder APIs only

Fetching Products

Retrieve product information:

// Get all products in workspace
const products = await ductape.product.fetchAll();

// Get specific product
const product = await ductape.product.fetch('my-product');

Updating Products

Modify product configuration:

await ductape.product.update('my-product', {
description: 'Updated description',
name: 'New Product Name',
});

Product Resources

Once a product is created and initialized, you can manage its resources:

Environments

await ductape.product.environment.create({
env_name: 'production',
slug: 'prd',
description: 'Production environment',
active: true,
});

Apps

// Connect an existing app
await ductape.product.app.connect('stripe');

// Add app configuration
await ductape.product.app.add({
access_tag: 'stripe-payments',
app: 'stripe',
envs: [],
});

Webhooks

// Get webhooks for a product app
const webhooks = await ductape.product.webhook.fetchAllForProductApp('stripe-payments');

// Generate webhook link
const link = await ductape.product.webhook.generateLink({
app: 'stripe',
event: 'payment.succeeded',
env: 'prd',
});

Best Practices

  • Use descriptive tags - Product tags are used throughout the SDK; make them meaningful
  • Initialize before builder use - Call product.init() before ductape.product.* builder APIs; use constructor product/env for runtime database/graph/vector calls
  • Organize by environment - Use environments to separate dev, staging, and production
  • Start minimal - Create products with empty arrays; add resources as needed
  • Version control - Export product configurations to version control
  • Document structure - Maintain documentation of your product architecture

Product Lifecycle

Create → Initialize → Add Resources → Deploy → Update → Monitor
  1. Create - Define basic product structure
  2. Initialize - Load product for active use
  3. Add Resources - Connect apps, create environments, configure features
  4. Deploy - Push to environments
  5. Update - Modify configuration as needed
  6. Monitor - Track performance and health

Next Steps

See Also