Shivg2901 / zapier-prototype

Zapier prototype
Apache License 2.0
2 stars 10 forks source link
automation github hacktoberfest hacktoberfest2024 webhook zapier

Zapier - Workflow Automation Platform

Zapier is a tool to automate workflows, enabling users to streamline tasks and boost productivity. It simplifies the process of connecting apps and automating tasks by setting up triggers and actions. The platform currently supports webhook as a trigger and offers actions like sending emails and transferring Solana tokens. When a trigger is activated, the corresponding actions are executed, making workflow automation seamless and efficient.

Tech Stack

Features

Installation

  1. Clone the Repository:

    git clone <repo_link>
  2. Navigate to the Project Directory:

    cd <project_directory>
  3. Install Dependencies: For each of the following folders (frontend, hooks, primary-backend, processor, worker), run:

    npm install
  4. Set Up Environment Variables:

    • Copy the .env.example file in each folder and rename it to .env.
    • Fill in the necessary environment variables in each .env file (details below).
  5. Run the Project:

    • For all folders except frontend, start the servers with:
      npm start
    • For the frontend, use:
      npm run dev
  6. Ports: The ports for all services remain unchanged. Please ensure no conflicts with existing services on your machine.

Folder Structure

├── README.md
├── frontend
├── hooks
├── primary-backend
├── processor
└── worker

Setup Instructions

Before running the project, ensure you have the following services set up:

1. PostgreSQL Database

2. Kafka Instance

Start Kafka Locally

Refer to the official Kafka quickstart guide.

Using Docker:

Start Kafka using Docker:

docker run -p 9092:9092 --rm apache/kafka:3.7.1

Get Shell Access to the Kafka Container:

  1. List all running containers:

    docker ps
  2. Get shell access to the Kafka container (replace container_id with the actual container ID from the previous command):

    docker exec -it <container_id> /bin/bash
  3. Navigate to the Kafka binary folder:

    cd /opt/kafka/bin

Create a Kafka Topic:

./kafka-topics.sh --create --topic outbox-processor --bootstrap-server localhost:9092

Publish to the Topic:

./kafka-console-producer.sh --topic outbox-processor --bootstrap-server localhost:9092

For more information, refer to the Kafka quickstart guide for installation and configuration:
Apache Kafka Documentation

3. SMTP Credentials (Mailgun or Amazon SES)

4. Solana Private Key

Once these services are configured and running, ensure the respective credentials and connection strings are added to the .env files in the appropriate directories.

System Design

The overall architecture and workflow for this system can be viewed in the system design flowchart below:

System Design Flowchart

Contribution Guidelines

Guidelines