Skip to main content

Steps for Using Ductape

Ductape simplifies building and managing products by focusing on apps, resources, and features. Follow these steps to get started:

1. Install the SDK

Begin by installing the Ductape SDK in your project to access its core functionality.

npm install ductape-sdk  

2. Create Apps and Import Actions

Define the apps your product will use and import their available actions.

  • Apps: Represent third-party services like payment gateways, AI Agents, or messaging providers.
  • Actions: Individual tasks or operations supported by these apps, such as "Send Email" or "Create Payment."

3. Define App Values

Set up key properties for each app:

  • Constants: Static values shared across environments or users.
  • Variables: Dynamic inputs passed during runtime.
  • Retry Policies: Rules to handle failures or retries for app actions.

4. Configure App Resources

For each app, configure the necessary resources:

  • Webhooks: Define callback URLs for real-time updates.
  • Events: Specify triggers for app behavior (e.g., "Order Placed").
  • Authorization: Set up authentication methods like API keys or OAuth tokens.

5. Create Products

Products in Ductape are logical groupings of apps, resources, and features. Think of them as self-contained systems that deliver specific functionality.

6. Add Apps to Products

Integrate any app into a product, allowing them to work together seamlessly.

7. Define Product Resources

Set up resources that your product depends on:

  • Storage: Configure cloud storage for files or data.
  • Message Brokers: Set up messaging queues like RabbitMQ, AWS SQS, Google PubSub, Redis or Kafka.
  • Databases: Connect to relational or NoSQL databases, and define database actions (e.g., queries or updates).
  • Notifications: Configure communication channels and create reusable notification messages.
  • Jobs: Define background tasks for asynchronous processing.
  • Features (Workflows): Create reusable features by combining actions across apps and resources.
  • Caches: Configure caching for frequently accessed data to enhance performance.

8. Use Product Resources in Your Code and Process Events

Leverage the product resources you’ve defined to build and execute functionality in your application:

  • Storage: Upload, retrieve, or delete files using the Ductape SDK.
  • Message Brokers: Publish and subscribe to messages in your queues to enable event-driven architecture.
  • Databases: Perform CRUD operations through predefined database actions to manage your product’s data.
  • Notifications: Trigger and send notifications based on user actions or system events.
  • Jobs: Schedule and execute background jobs to handle asynchronous processing.
  • Caches: Retrieve and update cached data to minimize latency and optimize performance.
  • Features: Define and use complex workflows using all the above resources