Automesh
An open-source, event-driven AI Workflow Engine with a visual builder and AI-powered generation.
Technologies Used
Project Overview
Automesh is a powerful workflow automation platform that allows users to connect various tools like Stripe, GitHub, Slack, and Email to automatically run custom actions based on specific events or schedules. It features a Next.js-based Dashboard with a drag-and-drop Visual Builder and a robust Fastify API powered by BullMQ and Postgres for reliable workflow orchestration.
Key Features
Event-driven architecture supporting webhooks from Stripe, GitHub, Slack, and Resend
Interactive drag-and-drop visual workflow builder using ReactFlow
AI-powered workflow generation from natural language descriptions
Reliable job orchestration with BullMQ, supporting retries and fallbacks
Scheduled workflow executions using Cron syntax
High-Level Architecture
The application is structured as a monorepo utilizing pnpm workspaces. The frontend is a Next.js App Router application that provides the visual dashboard and workflow builder. The backend is a high-performance Fastify API that handles webhooks and job queuing. Asynchronous workflow execution is managed by BullMQ backed by Redis, ensuring reliable processing and fault tolerance. Data is persisted in a PostgreSQL database using Drizzle ORM for type-safe queries.
Challenges & Learnings
Implementing a reliable, fault-tolerant workflow execution engine that can handle complex state transitions and variable interpolation between steps. This was solved by leveraging BullMQ for robust job queueing and creating a custom orchestration layer that manages data context passing and automatic error handling mechanisms like retries and fallbacks.