Skip to content

Repository files navigation

Zynk

Zynk is a workflow automation platform that lets users build and publish multi-step automations using a visual editor. It currently supports Google Drive as a trigger source and Discord, Notion, and Slack as action destinations.

Core Capabilities

  • Secure user authentication with Clerk

  • OAuth-based app connection management (Google Drive, Discord, Notion, Slack)

  • Visual workflow design with node-based editing

  • Workflow persistence and publish/unpublish controls

  • Event-driven execution from Google Drive activity callbacks

  • Dashboard insights for workflow and connection totals

Functional Architecture

  • Authentication: Clerk handles sign-in and session management

  • User Bootstrap: Clerk webhook and page guards ensure user records exist

  • Integrations: OAuth callback routes store provider credentials and metadata

  • Workflow Builder: React Flow canvas for trigger/action composition

  • Workflow Runtime: Google Drive events resolve published workflows and execute downstream provider actions

  • Management UI: pages for dashboard, workflows, connections, settings, and extension modules

Sequence Diagram

sequenceDiagram
    participant Drive as Google Drive
    participant API as /api/drive-activity/notification
    participant DB as Database (Prisma)
    participant Engine as Runtime Engine
    participant Discord as Discord API
    participant Slack as Slack API
    participant Notion as Notion API

    Drive->>API: Push Notification (resourceId)

    API->>DB: Find user by resourceId
    DB-->>API: User + Connection Data

    API->>DB: Check remaining credits
    DB-->>API: Credit balance

    alt No Credits
        API-->>Drive: 200 OK (no execution)
    else Credits Available
        API->>DB: Fetch published workflows
        DB-->>API: Workflow list

        API->>Engine: Execute workflow graph

        loop For each step node
            Engine->>Engine: Resolve next node (edges path)

            alt Discord Node
                Engine->>Discord: POST webhook message
                Discord-->>Engine: Success/Failure
            end

            alt Slack Node
                Engine->>Slack: Post message to multiple channels
                Slack-->>Engine: Success/Failure
            end

            alt Notion Node
                Engine->>Notion: Create page in database
                Notion-->>Engine: Success/Failure
            end

            alt Wait Node
                Engine->>Engine: Schedule delayed execution
            end
        end

        Engine->>DB: Deduct credits
        DB-->>Engine: Updated balance
    end
Loading

Tech Stack

  • Next.js (App Router) + TypeScript

  • Prisma + PostgreSQL

  • Clerk Authentication

  • React Flow

  • Tailwind CSS + shadcn/ui

Getting Started

Prerequisites

  • Node.js 20+

  • PostgreSQL database

  • OAuth app credentials for Google, Discord, Notion, and Slack

Installation

npm  install

Environment Setup

Copy .env.example to .env and provide values for required keys.

Required groups:

  • DATABASE_URL

  • Clerk keys:

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY

  • App/base URL keys:

NEXT_PUBLIC_URL, NEXT_PUBLIC_DOMAIN, NEXT_PUBLIC_SCHEME

  • Google:

GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, OAUTH2_REDIRECT_URI, CLOUDFLARE_URL

  • Discord:

DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, NEXT_PUBLIC_DISCORD_REDIRECT

  • Notion:

NOTION_CLIENT_ID, NOTION_API_SECRET, NOTION_REDIRECT_URI, NEXT_PUBLIC_NOTION_AUTH_URL

  • Slack:

SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_REDIRECT_URI, NEXT_PUBLIC_SLACK_REDIRECT

Optional:

  • CRON_JOB_KEY for wait/scheduling related extensions

Database Setup

npx  prisma  generate

npx  prisma  migrate  dev

Run Locally

npm  run  dev

Application URL: http://localhost:3000

Available Scripts

  • npm run dev - start local development server

  • npm run build - create production build

  • npm run start - run production build

  • npm run lint - run ESLint checks

Current Scope Notes

  • Billing, Templates, and Logs pages are scaffolded as extension points.

  • Wait/cron support is partially scaffolded and can be expanded for production scheduling.

About

zynk is a visual workflow automation platform that lets users connect apps like google drive, slack, notion and discord to build and run multi-step automations using an event-driven architecture.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages