Skip to content

trishit78/Zaply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Zaply - Visual Workflow Automation Platform

A powerful, visual workflow automation platform built with Next.js that allows you to create, connect, and execute AI-powered workflows without writing code. Think of it as a simplified n8n alternative with built-in AI capabilities.

Screenshot 2025-11-16 131957

๐Ÿš€ Features

Visual Workflow Builder

  • Drag-and-drop interface for creating workflows
  • Real-time visual feedback with node execution status
  • Interactive canvas powered by ReactFlow
  • Node connection system with validation
  • Minimap and controls for easy navigation

Node Categories

๐ŸŽฏ Trigger Nodes

  • Webhook Trigger - Start workflows via HTTP requests
  • Schedule Trigger - Run workflows on a schedule (minutes, hours, days)

๐Ÿค– AI Nodes (OpenAI Integration)

  • AI Text Generator - Generate text content with customizable prompts
  • AI Content Analyzer - Perform sentiment analysis, keyword extraction, and summarization
  • AI Chatbot - Create conversational AI with customizable personalities
  • AI Data Extractor - Extract structured data from unstructured text

โšก Action Nodes

  • HTTP Request - Make API calls (GET, POST, PUT, DELETE)
  • Data Transform - Transform data using JavaScript code
  • Send Email - Send emails (simulated for demo)

๐Ÿ”€ Logic Nodes

  • If/Else - Conditional branching with JavaScript expressions
  • Delay - Add delays between workflow steps

๐Ÿ› ๏ธ Tech Stack

  • Framework: Next.js 16 with App Router
  • Language: TypeScript
  • UI Components: shadcn/ui (Radix UI primitives)
  • Styling: Tailwind CSS with custom theme
  • Workflow Engine: ReactFlow for visual workflow builder
  • State Management: Zustand
  • AI Integration: OpenAI API (gpt-4o-mini)
  • Icons: Lucide React

๐Ÿ“ฆ Installation

  1. Clone the repository:
git clone https://github.com/trishit78/Zaply.git
cd zaply
  1. Install dependencies:
npm install
  1. Create a .env.local file in the root directory:
OPENAI_API_KEY=your_openai_api_key_here
  1. Run the development server:
npm run dev
  1. Open your browser: Navigate to http://localhost:3000

๐ŸŽฎ Usage

Creating a Workflow

  1. Add Nodes: Drag nodes from the sidebar onto the canvas
  2. Connect Nodes: Click and drag from one node's output to another's input
  3. Configure Nodes: Double-click any node to open its configuration panel
  4. Execute Workflow: Click the "Execute" button to run your workflow

Template Variables

Use template variables to pass data between nodes:

  • {{input}} - Access the entire input object
  • {{input.fieldName}} - Access specific fields
  • {{input.nested.field}} - Access nested fields

Example:

// In HTTP Request URL field:
https://api.example.com/users/{{input.userId}}

// In AI Text Generator prompt:
Write a summary about: {{input.content}}

Example Workflows

1. AI Content Analyzer

Schedule Trigger โ†’ AI Text Generator โ†’ AI Content Analyzer โ†’ Send Email

2. Conditional API Call

Webhook โ†’ If/Else โ†’ HTTP Request (Branch A) / Send Email (Branch B)

3. Data Processing Pipeline

Webhook โ†’ Data Transform โ†’ AI Data Extractor โ†’ HTTP Request

๐Ÿ“ Project Structure

zaply/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ””โ”€โ”€ ai/execute/    # AI node execution endpoints
โ”‚   โ”œโ”€โ”€ page.tsx           # Main workflow builder page
โ”‚   โ”œโ”€โ”€ layout.tsx         # Root layout
โ”‚   โ””โ”€โ”€ globals.css        # Global styles
โ”œโ”€โ”€ component/
โ”‚   โ”œโ”€โ”€ CustomNode.tsx     # Workflow node component
โ”‚   โ”œโ”€โ”€ Sidebar.tsx        # Node palette sidebar
โ”‚   โ””โ”€โ”€ NodeConfigPanel.tsx # Node configuration panel
โ”œโ”€โ”€ components/ui/         # shadcn/ui components
โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ store.ts           # Zustand state management
โ”‚   โ”œโ”€โ”€ types.ts           # TypeScript type definitions
โ”‚   โ”œโ”€โ”€ executor.ts        # Workflow execution engine
โ”‚   โ”œโ”€โ”€ node-definitions.ts # Node type definitions
โ”‚   โ””โ”€โ”€ utils.ts           # Utility functions
โ””โ”€โ”€ hooks/
    โ””โ”€โ”€ use-mobile.ts      # Mobile detection hook

๐Ÿ”ง Configuration

Adding a New Node Type

  1. Define the node in lib/node-definitions.ts:
myNewNode: {
  type: "myNewNode",
  label: "My New Node",
  description: "Does something cool",
  category: "action",
  icon: MyIcon,
  color: "bg-blue-500",
  defaultConfig: {
    // Default configuration values
  },
  configFields: [
    {
      name: "fieldName",
      label: "Field Label",
      type: "text",
      placeholder: "Enter value...",
      required: true
    }
  ]
}
  1. Implement execution logic in lib/executor.ts:
private async executeMyNewNode(config: Record<string, any>, input: any) {
  // Your execution logic here
  return {
    success: true,
    output: { /* result */ }
  };
}

๐Ÿ“ Environment Variables

Variable Description Required
OPENAI_API_KEY Your OpenAI API key for AI nodes Yes

๐Ÿค Contributing

๐Ÿ”ง Extending the Application

Adding a New Node Type

  1. Define the node in lib/node-definitions.ts:
myCustomNode: {
  type: 'myCustomNode',
  label: 'My Custom Node',
  description: 'Does something amazing',
  category: 'action',
  icon: Star,
  color: 'bg-yellow-500',
  defaultConfig: { /* ... */ },
  configFields: [ /* ... */ ]
}
  1. Implement execution in lib/executor.ts:
case 'myCustomNode':
  return this.executeMyCustomNode(config, input);
  1. Add the handler:
private executeMyCustomNode(config: any, input: any) {
  // Your logic here
  return {
    success: true,
    output: { /* ... */ }
  };
}

Adding More AI Capabilities

  • Image Generation: Use DALL-E API
  • Speech-to-Text: Integrate Whisper API
  • Vision: Analyze images with GPT-4 Vision
  • Embeddings: For semantic search

๐Ÿ’ก Ideas for Enhancement

  • Save/load workflows to database
  • User authentication
  • Workflow scheduling with cron
  • Real webhook endpoints
  • Node marketplace
  • Collaboration features
  • Version control for workflows
  • Execution history and logs
  • Cost tracking for AI usage
  • Mobile responsive design
  • Dark mode improvements
  • Keyboard shortcuts
  • Undo/redo functionality
  • Workflow templates library
  • Export/import workflows as JSON
  • Performance monitoring

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published