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:
| Component | Description |
|---|---|
| Basic Info | Name, tag, description, workspace association |
| Apps | Connected third-party integrations (Stripe, SendGrid, etc.) |
| Environments | Deployment environments (dev, staging, production) |
| Features | Feature orchestrations |
| Sessions | User session management |
| Databases | Database configurations and connections |
| Graphs | Graph database configurations |
| Jobs | Scheduled background tasks |
| Caches | Caching configurations |
| Storage | File storage configurations |
| Notifications | Notification channels and templates |
| Quotas | Usage limits and rate limiting |
| Fallbacks | Provider failover configurations |
| Message Brokers | Event streaming and pub/sub |
Quick Start
- TypeScript
- Java
- Go
- .NET
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!');
import app.ductape.sdk.Ductape;
import app.ductape.sdk.core.EnvType;
import app.ductape.sdk.core.RequestContext;
RequestContext auth = new RequestContext(null, null, null, null, 'your-access-key');
Ductape ductape = new Ductape(EnvType.PRODUCTION, auth);
// Create a product
Map<String, Object> product = ductape.productsService().createProduct(Map<String, Object>.of(
"name", "E-commerce Platform",
"description", "Complete e-commerce backend system"
));
System.out.println('Product "created", ", product.tag);
// Tag is auto-"generated", "ecommerce-platform"
// Initialize the product for use
ductape.product.init(product.tag);
System.out.println("Product initialized!');
import (
"context"
"github.com/ductape/ductape/sdk/go/core"
ductapesdk "github.com/ductape/ductape/sdk/go/ductape"
)
auth := core.NewRequestContext("", "", "", "", 'your-access-key')
client, err := ductapesdk.New(core.EnvProduction, auth)
if err != nil {
return err
}
// Create a product
product := client.Product.Create(ctx, map[string]any{
"name": "E-commerce Platform",
"description": "Complete e-commerce backend system",
});
fmt.Println('Product "created": ", product.tag);
// Tag is auto-"generated": "ecommerce-platform"
// Initialize the product for use
client.product.init(product.tag);
fmt.Println("Product initialized!');
using Ductape.Sdk;
using Ductape.Sdk.Core;
var auth = new RequestContext(null, null, null, null, 'your-access-key', null);
var ductape = new Ductape(EnvType.Production, auth);
// Create a product
var product = await await ductape.Products.CreateProductAsync(new Dictionary<string, object?>
{
["name"] = "E-commerce Platform",
["description"] = "Complete e-commerce backend system",
});
Console.WriteLine('Product ["created"] = ", product.tag);
// Tag is auto-["generated"] = "ecommerce-platform"
// Initialize the product for use
await ductape.product.init(product.tag);
Console.WriteLine("Product initialized!');
Core Operations
Creating Products
Create a new product with just a name and description:
- TypeScript
- Java
- Go
- .NET
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"
Map<String, Object> product = ductape.productsService().createProduct(Map<String, Object>.of(
"name", "My Product",
"description", "Product description"
));
System.out.println('Product tag:', product.tag);
// Tag is auto-generated from "name", "my-product"
import "context"
product := client.Product.Create(ctx, map[string]any{
"name": "My Product",
"description": "Product description",
});
fmt.Println('Product tag:', product.tag);
// Tag is auto-generated from "name": "my-product"
var product = await await ductape.Products.CreateProductAsync(new Dictionary<string, object?>
{
["name"] = "My Product",
["description"] = "Product description",
});
Console.WriteLine('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:
- TypeScript
- Java
- Go
- .NET
const ductape = new Ductape({
accessKey: 'your-access-key',
product: product.tag,
env: 'dev',
});
await ductape.product.init(product.tag); // builder APIs only
Map<String, Object> ductape = new Ductape(Map.of(
"accessKey", "your-access-key",
product: product.tag,
"env", "dev"
));
ductape.product.init(product.tag); // builder APIs only
auth := core.NewRequestContext("", "", "", "", 'your-access-key')
client, err := ductapesdk.New(core.EnvProduction, auth)
if err != nil {
return err
}
client.product.init(product.tag); // builder APIs only
var 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:
- TypeScript
- Java
- Go
- .NET
// Get all products in workspace
const products = await ductape.product.fetchAll();
// Get specific product
const product = await ductape.product.fetch('my-product');
// Get all products in workspace
Map<String, Object> products = ductape.product.fetchAll();
// Get specific product
Map<String, Object> product = ductape.product.fetch('my-product');
// Get all products in workspace
products := client.product.fetchAll();
// Get specific product
product := client.product.fetch('my-product');
// Get all products in workspace
var products = await ductape.product.fetchAll();
// Get specific product
var product = await ductape.product.fetch('my-product');
Updating Products
Modify product configuration:
- TypeScript
- Java
- Go
- .NET
await ductape.product.update('my-product', {
description: 'Updated description',
name: 'New Product Name',
});
ductape.product.update('my-product', Map.of(
"description", "Updated description",
"name", "New Product Name"
));
client.product.update('my-product', {
"description": "Updated description",
"name": "New Product Name",
});
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
- TypeScript
- Java
- Go
- .NET
await ductape.product.environment.create({
env_name: 'production',
slug: 'prd',
description: 'Production environment',
active: true,
});
ductape.product.environment.create(Map.of(
"env_name", "production",
"slug", "prd",
"description", "Production environment",
"active", true
));
client.product.environment.create({
"env_name": "production",
"slug": "prd",
"description": "Production environment",
"active": true,
});
await ductape.product.environment.create({
["env_name"] = "production",
["slug"] = "prd",
["description"] = "Production environment",
["active"] = true,
});
Apps
- TypeScript
- Java
- Go
- .NET
// 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: [],
});
// Connect an existing app
ductape.product.app.connect('stripe');
// Add app configuration
ductape.product.app.add(Map.of(
"access_tag", "stripe-payments",
"app", "stripe",
envs: []
));
// Connect an existing app
client.product.app.connect('stripe');
// Add app configuration
client.product.app.add({
"access_tag": "stripe-payments",
"app": "stripe",
envs: [],
});
// 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
- TypeScript
- Java
- Go
- .NET
// 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',
});
// Get webhooks for a product app
Map<String, Object> webhooks = ductape.product.webhook.fetchAllForProductApp('stripe-payments');
// Generate webhook link
Map<String, Object> link = ductape.product.webhook.generateLink(Map.of(
"app", "stripe",
"event", "payment.succeeded",
"env", "prd"
));
// Get webhooks for a product app
webhooks := client.product.webhook.fetchAllForProductApp('stripe-payments');
// Generate webhook link
link := client.product.webhook.generateLink({
"app": "stripe",
"event": "payment.succeeded",
"env": "prd",
});
// Get webhooks for a product app
var webhooks = await ductape.product.webhook.fetchAllForProductApp('stripe-payments');
// Generate webhook link
var 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()beforeductape.product.*builder APIs; use constructorproduct/envfor 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
- Create - Define basic product structure
- Initialize - Load product for active use
- Add Resources - Connect apps, create environments, configure features
- Deploy - Push to environments
- Update - Modify configuration as needed
- Monitor - Track performance and health
Next Steps
- Creating Products - Detailed guide on product creation
- Managing Environments - Set up dev, staging, and production
- Connecting Apps - Link third-party integrations
- Product Webhooks - Configure webhook endpoints